Skip to content
Family Table Math

Binomial Distribution

A basketball player takes 55 free throws. A quiz has 1010 multiple-choice questions you guess on. A factory tests 2020 light bulbs. Each of these repeats the same yes-or-no trial several times and counts the “yes” results. The binomial distribution gives the probability of every possible count, with one formula.

A random variable XX has a binomial distribution when all four conditions hold:

  1. There is a fixed number of trials, nn.
  2. Each trial has two outcomes: success or failure.
  3. The probability of success, pp, is the same on every trial.
  4. The trials are independent.

XX is the number of successes in the nn trials, so x=0,1,2,…,nx = 0, 1, 2, \dots, n. The probability of failure is 1−p1 - p (sometimes written qq).

“Success” just means the outcome you’re counting. It can be something bad, like a defective bulb.

P(X=k)=(nk)pk(1−p)n−k,k=0,1,2,…,nP(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}, \qquad k = 0, 1, 2, \dots, n

Here’s why each part is there:

  • pk(1−p)n−kp^k (1 - p)^{n - k} is the probability of one particular order with kk successes and n−kn - k failures (multiply, because the trials are independent).
  • (nk)\binom{n}{k} counts how many orders there are: the number of ways to choose which kk of the nn trials are the successes. (See combinations; it’s also written C(n,k)C(n, k) or nCk{}_nC_k.)

Technology: on a TI-83/84, binompdf(n, p, k) gives P(X=k)P(X = k), and binomcdf(n, p, k) gives P(X≤k)P(X \le k). In a spreadsheet, use =BINOM.DIST(k, n, p, FALSE) and =BINOM.DIST(k, n, p, TRUE).

For a binomial distribution,

E(X)=npE(X) = np

This makes sense: if you take 1010 shots with a 30%30\% chance each, you expect about 10×0.3=310 \times 0.3 = 3 to go in.

The distribution for n=10n = 10 and p=0.3p = 0.3, rounded to 44 decimal places:

kk001122334455667788991010
P(X=k)P(X = k)0.02820.02820.12110.12110.23350.23350.26680.26680.20010.20010.10290.10290.03680.03680.00900.00900.00140.00140.00010.00010.00000.0000

(The rounded values add to 0.99990.9999; the exact values add to 11.)

Probability histogram for the binomial distribution with n = 10 and p = 0.3. The tallest bar is at k = 3 (about 0.267), next k = 2 (0.233) and k = 4 (0.200). Bars for k = 8, 9, 10 are almost zero. The expected value np = 3 is marked. 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0 1 2 3 4 5 6 7 8 9 10 number of successes, k P(X = k) 0.028 0.121 0.233 0.267 0.200 0.103 0.037 0.009 0.001 dashed line: E(X) = np = 3
The binomial distribution with n=10n = 10 and p=0.3p = 0.3. The peak is at the expected value np=3np = 3.

When p=0.5p = 0.5, the histogram is symmetric. When pp is less than 0.50.5, it’s skewed right (a long tail toward the large values); when pp is greater than 0.50.5, it’s skewed left.

As nn increases (with pp fixed), the histogram:

  • moves to the right, because its centre npnp grows;
  • spreads out over more values;
  • becomes more symmetric and bell-shaped, even if pp isn’t 0.50.5.

That bell shape is the reason a binomial distribution can be approximated by a normal distribution when nn is large; see normal approximation.

Three binomial histograms with p = 0.3. For n = 5 the histogram is skewed right with its peak at 1. For n = 15 the peak is at 4 and the shape is less skewed. For n = 40 the peak is at 12 and the shape is nearly symmetric and bell-shaped. 0.00 0.10 0.20 0.30 0.40 0 1 2 3 4 5 n = 5, p = 0.3 k P(X = k) 0.00 0.05 0.10 0.15 0.20 0.25 0 3 6 9 12 15 n = 15, p = 0.3 k 0.00 0.05 0.10 0.15 0 5 10 15 20 25 30 35 40 n = 40, p = 0.3 k
Binomial distributions with p=0.3p = 0.3 and n=5n = 5, 1515, and 4040. As nn grows, the shape becomes more symmetric.

For “at least one”, use the complement: the opposite of “at least one success” is “no successes”.

P(X≥1)=1−P(X=0)P(X \ge 1) = 1 - P(X = 0)

Similarly, P(X≥2)=1−P(X=0)−P(X=1)P(X \ge 2) = 1 - P(X = 0) - P(X = 1). This is much faster than adding up many terms.

Decide whether XX is binomial. If it is, give nn and pp.

  • (a) A die is rolled 1212 times, and XX is the number of 55s.
  • (b) Five cards are dealt from a deck, and XX is the number of hearts.
  • (c) A coin is flipped until it lands heads, and XX is the number of flips.

