Three fair coins are tossed and X is the number of heads. Find the PMF, E(X), Var(X) and σ, and check them against the binomial formulas.
A random variable attaches a number to every outcome; its probability mass function, expectation and variance summarise it. The binomial, Poisson and geometric distributions model counts of successes, rare events and waiting times — the standard tools of discrete probability.
A random variable X is a function from the sample space to the real numbers: it assigns a number to each outcome. It is discrete when its values can be listed (counts such as 0, 1, 2, …) and continuous when they fill an interval (lengths, times). Continuous variables need densities and integrals; this topic covers the discrete case.
The probability mass function (PMF) is p(x) = P(X = x). The cumulative distribution function (CDF) is F(x) = P(X ≤ x): a non-decreasing step function rising from 0 to 1, with P(a < X ≤ b) = F(b) − F(a).
| x (number of heads in 3 tosses) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Outcomes | TTT | HTT, THT, TTH | HHT, HTH, THH | HHH |
| p(x) | 1/8 | 3/8 | 3/8 | 1/8 |
| F(x) = P(X ≤ x) | 1/8 | 4/8 | 7/8 | 1 |
To check that a table or formula is a valid PMF, confirm that every value is non-negative and that they add to 1. For instance, if p(x) = kx for x = 1, 2, 3, 4, then k(1 + 2 + 3 + 4) = 10k = 1 forces k = 1/10.
For a fair die, E(X) = (1 + 2 + … + 6)/6 = 3.5 — not a value the die can show, but the long-run average of many rolls. For the number of heads in three tosses, E(X) = 0·(1/8) + 1·(3/8) + 2·(3/8) + 3·(1/8) = 12/8 = 1.5. By linearity, the sum of two dice has expectation 3.5 + 3.5 = 7.
Expectation decides whether a game is fair. Suppose you pay ₹10 to roll a die and receive ₹(2 × the face shown). Your expected receipt is 2 × 3.5 = ₹7, so the expected net gain is 7 − 10 = −₹3 per game: the game favours the operator. It would be fair at a price of ₹7.
Fair die: E(X²) = (1 + 4 + 9 + 16 + 25 + 36)/6 = 91/6, so Var(X) = 91/6 − (7/2)² = (182 − 147)/12 = 35/12 ≈ 2.917 and σ ≈ 1.708. For the sum of two independent dice the variances add: 35/6 ≈ 5.833.
Number of heads in three tosses: E(X²) = 0·(1/8) + 1·(3/8) + 4·(3/8) + 9·(1/8) = 24/8 = 3, so Var(X) = 3 − 1.5² = 0.75 and σ ≈ 0.866. The binomial formula below gives the same answer instantly: npq = 3 × ½ × ½ = 0.75.
A Bernoulli trial has two outcomes: success (1) with probability p and failure (0) with probability q = 1 − p; its mean is p and its variance pq. A binomial variable X counts the successes in n such trials when four conditions hold: a fixed number n of trials, two outcomes per trial, independent trials, and the same p every time.
Examples. In 10 tosses of a fair coin, P(exactly 6 heads) = C(10, 6)/2¹⁰ = 210/1024 ≈ 0.205. If 10% of items are defective and 6 are sampled, P(at most one defective) = 0.9⁶ + 6(0.1)(0.9⁵) = 0.5314 + 0.3543 = 0.8857.
Finding the parameters: if the mean is 6 and the variance 2.4, then q = npq/np = 0.4, p = 0.6 and n = 6/0.6 = 10. A claimed binomial with mean 3 and variance 4 is impossible, since npq = np·q is always smaller than np. The distribution is symmetric when p = 1/2 and skewed right when p < 1/2, with its peak near (n + 1)p.
Write the binomial count as a sum X = I₁ + I₂ + … + Iₙ, where the indicator Iⱼ is 1 if trial j succeeds and 0 otherwise. Each Iⱼ is a Bernoulli variable with E(Iⱼ) = p and Var(Iⱼ) = E(Iⱼ²) − p² = p − p² = pq (since Iⱼ² = Iⱼ).
The indicator trick computes expectations that look hard. In a random arrangement of n letters in n envelopes, let Iⱼ = 1 if letter j lands in its own envelope; P(Iⱼ = 1) = 1/n, so the expected number of correctly placed letters is n × (1/n) = 1 — for every n, even though the Iⱼ are dependent. If m balls are dropped at random into n boxes, each box is empty with probability (1 − 1/n)ᵐ, so the expected number of empty boxes is n(1 − 1/n)ᵐ.
The Poisson distribution models the number of events in a fixed interval of time or space when events happen independently at a constant average rate λ: calls per minute, typing errors per page, packets per millisecond, defects per metre of cable. It is named after Siméon Denis Poisson (1837); its most famous early use was Bortkiewicz's 1898 study of Prussian cavalrymen killed by horse kicks.
With λ = 2 calls per minute: P(0) = e⁻² ≈ 0.1353, P(1) = 2e⁻² ≈ 0.2707, P(2) = 2e⁻² ≈ 0.2707, so P(X ≤ 2) = 5e⁻² ≈ 0.6767 and P(at least one call) = 1 − e⁻² ≈ 0.8647. Rates scale with the interval: over 3 minutes, λ = 6.
Poisson approximation to the binomial. When n is large and p small (a common rule of thumb is n ≥ 20 and p ≤ 0.05), B(n, p) ≈ Poisson(np). For n = 100 and p = 0.02, the binomial gives P(X = 0) = 0.98¹⁰⁰ ≈ 0.1326, and the Poisson approximation gives e⁻² ≈ 0.1353.
The geometric distribution counts the trials up to and including the first success: P(X = k) = qᵏ⁻¹p for k = 1, 2, 3, …, with mean 1/p and variance q/p². It is memoryless — P(X > m + n | X > m) = P(X > n) — so a long run of failures does not make success “due”. Rolling a die until the first six: P(first six on the 4th roll) = (5/6)³(1/6) = 125/1296 ≈ 0.0965, and the expected number of rolls is 6.
Some books count instead the failures before the first success, Y = X − 1, with P(Y = k) = qᵏp for k = 0, 1, … and mean q/p. Check which convention a question uses.
| Distribution | PMF | Values | Mean | Variance | Typical use |
|---|---|---|---|---|---|
| Bernoulli(p) | pˣq¹⁻ˣ | 0, 1 | p | pq | a single yes/no trial |
| Binomial(n, p) | C(n, k)pᵏqⁿ⁻ᵏ | 0 … n | np | npq | successes in n independent trials |
| Poisson(λ) | e^(−λ)λᵏ/k! | 0, 1, 2, … | λ | λ | rare events in an interval |
| Geometric(p) | qᵏ⁻¹p | 1, 2, 3, … | 1/p | q/p² | trials until the first success |
| Discrete uniform on 1…n | 1/n | 1 … n | (n + 1)/2 | (n² − 1)/12 | fair die, random index |
| Hypergeometric(N, K, n) | C(K, k)C(N − K, n − k)/C(N, n) | 0 … n | nK/N | nK(N − K)(N − n)/(N²(N − 1)) | sampling without replacement |
Examples: the number of defective bulbs in a sample of 20 from a large lot that is 5% defective is B(20, 0.05) — close to Poisson(1); the number of e-mails arriving in an hour is Poisson; the number of attempts until a guessed 4-digit PIN succeeds (guessing with replacement) is geometric with p = 1/10 000.
Try the problem first, then reveal the working one step at a time.
Three fair coins are tossed and X is the number of heads. Find the PMF, E(X), Var(X) and σ, and check them against the binomial formulas.
A machine produces 10% defective items. In a random sample of 6 items, find P(at most one defective), P(at least two defective), and the mean and variance of the number of defectives.
A typist makes on average 3 errors per page. Assuming a Poisson model, find the probability that a page has (a) no errors, (b) at most 2 errors, (c) at least 3 errors.
A binomial variable has mean 6 and variance 2.4. Find n and p, then P(X = 10) and P(X = 0).
A random variable has PMF p(x) = kx for x = 1, 2, 3, 4. Find k, E(X) and Var(X).
For X ~ B(20, 0.3), find the mean, variance and standard deviation.
For a Poisson variable, P(X = 1) = P(X = 2). Find λ and P(X = 0).
A fair die is rolled repeatedly until a six appears. Find the probability that the first six appears on the 4th roll, and the expected number of rolls.
You pay ₹10 to play a game: a die is rolled and you receive ₹(2 × face). Find your expected gain per game. What entry fee would make the game fair?
10 questions. 70 % passes the topic quiz (+30 XP, +20 more for 100 %). Exam scoring: +1 correct, −⅓ wrong.