Probability and Statistics — Random Variables, the Five Distributions and Bayes
Expectation and Variance, the Fast Way
- Var(X) = E[X²] − (E[X])². For a fair die, E[X] = 3.5 and E[X²] = (1 + 4 + 9 + 16 + 25 + 36)/6 = 91/6, so the variance is 91/6 − 12.25 = 35/12 ≈ 2.917 and the standard deviation is about 1.708. Averaging squared deviations one at a time gives the same number after six times the work.
- A continuous density must integrate to 1, and that is how the unknown constant is always found. For f(x) = kx on [0, 2], ∫₀² kx dx = 2k = 1 gives k = 0.5, and then E[X] = ∫₀² x·0.5x dx = 4/3 ≈ 1.333. Note that the mean sits to the right of the midpoint 1, as it must for a density that rises with x.
- Variance is not linear. Var(aX + b) = a²·Var(X), so the shift b disappears entirely and the scale is squared. Mean, by contrast, is linear: E[aX + b] = a·E[X] + b. Mixing the two rules up is a reliable way to lose a two-mark question.
- Mean, median and mode separate for a skewed set. For 5, 8, 8, 11, 13 the mean is 9, the median is 8 and the mode is 8: the single large value pulls the mean above the median, which is what right-skew means. A question that hands you a lopsided data set is usually asking you to notice exactly this ordering.
Bayes and the Sampling Theorems
Bayes questions are recognisable by their shape: you are told the probability of the evidence given each cause, and asked for the probability of a cause given the evidence. The mechanical route has two steps, and doing them in this order removes the confusion.
- Compute the total probability of the evidence, adding one product per cause. Two machines supply 60% and 40% of output with defect rates 2% and 5%: P(defective) = 0.60×0.02 + 0.40×0.05 = 0.012 + 0.020 = 0.032.
- Divide the one product you care about by that total. P(machine 1 | defective) = 0.012/0.032 = 0.375. Notice the result: machine 1 makes most of the output but is the less likely source of a defect, because its defect rate is well under half of machine 2’s — and a candidate who answers 0.60 has reported the prior instead of the posterior.
Key takeaways
- Learn the five distributions as a table of means and variances: np and np(1−p); λ and λ; (a+b)/2 and (b−a)²/12; 1/λ and 1/λ²; μ and σ².
- Recognise the family from the tell: fixed trials is binomial, a count in an interval is Poisson, a waiting time is exponential, a measurement error is normal.
- Equal mean and variance is the Poisson signature, and P(X = 0) is just e−λ — with λ rescaled to whatever interval the question names.
- The exponential distribution is memoryless: a component that has survived s hours is as likely to last another t as a new one. It is therefore the wrong model for wear-out.
- Use Var(X) = E[X²] − (E[X])², and remember Var(aX + b) = a²Var(X) — the shift vanishes while the scale is squared.
- For a Bayes question, compute the total probability of the evidence first and use it as the denominator. Reporting the prior instead of the posterior is the standard error.
- The central limit theorem normalises the sample mean, not the observations, and precision improves as √n — quadruple the sample to halve the standard error.
Practice questions (9)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
A binomial random variable has n = 5 and p = 0.2. Its variance is:
Show answer
Answer: B — 0.8
Variance is np(1 − p) = 5 × 0.2 × 0.8 = 0.8. Option A is the mean, np = 1, and offering the mean as a distractor to a variance question is the commonest form this appears in — read which was asked. A useful structural check: for a binomial variable the variance is always smaller than the mean, since it is the mean multiplied by (1 − p) which is less than 1. So an option larger than np, such as 4.0, can be discarded immediately.Calls arrive at a helpdesk following a Poisson process with a mean of 2 calls per hour. The probability of no call in a given hour is approximately:
Show answer
Answer: A — 0.135
P(X = k) = e−λλk/k! with λ = 2, and at k = 0 both λk and k! are 1, so the whole expression is just e⁻² ≈ 0.1353. Option D is the complement, 1 − e⁻² ≈ 0.865, which answers "at least one call" — a question set just as often, and the reason to read the stem twice. Option B is 2e⁻² ≈ 0.271, the probability of exactly one call. All three numbers come from the same two-second calculation, so the marks here are entirely in matching the answer to the question.A random variable is uniformly distributed on [0, 6]. Its variance is:
Show answer
Answer: A — 3
The variance of a uniform distribution on [a, b] is (b − a)²/12 = 36/12 = 3. The mean is (a + b)/2 = 3 as well, which is a coincidence at these particular limits and not a general fact — on [0, 4] the mean is 2 while the variance is 16/12 = 4/3. Option B is the mean of a fair die and has no bearing here; option D is the divisor 12 mistaken for the answer, which happens more often than it should. If the formula slips, derive it: E[X²] = ∫₀⁶ x²/6 dx = 12, and 12 − 3² = 3.The lifetime of a component is exponentially distributed with mean 10 hours. The probability that it lasts more than 10 hours is approximately:
Show answer
Answer: B — 0.368
Mean 10 means rate λ = 1/10, and P(X > t) = e−λt, so P(X > 10) = e−1 ≈ 0.368. Option A is the intuition that a component should be equally likely to beat or miss its mean lifetime, and it is wrong because the exponential distribution is skewed — the mean sits above the median, which is (ln 2)/λ ≈ 6.93 hours. Option C is the complement, the probability of failing within 10 hours. Worth carrying: for any exponential distribution the probability of exceeding the mean is e⁻¹, independent of the mean itself.Machines M1 and M2 make 60% and 40% of a factory’s output, with defect rates 2% and 5% respectively. An item drawn at random is found defective. The probability that it came from M1 is:
Show answer
Answer: B — 0.375
First the total probability of a defect: 0.60 × 0.02 + 0.40 × 0.05 = 0.012 + 0.020 = 0.032. Then P(M1 | defective) = 0.012/0.032 = 0.375. Option A is the prior probability of M1, which is the answer to a different question — the evidence has to move it, and here it moves it down, because M1 is the cleaner machine. Option C is P(M2 | defective) = 0.020/0.032 = 0.625, and note that the two posteriors correctly sum to 1. Option D is the numerator alone, which is the joint probability of M1 and defective rather than the conditional probability asked for.For the data set 5, 8, 8, 11, 13, the value of (mean − median) is:
Show answer
Answer: B — 1
The mean is (5 + 8 + 8 + 11 + 13)/5 = 45/5 = 9. The set is already sorted and has five values, so the median is the third, 8. Hence mean − median = 9 − 8 = 1. The mode is 8 as well, since 8 occurs twice. Option A is what a symmetric set would give; this one is pulled to the right by the 13, which is why the mean sits above the median — and that relationship, mean above median for a right-skewed set, is itself examinable as a conceptual question.A continuous random variable has density f(x) = kx on [0, 2] and zero elsewhere. Then k and E[X] are:
Show answer
Answer: A — k = 0.5, E[X] = 4/3
A density integrates to 1 over its support: ∫₀² kx dx = k·[x²/2]₀² = 2k = 1, so k = 0.5. Then E[X] = ∫₀² x·(0.5x) dx = 0.5·[x³/3]₀² = 0.5 × 8/3 = 4/3 ≈ 1.333. Option B pairs the right k with the midpoint of the interval, which would be the mean only for a uniform density — here the density increases with x, so the mean must lie to the right of 1, and noticing that eliminates B without any integration. This normalise-then-integrate pair is the standard two-step for every continuous-density question.The variance of the number shown by a single throw of a fair six-faced die is _____ (round to three decimal places).
Numerical answer — type the value.
Show answer
Answer: 2.917
Use Var(X) = E[X²] − (E[X])². Here E[X] = (1 + 2 + 3 + 4 + 5 + 6)/6 = 3.5 and E[X²] = (1 + 4 + 9 + 16 + 25 + 36)/6 = 91/6 ≈ 15.1667, so the variance is 15.1667 − 12.25 = 35/12 ≈ 2.917 and the standard deviation is about 1.708. Averaging six squared deviations by hand gives the same answer for six times the effort, which matters in a three-hour paper. Note that this is a numerical-answer question, so no negative marking applies and the value should always be entered.X is a Poisson random variable with parameter λ > 0. Which of the following are true? (More than one option may be correct.)
Show answer
Answer: A — Its mean and its variance are equal; B — P(X = 0) = e^{−λ}; D — It takes only non-negative integer values
Three of the four are true. The mean and the variance are both λ, which is the Poisson signature and often the way a question tells you which distribution it means — option A. P(X = k) = e−λλk/k! collapses at k = 0 to e−λ, since both λ⁰ and 0! are 1 — option B. And a Poisson variable counts events, so its values are 0, 1, 2, … — option D. Only option C is false: counting is discrete, and it is the exponential distribution — the waiting time between Poisson events — that is continuous. The two are often set in the same question precisely because they describe the same process from opposite ends.