Math Lab
Home/Class XII/Ch 13/Binomial distribution

Binomial distribution

The binomial distribution models the number of successes in nn independent trials, each with the same success probability pp. Examples: number of heads in nn flips of a possibly biased coin; number of defective items in a batch of nn; number of correct guesses in an MCQ test.

Setup

The binomial experiment:

  1. There are nn trials.
  2. Each trial has two outcomes: success (with probability pp) or failure (with probability 1p1 - p).
  3. The trials are independent.
  4. pp is the same for every trial.

Let XX = total number of successes in nn trials. Then XX has a binomial distribution with parameters nn and pp, written XB(n,p)X \sim B(n, p).

The probability mass function

For k{0,1,2,,n}k \in \{0, 1, 2, \ldots, n\}: P(X=k)=(nk)pk(1p)nk.P(X = k) = \binom{n}{k}\,p^k\,(1 - p)^{n - k}.

Why? There are (nk)\binom{n}{k} ways to choose which kk trials succeed. Each specific arrangement of kk successes and nkn - k failures has probability pk(1p)nkp^k (1-p)^{n-k}, since trials are independent.

Sanity check: the values must sum to 11. k=0n(nk)pk(1p)nk=(p+(1p))n=1\sum_{k=0}^n \binom{n}{k} p^k (1-p)^{n-k} = (p + (1 - p))^n = 1 by the binomial theorem.

Mean and variance

For XB(n,p)X \sim B(n, p): E[X]=np,Var(X)=np(1p).E[X] = np, \qquad \mathrm{Var}(X) = np(1 - p).

Why? Write X=X1+X2++XnX = X_1 + X_2 + \cdots + X_n where XiX_i indicates whether the ii-th trial succeeded. Each XiX_i is a Bernoulli(pp) variable: P(Xi=1)=pP(X_i = 1) = p, P(Xi=0)=1pP(X_i = 0) = 1 - p, so E[Xi]=pE[X_i] = p, Var(Xi)=p(1p)\mathrm{Var}(X_i) = p(1 - p). By linearity of expectation: E[X]=npE[X] = np. By independence of trials: Var(X)=np(1p)\mathrm{Var}(X) = np(1 - p).

Common probabilities

  • Exactly kk successes: P(X=k)=(nk)pk(1p)nkP(X = k) = \binom{n}{k}p^k(1-p)^{n-k}.
  • At least kk successes: P(Xk)=j=kn(nj)pj(1p)njP(X \ge k) = \sum_{j=k}^n \binom{n}{j}p^j(1-p)^{n-j}.
  • At most kk successes: P(Xk)=j=0k(nj)pj(1p)njP(X \le k) = \sum_{j=0}^k \binom{n}{j}p^j(1-p)^{n-j}.
  • None succeed: P(X=0)=(1p)nP(X = 0) = (1 - p)^n.
  • At least one succeeds: P(X1)=1(1p)nP(X \ge 1) = 1 - (1 - p)^n.

Worked examples

Example 1. A coin is biased: P(H)=0.6P(H) = 0.6. Flipped 55 times. P(exactly 3 heads)P(\text{exactly 3 heads})?

P(X=3)=(53)(0.6)3(0.4)2=100.2160.16=0.3456P(X = 3) = \binom{5}{3}(0.6)^3(0.4)^2 = 10 \cdot 0.216 \cdot 0.16 = 0.3456.

Example 2. A multiple-choice quiz has 1010 questions, each with 44 options. A student guesses every answer. P(at least 4 correct)P(\text{at least 4 correct})?

XB(10,0.25)X \sim B(10, 0.25). P(X4)=1P(X3)=1k=03(10k)(0.25)k(0.75)10kP(X \ge 4) = 1 - P(X \le 3) = 1 - \sum_{k=0}^{3}\binom{10}{k}(0.25)^k(0.75)^{10-k}.

Each term: P(X=0)=(0.75)100.0563P(X = 0) = (0.75)^{10} \approx 0.0563. P(X=1)=100.25(0.75)90.1877P(X = 1) = 10 \cdot 0.25 \cdot (0.75)^9 \approx 0.1877. P(X=2)=450.0625(0.75)80.2816P(X = 2) = 45 \cdot 0.0625 \cdot (0.75)^8 \approx 0.2816. P(X=3)=1200.0156(0.75)70.2503P(X = 3) = 120 \cdot 0.0156 \cdot (0.75)^7 \approx 0.2503.

Sum 0.7759\approx 0.7759. So P(X4)0.2241P(X \ge 4) \approx 0.2241.

Example 3. XB(8,0.5)X \sim B(8, 0.5). Find E[X]E[X] and Var(X)\mathrm{Var}(X).

E[X]=80.5=4E[X] = 8 \cdot 0.5 = 4. Var(X)=80.50.5=2\mathrm{Var}(X) = 8 \cdot 0.5 \cdot 0.5 = 2.

