Binomial and Geometric

Study Sheet

Binomial and Geometric

Counting successes and waiting for the first one

The Binomial Distribution

Concept
Binomial setting

Fixed number nn of independent trials, each a success with the same probability pp. The number of successes XX is binomial: P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom nk p^k(1-p)^{n-k}, with mean npnp and standard deviation np(1−p)\sqrt{np(1-p)}.

The formula is a counting argument: any particular sequence with kk successes has probability pk(1−p)n−kp^k(1-p)^{n-k}, and there are (nk)\binom nk such sequences. The mean npnp is linearity of expectation over nn indicator variables; the variance np(1−p)np(1 - p) is nn copies of a single trial's variance p(1−p)p(1-p), added because the trials are independent.

Example
Exactly and at least
0.0021.0282.1323.3094.3605.168P(X = k), n = 5, p = 0.7
The two dark bars, k = 4 and k = 5, add to 0.528.

A free-throw shooter makes 70%70\%, independently. In 55 shots, P(exactly 3)=(53)(0.7)3(0.3)2=10⋅0.343⋅0.09=0.3087P(\text{exactly }3) = \binom53(0.7)^3(0.3)^2 = 10\cdot0.343\cdot0.09 = 0.3087. "At least 44" means 44 or 55, two separate cases added: (54)(0.7)4(0.3)+(0.7)5=0.36015+0.16807=0.52822\binom54(0.7)^4(0.3) + (0.7)^5 = 0.36015 + 0.16807 = 0.52822.

Example
Binomial or not?

Draw 55 cards from a deck and count hearts. Without replacement the trials are not independent — after a heart, fewer hearts remain — so the count is NOT binomial. With replacement (and reshuffling) each draw is a heart with probability 1/41/4 independently, and the count is binomial with n=5n = 5, p=1/4p = 1/4. Check all four conditions: fixed nn, two outcomes, independence, constant pp.

Example
Mean and spread

A spinner lands on red with probability 0.20.2. In 5050 spins, the number of reds has mean np=10np = 10 and SD 50⋅0.2⋅0.8=8≈2.83\sqrt{50\cdot0.2\cdot0.8} = \sqrt8 \approx 2.83. So 10±2.8310 \pm 2.83 is the typical range; 2020 reds would be more than three SDs high and very surprising.

Side note
Where it goes wrong

Forgetting the (nk)\binom nk. The probability of exactly 33 makes in 55 is not (0.7)3(0.3)2=0.03087(0.7)^3(0.3)^2 = 0.03087 — that is one particular order, such as make–make–make–miss–miss. There are (53)=10\binom53 = 10 orders, each with that probability.

Try it
Try it: guessing on a quiz

A student guesses on all 66 questions of a quiz with 44 options each. What is the probability of exactly 22 correct?

Show the answer

n=6n = 6, p=1/4p = 1/4: (62)(14)2(34)4=15⋅116⋅81256=12154096≈0.297\binom62\left(\tfrac14\right)^2\left(\tfrac34\right)^4 = 15\cdot\tfrac1{16}\cdot\tfrac{81}{256} = \tfrac{1215}{4096} \approx \mathbf{0.297}.

The Normal Approximation

Concept
When the bars look like a bell

When np≥10np \ge 10 and n(1−p)≥10n(1-p) \ge 10, the binomial is close to normal with the same mean npnp and SD np(1−p)\sqrt{np(1-p)}, so z-scores answer "at least kk" questions without summing dozens of terms. A continuity correction — using k−0.5k - 0.5 for "at least kk" — improves the match.

A binomial count is a sum of nn independent 0/1 variables, and sums of many independent pieces are approximately normal (the central limit theorem). The conditions make sure there are enough expected successes and failures that the distribution is not squashed against 00 or nn. The continuity correction accounts for the fact that each bar of width 11 is centred on an integer.

Example
Sixty heads
35404550556065n = 100, p = 0.5
The bars from 60 up (dark) against the normal curve with mean 50 and SD 5.

A fair coin is tossed 100100 times. XX has mean 5050 and SD 100⋅0.5⋅0.5=5\sqrt{100\cdot0.5\cdot0.5} = 5; the conditions hold (50≥1050 \ge 10). P(X≥60)≈P(Z≥2)≈0.023P(X \ge 60) \approx P(Z \ge 2) \approx 0.023. With the continuity correction, z=(59.5−50)/5=1.9z = (59.5 - 50)/5 = 1.9 and P(Z≥1.9)≈0.029P(Z \ge 1.9) \approx 0.029, very close to the exact binomial value 0.0280.028.

Example
A larger nn

A multiple-choice test has 400400 questions with 44 options; a student guesses every one. Correct answers: mean 100100, SD 400⋅0.25⋅0.75=75≈8.66\sqrt{400\cdot0.25\cdot0.75} = \sqrt{75} \approx 8.66. Scoring 115115 or more needs z≥15/8.66≈1.73z \ge 15/8.66 \approx 1.73: probability about 0.0420.042.

Example
When not to approximate