Solution.

(a) Yes. There are 1212 independent trials, each a success (55) or failure, with p=16p = \tfrac{1}{6} every time. So n=12n = 12, p=16p = \tfrac{1}{6}.

(b) No. The cards aren’t replaced, so the trials are dependent: the chance of a heart changes after each card. (This is the hypergeometric distribution.)

(c) No. The number of trials isn’t fixed.

A basketball player makes 70%70\% of her free throws. She takes 55 shots, and the shots are independent. Find the probability that she makes exactly 44.

Solution. This is binomial with n=5n = 5, p=0.7p = 0.7, and k=4k = 4.

P(X=4)=(54)(0.7)4(0.3)1=5×0.2401×0.3=0.36015≈0.3602\begin{aligned} P(X = 4) &= \binom{5}{4} (0.7)^4 (0.3)^1 \\ &= 5 \times 0.2401 \times 0.3 \\ &= 0.36015 \approx 0.3602 \end{aligned}

The (54)=5\binom{5}{4} = 5 counts which shot is the miss: the first, second, third, fourth, or fifth.

For n=10n = 10 and p=0.3p = 0.3, use the table above to find P(X≤2)P(X \le 2) and E(X)E(X).

Solution.

P(X≤2)=P(0)+P(1)+P(2)≈0.0282+0.1211+0.2335=0.3828P(X \le 2) = P(0) + P(1) + P(2) \approx 0.0282 + 0.1211 + 0.2335 = 0.3828 E(X)=np=10(0.3)=3E(X) = np = 10(0.3) = 3

On the histogram, 33 is exactly where the tallest bar is.

A large shipment of light bulbs has 4%4\% defective. A sample of 2020 bulbs is tested. (The shipment is so large that the trials are close enough to independent.) Find the probability that at least one bulb is defective, and that at least two are.

Solution. This is binomial with n=20n = 20 and p=0.04p = 0.04. Use the complement.

P(X=0)=(0.96)20≈0.4420P(X = 0) = (0.96)^{20} \approx 0.4420 P(X≥1)=1−(0.96)20≈0.5580P(X \ge 1) = 1 - (0.96)^{20} \approx 0.5580

For at least two, also take away P(X=1)P(X = 1):

P(X=1)=(201)(0.04)1(0.96)19≈0.3683P(X = 1) = \binom{20}{1} (0.04)^1 (0.96)^{19} \approx 0.3683 P(X≥2)=1−P(X=0)−P(X=1)≈1−0.4420−0.3683=0.1897P(X \ge 2) = 1 - P(X = 0) - P(X = 1) \approx 1 - 0.4420 - 0.3683 = 0.1897

The expected number of defective bulbs is np=20(0.04)=0.8np = 20(0.04) = 0.8.

Using the binomial formula when the trials are dependent. Drawing without replacement from a small group changes pp each time, so it isn’t binomial. Check all four conditions first.

Forgetting the combination. pk(1−p)n−kp^k(1 - p)^{n - k} is the probability of one order. Multiply by (nk)\binom{n}{k} to count all the orders.

Mixing up k and n − k in the exponents. The power of pp is the number of successes; the power of 1−p1 - p is the number of failures. The two exponents always add to nn.

Adding many terms for “at least”. P(X≥1)P(X \ge 1) for 2020 trials would need 2020 terms. Use 1−P(X=0)1 - P(X = 0) instead.

Getting “at most” and “at least” backwards. “At most 22” means X≤2X \le 2 (00, 11, or 22). “At least 22” means X≥2X \ge 2. Also, P(X>2)P(X \gt 2) is 1−P(X≤2)1 - P(X \le 2), not 1−P(X<2)1 - P(X \lt 2).

1. (Warm-up) Is XX binomial? Explain briefly.

  • (a) XX is the number of heads in 88 coin flips.
  • (b) XX is the number of red marbles when 44 are drawn without replacement from a bag of 55 red and 55 blue.
  • (c) XX is the number of rolls of a die until you get a 11.
Solution

(a) Yes: n=8n = 8 independent flips, p=0.5p = 0.5 each time.

(b) No: without replacement, the trials are dependent (pp changes after each draw).

(c) No: the number of trials isn’t fixed.

2. (Warm-up) A fair coin is flipped 66 times. Find the probability of exactly 33 heads.

SolutionP(X=3)=(63)(0.5)3(0.5)3=2064=516=0.3125P(X = 3) = \binom{6}{3} (0.5)^3 (0.5)^3 = \frac{20}{64} = \frac{5}{16} = 0.3125

3. (Warm-up) A binomial experiment has n=40n = 40 and p=0.25p = 0.25. Find E(X)E(X).

Solution

E(X)=np=40(0.25)=10E(X) = np = 40(0.25) = 10

