AIML Rounds

QUIZ

Probability

12 questions on Probability, from 17 lessons. Pick an answer in your head, then open it.

On the roadmap for: AI Engineering, ML Engineering, Data Science.

  1. Question 1 of 12

    A disease affects 1% of people. A test catches 99% of cases and wrongly flags 1% of healthy people. You test positive. Roughly how likely is it that you have the disease?

    1. A. About 90%, because most positive results come from real cases
    2. B. About 50%, because false alarms match true cases
    3. C. About 99%, because the test is 99% accurate
    4. D. About 1%, because only 1% have the disease
    View answer

    ✓ B. About 50%, because false alarms match true cases

    Per 10,000 people: 99 true positives and 99 false positives (1% of 9,900). So 99 / 198 ≈ 50%. The rare base rate matters.

    Lesson: Probability Basics & Bayes' Rule

  2. Question 2 of 12

    What does it mean that X and Y are conditionally independent given Z?

    1. A. X and Y can never happen at the same time once Z is known
    2. B. X and Y are both unaffected by Z, so Z can be ignored
    3. C. P(X, Y | Z) = P(X | Z) · P(Y | Z): given Z, Y adds nothing about X
    4. D. P(X | Y) = P(Y | X), so the order of conditioning doesn't matter
    View answer

    ✓ C. P(X, Y | Z) = P(X | Z) · P(Y | Z): given Z, Y adds nothing about X

    Two things can be correlated overall yet independent once a common cause Z is known. Naive Bayes rests on this.

    Lesson: Joint, Marginal and Conditional Distributions

  3. Question 3 of 12

    You assume the target is Gaussian noise around the model's prediction. Maximising the likelihood is the same as minimising which loss?

    1. A. Hinge loss, because it maximises the margin
    2. B. Absolute error, because it is robust to outliers
    3. C. Cross-entropy, because the target is treated as a probability
    4. D. Mean squared error, from the Gaussian log-likelihood
    View answer

    ✓ D. Mean squared error, from the Gaussian log-likelihood

    The Gaussian log-likelihood is −(y − ŷ)²/2σ² plus a constant, so maximising it minimises squared error. A Bernoulli target gives log-loss.

    Lesson: Common Probability Distributions

  4. Question 4 of 12

    You average many models whose errors are positively correlated. What happens to the variance of the average as you add more models?

    1. A. It stays the same, because the errors move together
    2. B. It increases, because correlated errors add up across the models
    3. C. It falls but levels off at a floor set by the correlation
    4. D. It falls to zero as you add enough models
    View answer

    ✓ C. It falls but levels off at a floor set by the correlation

    Var = ρσ² + (1 − ρ)σ²/n. The second term shrinks with n, but ρσ² stays, so correlated models help less.

    Lesson: Expectation, Variance & Covariance

  5. Question 5 of 12

    What does the central limit theorem say?

    1. A. Any large enough dataset becomes normally distributed
    2. B. Large samples contain no outliers, so their histogram always looks normal
    3. C. The sample mean always equals the population mean exactly
    4. D. The mean of many independent draws is roughly normal, whatever the shape
    View answer

    ✓ D. The mean of many independent draws is roughly normal, whatever the shape

    The law of large numbers says the mean converges; the CLT describes the shape of its spread, which is why z-tests and confidence intervals work.

    Lesson: Law of Large Numbers and Central Limit Theorem

  6. Question 6 of 12

    By concentration bounds such as Hoeffding's, the error of a test-set estimate shrinks like 1/√n. To halve the error margin, how many test samples do you need?

    1. A. 4× as many samples
    2. B. The same number, if you repeat the test
    3. C. 8× as many samples
    4. D. 2× as many samples
    View answer

    ✓ A. 4× as many samples

    Margin ∝ 1/√n, so halving it needs √n to double, which means 4× the samples.

    Lesson: Concentration Inequalities

  7. Question 7 of 12

    L2 regularisation on a model's weights is the same as MAP estimation with which prior?

    1. A. A Gaussian prior centred at zero
    2. B. A Beta prior on each weight
    3. C. A uniform prior over all weights
    4. D. A Laplace prior centred at zero
    View answer

    ✓ A. A Gaussian prior centred at zero

    The log of a zero-mean Gaussian prior is −w²/2τ², which adds an L2 penalty. A Laplace prior gives L1.

    Lesson: Maximum Likelihood & MAP

  8. Question 8 of 12

    You use a Beta prior for a coin's probability of heads and observe some flips. Why is this convenient?

    1. A. The posterior is also a Beta: just add the heads and tails counts
    2. B. You no longer need data, because the prior alone decides the answer
    3. C. The posterior becomes Gaussian after a few flips
    4. D. The posterior always gives a probability of exactly 0.5
    View answer

    ✓ A. The posterior is also a Beta: just add the heads and tails counts

    Beta is conjugate to the Bernoulli/binomial likelihood: Beta(a, b) becomes Beta(a + heads, b + tails).

    Lesson: Bayesian Inference and Conjugate Priors

  9. Question 9 of 12

    What is the stationary distribution π of a Markov chain with transition matrix P?

    1. A. A distribution that doesn't change after one more step: π = πP
    2. B. The state the chain visits least often over time
    3. C. The state the chain starts in, before any steps
    4. D. The largest entry in each row of the chain's transition matrix
    View answer

    ✓ A. A distribution that doesn't change after one more step: π = πP

    If the chain is in π, it stays in π. Many chains converge to it from any start, which MCMC relies on.

    Lesson: Markov Chains

  10. Question 10 of 12

    How does importance sampling estimate an expectation under a hard distribution p?

    1. A. It samples from p directly, using a faster random number generator
    2. B. It evaluates p on a fixed grid and averages the values
    3. C. It replaces the expectation with the value at the mode of p
    4. D. It samples from an easier q and weights each sample by p(x)/q(x)
    View answer

    ✓ D. It samples from an easier q and weights each sample by p(x)/q(x)

    The weights correct for sampling from the wrong distribution. It works poorly when q misses regions where p is large.

    Lesson: Sampling Methods: Inverse Transform, Importance Sampling and MCMC

  11. Question 11 of 12

    On average it takes 4 flips to see HT, but 6 flips to see HH. Why the difference?

    1. A. HH has a lower probability per pair of flips than HT
    2. B. After H, a T resets HH to zero, but an extra H keeps HT's progress
    3. C. Real coins land tails slightly more often, which slows HH
    4. D. Both average 4 flips; the gap of 6 comes only from small samples
    View answer

    ✓ B. After H, a T resets HH to zero, but an extra H keeps HT's progress

    Both pairs have probability 1/4 per position, but a failed HH attempt (HT) wastes your progress, while for HT a failure (HH) leaves you one step away.

    Lesson: Coin Flip Practice

  12. Question 12 of 12

    In the Monty Hall game, you pick a door, the host opens a losing door, and offers a switch. Should you switch?

    1. A. No: two doors remain, so it's 50/50
    2. B. It doesn't matter: the host's choice reveals nothing
    3. C. Only if you first picked the middle door
    4. D. Yes: switching wins 2/3 of the time
    View answer

    ✓ D. Yes: switching wins 2/3 of the time

    Your first pick wins 1/3 of the time. The host's choice concentrates the other 2/3 on the remaining door.

    Lesson: Classic Probability Puzzles