A rare defect occurs in 10%10\% of items; inspect 2020. Here np=2<10np = 2 < 10: the distribution piles up against 00 and is strongly skewed, and a normal curve would put noticeable probability on negative counts. Use the binomial formula directly: P(X=0)=0.920≈0.12P(X = 0) = 0.9^{20} \approx 0.12.

Side note
Where it goes wrong

Using the normal approximation when npnp or n(1−p)n(1 - p) is small, as in the defect example, or forgetting that "at least 6060" includes 6060 itself — the continuity correction starts the area at 59.559.5, not 60.560.5.

Try it
Try it: defective parts

A machine makes 2%2\% defective parts. In a batch of 10001000, find the mean and SD of the number of defectives, check the conditions, and estimate P(X>30)P(X > 30).

Show the answer

Mean np=20np = \mathbf{20}; SD 1000⋅0.02⋅0.98=19.6≈4.43\sqrt{1000\cdot0.02\cdot0.98} = \sqrt{19.6} \approx \mathbf{4.43}. Conditions: np=20≥10np = 20 \ge 10 and n(1−p)=980≥10n(1-p) = 980 \ge 10. z=(30−20)/4.43≈2.26z = (30 - 20)/4.43 \approx 2.26, so P(X>30)≈0.012P(X > 30) \approx \mathbf{0.012}.

The Geometric Distribution

Concept
Waiting for the first success

Repeat independent trials with success probability pp until the first success. The trial number XX is geometric: P(X=k)=(1−p)k−1pP(X = k) = (1-p)^{k-1}p, E[X]=1pE[X] = \dfrac1p, and P(X>k)=(1−p)kP(X > k) = (1-p)^k.

The formula reads off the story: the first success on trial kk means k−1k - 1 failures and then a success. P(X>k)P(X > k) is simpler still — the first kk trials all fail. The expected wait 1/p1/p is the fact everyone should carry around: a 11-in-2020 event takes 2020 tries on average. The memoryless property is the surprising one — having failed 1010 times does not make success "due"; the remaining wait is still 1/p1/p on average, because the trials are independent.

Example
Rolling a six
123456789101112P(first six on roll k)
Each bar is 5/6 of the one before; the dark bar is roll 3, probability 0.116.

Expected number of rolls to get a six: 1/(1/6)=61/(1/6) = 6. Probability the first six comes on roll 33: two non-sixes, then a six, (5/6)2(1/6)≈0.116(5/6)^2(1/6) \approx 0.116. Probability it takes more than 33 rolls: the first three all miss, (5/6)3≈0.579(5/6)^3 \approx 0.579.

Example
No memory

A player has rolled 1010 times without a six. Expected number of FURTHER rolls? Still 66. The next rolls know nothing about the past ones, so the waiting starts afresh. In formulas, P(X>10+k∣X>10)=(5/6)10+k/(5/6)10=(5/6)kP(X > 10 + k \mid X > 10) = (5/6)^{10+k}/(5/6)^{10} = (5/6)^k, the same as starting over.

Example
Within five tries

Probability of at least one six in the first 55 rolls: the complement is "no six in 55", so 1−(5/6)5≈1−0.402=0.5981 - (5/6)^5 \approx 1 - 0.402 = 0.598. "At least one" questions are almost always easiest through the complement.

Side note
Where it goes wrong

Confusing binomial ("how many successes in nn trials") with geometric ("how many trials until the first success"), and the gambler's fallacy that a long run of failures raises the chance of success.

Try it
Try it: geometric

A 20%20\% free-sample offer: what is the expected number of customers until the first taker, and the probability the first taker is the 22nd customer?

Show the answer

Expected 1/0.2=51/0.2 = \mathbf{5}. The first taker is second when customer 11 declines and customer 22 accepts: P(X=2)=0.8⋅0.2=0.16P(X = 2) = 0.8\cdot0.2 = \mathbf{0.16}.

Why It Works

Condition on the first trial. With probability pp it succeeds and the wait is 11. With probability 1−p1 - p it fails, one trial is used up, and — because the trials are independent — the situation is exactly as at the start, so the expected remaining wait is again E[X]E[X]. So E[X]=p⋅1+(1−p)(1+E[X])E[X] = p\cdot1 + (1 - p)(1 + E[X]), which simplifies to pE[X]=1pE[X] = 1: E[X]=1/pE[X] = 1/p. The same first-step reasoning solves a whole family of waiting-time problems.

An outcome of nn trials is a string of S and F. A string with exactly kk S's has probability pk(1−p)n−kp^k(1 - p)^{n-k}, by independence, whatever the order. The event "X=kX = k" is the union of all such strings, and they are disjoint, so their probabilities add. There are (nk)\binom nk ways to choose which kk positions hold the S's, giving (nk)pk(1−p)n−k\binom nk p^k(1 - p)^{n-k}. By the binomial theorem these probabilities sum to (p+(1−p))n=1(p + (1 - p))^n = 1.

Reminder — The binomial theorem:  (x+y)n=∑k=0n(nk)x n−kyk(x+y)^{n}=\sum_{k=0}^{n}\binom{n}{k}x^{\,n-k}y^{k}