Skip to main content

The binomial distribution: definition, probability mass function, mean and variance

Syllabus dot point

“Define the binomial distribution B(n,p)B(n, p), state its probability mass function, and find its mean npn p and variance np(1−p)n p (1 - p)”

HSCMaths Extension 1Statistical Analysis (ME-S1)11 min read

Quick answer

The binomial distribution B(n,p)B(n, p) counts successes in nn independent Bernoulli trials with success probability pp; its pmf is P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}, mean is npn p, variance is np(1−p)n p (1 - p), and standard deviation is np(1−p)\sqrt{n p (1 - p)}.

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Exam-style questions

What this dot point is asking

NESA wants you to recognise scenarios that fit the binomial model (fixed number of independent Bernoulli trials with the same success probability), state the probability mass function, and compute the mean, variance and standard deviation.

The answer

Definition

Let XX be the number of successes in nn independent Bernoulli trials, each with success probability pp. Then XX has the binomial distribution B(n,p)B(n, p) (or Bin(n,p)\text{Bin}(n, p)).

The parameters are:

  • nn: the number of trials (a positive integer).
  • pp: the success probability on each trial (0≤p≤10 \le p \le 1).
  • q=1−pq = 1 - p: the failure probability.

The probability mass function

For k=0,1,2,…,nk = 0, 1, 2, \dots, n,

P(X=k)=(nk)pk(1−p)n−k.P(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}.

The binomial coefficient (nk)\binom{n}{k} counts the number of ways to arrange kk successes among nn trials.

Mean and variance

By summing nn independent Bernoulli trials (each with mean pp and variance p(1−p)p(1 - p)):

E(X)=np,Var(X)=np(1−p),σ=np(1−p).E(X) = n p, \qquad \text{Var}(X) = n p (1 - p), \qquad \sigma = \sqrt{n p (1 - p)}.

Key fact

For X∼B(n,p)X \sim B(n, p), the probability of exactly kk successes is P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}. The mean is E(X)=npE(X) = np, the variance is Var(X)=np(1−p)\text{Var}(X) = np(1 - p), and the standard deviation is σ=np(1−p)\sigma = \sqrt{np(1 - p)}. The binomial coefficient (nk)\binom{n}{k} counts the orderings of kk successes among nn trials; the powers pkp^k and (1−p)n−k(1 - p)^{n - k} give the probability of any one such ordering.

Conditions for the binomial model

Four conditions must hold:

  1. A fixed number of trials, nn.
  2. Each trial has exactly two outcomes (success or failure).
  3. The trials are independent.
  4. The probability of success is the same for every trial.

If any of these fails, the distribution is not binomial.

Common scenarios

  • Number of heads in nn coin flips: X∼B(n,p)X \sim B(n, p) with pp the heads probability.
  • Number of items defective in a batch of nn (with replacement, or with a large enough population to treat as approximately independent).
  • Number of correct answers on a multiple-choice test if every question is guessed.
  • Number of successful free throws in a fixed number of attempts (independence is a simplifying assumption).

Symmetric and skewed cases

  • If p=12p = \tfrac{1}{2}, the distribution is symmetric around n2\frac{n}{2}.
  • If p<12p < \tfrac{1}{2}, the distribution is right-skewed (long tail to the right).
  • If p>12p > \tfrac{1}{2}, it is left-skewed.

Binomial probability mass function for three values of p Three small bar charts of P X equals k against k for n equals ten trials. p equals zero point two is right skewed. p equals zero point five is symmetric. p equals zero point eight is left skewed. p = 0.2 p = 0.5 p = 0.8 Mean shifts with p; symmetric when p = 0.5; skewed otherwise.

The skew decreases as nn grows; for large nn, the binomial approaches the normal (see the normal approximation dot point).

Building one distribution, stage by stage

To see where the pmf, the mean and the variance come from, take a concrete case: a biased coin with p=0.4p = 0.4 flipped n=10n = 10 times, so X∼B(10,0.4)X \sim B(10, 0.4). The three panels build the whole distribution from the formula and then read its centre and spread off the picture.

Stage 1, compute a few probabilities from the formula. Each bar height is P(X=k)=(10k)(0.4)k(0.6)10−kP(X = k) = \binom{10}{k}(0.4)^k(0.6)^{10 - k}. For the first few values, P(X=0)=(0.6)10≈0.006P(X = 0) = (0.6)^{10} \approx 0.006, P(X=1)=(101)(0.4)(0.6)9≈0.040P(X = 1) = \binom{10}{1}(0.4)(0.6)^9 \approx 0.040, and P(X=2)=(102)(0.4)2(0.6)8≈0.121P(X = 2) = \binom{10}{2}(0.4)^2(0.6)^8 \approx 0.121. Each is one number from the same formula.