Example 4. A factory produces items, 5%5\% defective. A box has 2020 items. PP(at most 22 defective)?

XB(20,0.05)X \sim B(20, 0.05). P(X2)=P(X=0)+P(X=1)+P(X=2)P(X \le 2) = P(X = 0) + P(X = 1) + P(X = 2).

P(X=0)=(0.95)200.3585P(X = 0) = (0.95)^{20} \approx 0.3585. P(X=1)=200.05(0.95)190.3774P(X = 1) = 20 \cdot 0.05 \cdot (0.95)^{19} \approx 0.3774. P(X=2)=1900.0025(0.95)180.1887P(X = 2) = 190 \cdot 0.0025 \cdot (0.95)^{18} \approx 0.1887.

Sum 0.9246\approx 0.9246.

Example 5. A drug works in 80%80\% of patients. Treated 55 patients. PP(all 5 recover)?

P(X=5)=(0.8)5=0.3277P(X = 5) = (0.8)^5 = 0.3277.

Example 6. Find nn so that for XB(n,0.3)X \sim B(n, 0.3), P(X1)0.95P(X \ge 1) \ge 0.95.

P(X1)=1(0.7)nP(X \ge 1) = 1 - (0.7)^n. Want 1(0.7)n0.951 - (0.7)^n \ge 0.95, so (0.7)n0.05(0.7)^n \le 0.05. Take logs: nln0.7ln0.05n \ln 0.7 \le \ln 0.05, so nln0.05/ln0.7=2.996/0.3578.4n \ge \ln 0.05 / \ln 0.7 = -2.996 / -0.357 \approx 8.4. So n=9n = 9.

Try it yourself

  1. XB(6,0.5)X \sim B(6, 0.5). Find P(X=2)P(X = 2).
  2. XB(10,0.3)X \sim B(10, 0.3). Find E[X],Var(X)E[X], \mathrm{Var}(X).
  3. Flip a fair coin 44 times. P(exactly 2 heads)P(\text{exactly 2 heads}).
  4. XB(5,0.4)X \sim B(5, 0.4). Find P(X1)P(X \le 1).
  5. A biased die (P(6)=1/6P(\text{6}) = 1/6) is rolled 44 times. P(at least one 6)P(\text{at least one 6}).
  6. 20%20\% of items are defective. Sample of 1010. P(exactly 2 defective)P(\text{exactly 2 defective}).
  7. MCQ with 2020 questions, 44 options. Random guessing. P(at least 5 correct)P(\text{at least 5 correct}).
  8. A basketball player has 80%80\% free-throw rate. Shoots 55 times. P(exactly 4 successful)P(\text{exactly 4 successful}).
  9. A drug cures 70%70\% of patients. Among 1010, P(all 10 cured)P(\text{all 10 cured}).
  10. XB(n,p)X \sim B(n, p) with mean 44 and variance 33. Find nn and pp.
  11. A coin is flipped 77 times. Find probability of "at least one heads and at least one tails."
  12. A factory: 1%1\% defective rate. Box of 5050 items. Probability of no defective items.
  13. Probability of rain on any given day is 0.40.4. Over a week (7 days), probability of rain on at least 5 days?
  14. A salesman makes 44 sales calls per day, each with 30%30\% chance of closing. P(exactly 2 sales)P(\text{exactly 2 sales}) on a given day.

Pitfalls and tricks

  • Identify the experiment as binomial first. Trials independent? Two outcomes? Same probability throughout?
  • (nk)\binom{n}{k} is the binomial coefficient, often called "nn choose kk": (nk)=n!k!(nk)!\binom{n}{k} = \dfrac{n!}{k!(n - k)!}.
  • Computing P(Xk)P(X \ge k) via complement is often faster: 1P(Xk1)1 - P(X \le k - 1).
  • E[X]=npE[X] = np and Var(X)=np(1p)\mathrm{Var}(X) = np(1-p) , memorise these. Note E[X]>Var(X)E[X] > \mathrm{Var}(X) always (since 1p<11 - p < 1).
  • Watch for boundary cases like "at least one" = 1(1p)n1 - (1-p)^n. Quick mental shortcut.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Binomial distribution
6 questions · pick the best answer
Q1

XB(n,p)X \sim B(n, p) requires trials to be

Q2

P(X=k)=P(X = k) =

Q3

XB(10,0.5)X \sim B(10, 0.5): E[X]=E[X] =

Q4

XB(10,0.5)X \sim B(10, 0.5): Var(X)=\mathrm{Var}(X) =

Q5

P(at least one success in n trials)=P(\text{at least one success in }n\text{ trials}) =

Q6

XB(3,0.5)X \sim B(3, 0.5): P(X=2)P(X = 2) is