4. (Core) A fair die is rolled 88 times. Find the probability of exactly two 66s.

Solution

Binomial with n=8n = 8, p=16p = \tfrac{1}{6}, k=2k = 2:

P(X=2)=(82)(16)2(56)6=28×136×15 62546 656≈0.2605P(X = 2) = \binom{8}{2} \left(\frac{1}{6}\right)^2 \left(\frac{5}{6}\right)^6 = 28 \times \frac{1}{36} \times \frac{15\,625}{46\,656} \approx 0.2605

5. (Core) Make the probability distribution table for a binomial experiment with n=4n = 4 and p=0.2p = 0.2, and find E(X)E(X). Describe the shape of its histogram.

Solution

Using P(X=k)=(4k)(0.2)k(0.8)4−kP(X = k) = \binom{4}{k}(0.2)^k(0.8)^{4 - k}:

kk0011223344
P(X=k)P(X = k)0.40960.40960.40960.40960.15360.15360.02560.02560.00160.0016

Check: the values add to 11. ✓ E(X)=4(0.2)=0.8E(X) = 4(0.2) = 0.8.

The histogram is strongly skewed right: two tall bars at 00 and 11, then a quick drop to almost nothing at 44.

6. (Core) A student guesses on all 1010 questions of a multiple-choice quiz. Each question has 44 choices.

  • (a) Find the probability of getting at least one right.
  • (b) Find the probability of getting at least 66 right (a pass).
  • (c) How many does the student expect to get right?
Solution

Binomial with n=10n = 10, p=0.25p = 0.25.

(a) P(X≥1)=1−(0.75)10≈1−0.0563=0.9437P(X \ge 1) = 1 - (0.75)^{10} \approx 1 - 0.0563 = 0.9437.

(b) P(X≥6)=P(6)+P(7)+P(8)+P(9)+P(10)≈0.0162+0.0031+0.0004+0.0000+0.0000≈0.0197P(X \ge 6) = P(6) + P(7) + P(8) + P(9) + P(10) \approx 0.0162 + 0.0031 + 0.0004 + 0.0000 + 0.0000 \approx 0.0197. Guessing is not a good plan for passing.

(c) E(X)=10(0.25)=2.5E(X) = 10(0.25) = 2.5 questions.

7. (Core) At a large school, 60%60\% of students walk or bike to school. Seven students are chosen at random. Find the probability that at most 22 of them walk or bike.

Solution

Binomial with n=7n = 7, p=0.6p = 0.6. “At most 22” means X=0X = 0, 11, or 22.

P(X=0)=(0.4)7≈0.0016P(X=1)=(71)(0.6)(0.4)6≈0.0172P(X=2)=(72)(0.6)2(0.4)5≈0.0774\begin{aligned} P(X = 0) &= (0.4)^7 \approx 0.0016 \\ P(X = 1) &= \binom{7}{1}(0.6)(0.4)^6 \approx 0.0172 \\ P(X = 2) &= \binom{7}{2}(0.6)^2(0.4)^5 \approx 0.0774 \end{aligned}P(X≤2)≈0.0963P(X \le 2) \approx 0.0963

(Adding the unrounded values gives 0.09630.0963; adding the three rounded values above gives 0.09620.0962. Keep full values on your calculator until the end.)

8. (Challenge) How many times must you roll a fair die so that the probability of getting at least one 66 is more than 0.90.9?

Solution

For nn rolls, P(at least one 6)=1−(56)nP(\text{at least one } 6) = 1 - \left(\tfrac{5}{6}\right)^n. You need (56)n<0.1\left(\tfrac{5}{6}\right)^n \lt 0.1.

Try values: (56)12≈0.1122\left(\tfrac{5}{6}\right)^{12} \approx 0.1122 (too big) and (56)13≈0.0935\left(\tfrac{5}{6}\right)^{13} \approx 0.0935 (small enough).

So you need at least 1313 rolls. Then P(at least one 6)≈0.9065P(\text{at least one } 6) \approx 0.9065.

9. (Challenge) A binomial random variable has n=24n = 24 and E(X)=6E(X) = 6. Find pp, then find P(X=6)P(X = 6). Is 66 likely to be the single most probable value? Explain.

Solution

From np=6np = 6: p=624=0.25p = \tfrac{6}{24} = 0.25.

P(X=6)=(246)(0.25)6(0.75)18=134 596×(0.25)6×(0.75)18≈0.1853P(X = 6) = \binom{24}{6}(0.25)^6(0.75)^{18} = 134\,596 \times (0.25)^6 \times (0.75)^{18} \approx 0.1853

Yes. The tallest bar of a binomial histogram is at (or right next to) npnp, and here np=6np = 6 is a whole number, so 66 is the most probable value. Even so, its probability is only about 0.190.19: the other values together are much more likely.