Binomial distribution B(10, 0.4)A bar chart of P(X equals k) for a binomial distribution with ten trials and success probability 0.4. The tallest bars are at k equals 4, near the mean of 4.kP(X = k)00.00610.04020.121345678910Stage 1Each bar height is P(X = k) from the formula nCr p^k q^(n-k); here k = 0, 1, 2.

Stage 2, fill in every kk to get the whole distribution. Repeating the formula for k=0,1,…,10k = 0, 1, \dots, 10 gives all eleven bars. Because the eleven probabilities are the terms of (0.6+0.4)10(0.6 + 0.4)^{10}, they sum to 110=11^{10} = 1: the distribution is complete and valid.

Binomial distribution B(10, 0.4)A bar chart of P(X equals k) for a binomial distribution with ten trials and success probability 0.4. The tallest bars are at k equals 4, near the mean of 4.kP(X = k)012345678910Stage 2Filling in every k from 0 to 10 gives the whole distribution; heights sum to 1.

Stage 3, read the centre and spread. The distribution is centred on its mean np=10×0.4=4np = 10 \times 0.4 = 4, marked by the dashed line, and its spread is governed by the variance np(1−p)=10×0.4×0.6=2.4np(1 - p) = 10 \times 0.4 \times 0.6 = 2.4 (standard deviation 2.4≈1.55\sqrt{2.4} \approx 1.55). With p<12p < \tfrac{1}{2} the tail leans to the right, exactly as the skew rule predicts.

Binomial distribution B(10, 0.4)A bar chart of P(X equals k) for a binomial distribution with ten trials and success probability 0.4. The tallest bars are at k equals 4, near the mean of 4.kP(X = k)012345678910mean np = 4Stage 3The distribution is centred on the mean np = 4; spread is set by npq = 2.4.

How exam questions ask about the binomial distribution

The binomial is one of the most reliable sources of marks in Extension 1 statistics, and the question wordings are stable:

  • "Let XX be the number of [successes] in nn [trials] ... find E(X)E(X), Var(X)\text{Var}(X) and the standard deviation": identify nn and pp, then quote npnp, np(1−p)np(1 - p) and its square root. State the model X∼B(n,p)X \sim B(n, p) first.
  • "Find the probability of exactly kk [successes]": substitute into (nk)pk(1−p)n−k\binom{n}{k} p^k (1 - p)^{n - k} and evaluate. Showing the substituted formula earns the method mark even before you reach the calculator.
  • "Explain why XX is (or is not) binomial": name the four conditions, fixed nn, two outcomes, independence, constant pp, and say which one fails. Sampling without replacement is the classic failure (the model becomes hypergeometric).
  • "Let Y=aX+bY = aX + b ... find E(Y)E(Y) and Var(Y)\text{Var}(Y)": apply E(aX+b)=aE(X)+bE(aX + b) = aE(X) + b and Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \text{Var}(X); the constant bb never touches the variance.
  • Distribution-shape parts: a sketch or a "describe the shape" cue wants you to mark the mean npnp and call the shape symmetric (if p=12p = \tfrac{1}{2}), right-skewed (p<12p < \tfrac{1}{2}) or left-skewed (p>12p > \tfrac{1}{2}).
Exam technique

Always open with the model in symbols, X∼B(n,p)X \sim B(n, p) with the actual numbers, so the marker sees you have read off nn and pp correctly; this single line is often worth a mark. For the mean and variance, write the formulas npnp and np(1−p)np(1 - p) before substituting, and do not forget the (1−p)(1 - p) factor that separates the variance from the mean. Take the standard deviation as the positive square root of the variance, and round only at the end. For a pmf value, leave the substituted expression (nk)pk(1−p)n−k\binom{n}{k}p^k(1 - p)^{n - k} visible before the decimal answer. If the question says "without replacement" or gives a small fixed population, stop and check independence: it is the trap that turns a binomial into something else.

Worked example

Identify the model and find the mean and variance

A coin lands heads with probability 0.60.6. It is flipped 2020 times. We have a fixed number of independent trials with a constant success probability, so the count XX follows a binomial distribution.

X∼B(20,0.6).X \sim B(20, 0.6).

Apply the formulas E(X)=npE(X) = np and Var(X)=np(1−p)\text{Var}(X) = np(1-p) directly:

E(X)=20⋅0.6=12,Var(X)=20⋅0.6⋅0.4=4.8.E(X) = 20 \cdot 0.6 = 12, \qquad \text{Var}(X) = 20 \cdot 0.6 \cdot 0.4 = 4.8.

Use the pmf for an exact probability

A multiple-choice quiz has 55 questions, each with 44 options. Guessing randomly gives success probability p=14=0.25p = \tfrac{1}{4} = 0.25 on each question, so X∼B(5,0.25)X \sim B(5, 0.25). To find P(X=3)P(X = 3), substitute n=5n = 5, k=3k = 3, p=0.25p = 0.25 into the pmf P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}:

P(X=3)=(53)(0.25)3(0.75)2=10⋅0.015625⋅0.5625≈0.0879.P(X = 3) = \binom{5}{3} (0.25)^3 (0.75)^2 = 10 \cdot 0.015625 \cdot 0.5625 \approx 0.0879.

The binomial coefficient 1010 counts the number of ways to place 33 correct answers among 55 questions.

Check whether the binomial conditions hold

An urn has 55 red and 55 blue marbles. Drawing 44 without replacement: the probability of red changes with each draw because removing a marble alters the composition. This violates the constant-pp condition. The number of red draws follows the hypergeometric distribution, not the binomial.

Verify all four conditions, then compute

A factory produces items with probability p=0.02p = 0.02 of being defective, independently, in a sample of n=100n = 100. All four conditions are satisfied: fixed n=100n = 100, two outcomes (defective or not), independence (stated), constant p=0.02p = 0.02. So X∼B(100,0.02)X \sim B(100, 0.02).

E(X)=100⋅0.02=2,Var(X)=100⋅0.02⋅0.98=1.96,σ=1.4.E(X) = 100 \cdot 0.02 = 2, \qquad \text{Var}(X) = 100 \cdot 0.02 \cdot 0.98 = 1.96, \qquad \sigma = 1.4.

Apply the pmf to a small case

Two independent flips of a coin with p=0.7p = 0.7. Here n=2n = 2 and we want P(X=1)P(X = 1). The binomial coefficient (21)=2\binom{2}{1} = 2 counts the two ways to get exactly one head (HT or TH):

X∼B(2,0.7),P(X=1)=(21)(0.7)(0.3)=2⋅0.21=0.42.X \sim B(2, 0.7), \qquad P(X = 1) = \binom{2}{1} (0.7)(0.3) = 2 \cdot 0.21 = 0.42.

Handle a linear transformation

Let Y=3X+5Y = 3X + 5 where X∼B(10,0.5)X \sim B(10, 0.5). The rules for linear transformations of a random variable are E(aX+b)=aE(X)+bE(aX + b) = aE(X) + b and Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \text{Var}(X). A constant added to a random variable shifts the mean but does not affect spread.

E(X)=10⋅0.5=5,Var(X)=10⋅0.5⋅0.5=2.5.E(X) = 10 \cdot 0.5 = 5, \qquad \text{Var}(X) = 10 \cdot 0.5 \cdot 0.5 = 2.5.

E(Y)=3⋅5+5=20,Var(Y)=9⋅2.5=22.5.E(Y) = 3 \cdot 5 + 5 = 20, \qquad \text{Var}(Y) = 9 \cdot 2.5 = 22.5.

Final answer: E(Y)=20E(Y) = 20 and Var(Y)=22.5\text{Var}(Y) = 22.5.

Common traps
Variance is np(1−p)n p (1 - p), not npn p
The variance formula has the 1−p1 - p factor.
Confusing nn and kk
nn is the fixed number of trials; kk is the (variable) number of successes.
Forgetting the binomial coefficient
(nk)\binom{n}{k} accounts for the ways the kk successes can be arranged.
Independence assumption broken
Sampling without replacement breaks independence and changes the model to hypergeometric.
Using the formula when pp varies between trials
If pp is not constant, the model is not binomial.

Exam-style questions

Questions in the style of NESA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

HSC-style3 marks
A biased coin lands heads with probability 0.40.4. It is flipped 1010 times. Let XX be the number of heads. Find E(X)E(X), Var(X)\text{Var}(X) and the standard deviation.
Show worked answer →

X∼B(10,0.4)X \sim B(10, 0.4).

E(X)=np=10⋅0.4=4E(X) = n p = 10 \cdot 0.4 = 4.

Var(X)=np(1−p)=10⋅0.4⋅0.6=2.4\text{Var}(X) = n p (1 - p) = 10 \cdot 0.4 \cdot 0.6 = 2.4.

Standard deviation: σ=2.4≈1.549\sigma = \sqrt{2.4} \approx 1.549.

Markers reward identifying the binomial model with n=10n = 10, p=0.4p = 0.4, applying the formulas, and the square root for σ\sigma.

Practise this

Sources & how we know this

ExamExplained