Uni-Sine
MathematicsStatistics

The binomial distribution

The binomial distribution is the probability distribution of the number of successes in a fixed number of independent trials, when each trial has the same chance of success. If X is the number of successes in n trials with probability p, we write X ~ B(n, p), and the probability of exactly r successes is P(X = r) = ⁿCᵣ pʳ(1 − p)ⁿ⁻ʳ. Its mean is np and its variance is np(1 − p).

What is a binomial distribution?

Many situations come down to repeating the same yes-or-no experiment: flipping a coin, planting seeds that do or don't germinate, testing items that are or aren't faulty. Each repeat is a trial, one of the two outcomes is called a success, and the other a failure. The binomial distribution tells you the probability of getting 0, 1, 2 and so on up to n successes.

"Success" doesn't have to mean something good. If you are counting faulty items, a faulty item is the success.

051015202530350123456
B(6, 0.3): the probability of each number of successes, as a percentage

This bar chart shows X ~ B(6, 0.3): 6 trials with a 30% chance of success each time. The most likely outcomes are 1 and 2 successes, close to the mean of 6 × 0.3 = 1.8. Because p is less than 0.5 the distribution is skewed, with a tail to the right. When p = 0.5 a binomial distribution is symmetrical.

Conditions for a binomial distribution

A random variable X follows a binomial distribution when all four of these are true:

  1. There is a fixed number of trials, n.
  2. Each trial has only two outcomes, success or failure.
  3. The trials are independent: one result doesn't affect another.
  4. The probability of success, p, is the same for every trial.

X is then the number of successes. Exam questions often ask you to state the assumptions you made, in context: for example, "each seed germinates independently of the others, with the same probability 0.8".

SituationBinomial?Why
Number of sixes in 30 rolls of a fair diceYesn = 30, two outcomes, independent rolls, p = 1/6 each time
Number of red cards in 5 cards dealt from one packNoWithout replacement, p changes after each card
Number of rolls until the first sixNoThe number of trials isn't fixed (this is a geometric distribution)
Number of people in a large town sample of 50 who are left-handedApproximatelySampling without replacement, but the population is so large that p hardly changes

Check your understanding.

practice
Pick an answer, then check it.
A bag has 4 red and 6 blue counters. You pick three counters and keep each one out of the bag after you look at it. Why is the number of red counters not binomial?

The binomial distribution formula

P(X = r) = \binom{n}{r} p^r (1 - p)^{n - r}
  • n is the number of trials and r the number of successes, from 0 to n.
  • p is the probability of success on one trial, and 1 − p (sometimes written q) the probability of failure.
  • pʳ(1 − p)ⁿ⁻ʳ is the probability of one particular order with r successes and n − r failures.
  • ⁿCᵣ counts how many different orders there are. It is the same number as in the binomial expansion, which is where the distribution gets its name.

Where the formula comes from

Take three trials and count two successes. The orders are SSF, SFS and FSS. Each has probability p × p × (1 − p), and there are ³C₂ = 3 of them, so P(X = 2) = 3p²(1 − p). The formula does the same counting for any n and r.

Example 1: exactly r successes

Each seed in a packet germinates with probability 0.8, independently. Twelve seeds are planted. Find the probability that exactly 10 germinate.

Let X be the number that germinate, so X ~ B(12, 0.8):

P(X = 10) = \binom{12}{10} (0.8)^{10} (0.2)^2 = 66 \times 0.10737 \times 0.04 = 0.2835

Example 2: at least

Find the probability that at least 11 seeds germinate. "At least 11" means 11 or 12:

P(X \geq 11) = \binom{12}{11}(0.8)^{11}(0.2) + (0.8)^{12} = 0.2062 + 0.0687 = 0.2749

Cumulative binomial probabilities

A cumulative probability adds up every outcome up to a value: P(X ≤ r). Your calculator's binomial cumulative function (or the statistical tables in the formula booklet) gives these directly. Every other kind of question can be turned into P(X ≤ something):

You wantRewrite as
P(X ≤ r)P(X ≤ r), straight from the calculator
P(X < r)P(X ≤ r − 1)
P(X ≥ r)1 − P(X ≤ r − 1)
P(X > r)1 − P(X ≤ r)
P(a ≤ X ≤ b)P(X ≤ b) − P(X ≤ a − 1)

Because X can only take whole numbers, the difference between < and ≤ matters: P(X < 5) and P(X ≤ 5) are different.

Example 3: between two values

X ~ B(16, 0.45). Find P(6 ≤ X ≤ 10).

P(6 \leq X \leq 10) = P(X \leq 10) - P(X \leq 5) = 0.9514 - 0.1976 = 0.7538

Note that it is P(X ≤ 5) you subtract, not P(X ≤ 6), because 6 is included in the answer. The binomial distribution calculator guide shows how to get each kind of probability from the Probability Calculator, step by step.

Now try one yourself in this question from the Probability course.

Use the binomial formula to find a probability to 3 decimal places.

Press Mark to have your answer marked in the Probability course.

Mean, variance and standard deviation

For X ~ B(n, p):

E(X) = np \qquad \text{Var}(X) = np(1 - p) \qquad \sigma = \sqrt{np(1 - p)}

The mean is what you would expect on average: 12 seeds with p = 0.8 give a mean of 12 × 0.8 = 9.6 germinating. The variance is 12 × 0.8 × 0.2 = 1.92, so the standard deviation is √1.92 ≈ 1.39. The AQA formula booklet gives both np and np(1 − p).

Example 4: finding n and p

A binomial random variable has mean 4.8 and variance 2.88. Find n and p.

Divide the variance by the mean: np(1 − p) ÷ np = 1 − p = 2.88 ÷ 4.8 = 0.6, so p = 0.4. Then n = 4.8 ÷ 0.4 = 12.

Example 5: how many trials?

5% of the bolts from a machine are faulty, independently of each other. How many bolts must an inspector check so that the probability of finding at least one faulty bolt is more than 0.95?

The chance that none of n bolts is faulty is 0.95ⁿ, so the chance of finding at least one is 1 − 0.95ⁿ. We need 0.95ⁿ < 0.05. Taking logs, n > ln 0.05 ÷ ln 0.95 = 58.4. Check: with 58 bolts the probability is 0.949, and with 59 it is 0.952. So the inspector must check 59 bolts.

Binomial distribution vs normal distribution

BinomialNormal
Type of dataDiscrete: whole numbers 0 to nContinuous: any value
Parametersn and pMean μ and variance σ²
ShapeSymmetrical only when p = 0.5Always symmetrical, bell shaped
Typical useCounting successes in trialsMeasurements such as heights and masses
Probability of one exact valueCan be large, e.g. P(X = 2)Always 0, so use ranges

The normal approximation to the binomial

When n is large and p is close to 0.5, the bars of a binomial distribution follow a bell shape, and B(n, p) can be approximated by a normal distribution with the same mean and variance, N(np, np(1 − p)). The Pearson Edexcel A level specification includes this approximation and expects a continuity correction: each whole number r is treated as the interval from r − 0.5 to r + 0.5.

For example, if X ~ B(100, 0.5), then np = 50 and np(1 − p) = 25, so use Y ~ N(50, 5²). P(X ≤ 45) becomes P(Y < 45.5):

z = \frac{45.5 - 50}{5} = -0.9 \qquad P(Y < 45.5) = 0.1841

The exact binomial answer is also 0.1841 to 4 decimal places. Without the continuity correction you would get 0.1587, which is noticeably wrong. With modern calculators you can usually find binomial probabilities exactly, but the approximation shows why the normal distribution fits so many counts. See the normal distribution guide for more.

Hypothesis testing with the binomial distribution

At A-level the binomial distribution is used to test a claim about a probability. Suppose you think a coin is biased towards heads. You flip it 20 times and get 15 heads.

  1. Hypotheses: H₀: p = 0.5 (the coin is fair) and H₁: p > 0.5 (biased towards heads). This is a one-tailed test.
  2. Model: assuming H₀ is true, X ~ B(20, 0.5), where X is the number of heads.
  3. Probability: P(X ≥ 15) = 1 − P(X ≤ 14) = 0.0207.
  4. Compare: 0.0207 < 0.05, so the result is significant at the 5% level.
  5. Conclude in context: reject H₀. There is evidence at the 5% level that the coin is biased towards heads.

AQA A-level Maths covers this in O1 and O2, including critical regions and p-values.

Common mistakes

  • Using a binomial when p changes, for example when sampling without replacement from a small group.
  • Leaving out ⁿCᵣ. pʳ(1 − p)ⁿ⁻ʳ alone is the probability of one particular order.
  • Getting the cumulative boundary wrong. P(X ≥ 5) is 1 − P(X ≤ 4), not 1 − P(X ≤ 5).
  • Mixing up variance and standard deviation. np(1 − p) is the variance; take the square root for σ.
  • Forgetting the continuity correction when approximating with a normal distribution.
  • Stating assumptions without context. Say what the trials are, for example "the seeds germinate independently".

Practice questions

X ~ B(9, 0.25).

  1. Find P(X = 2).
  2. Find the mean and variance of X.
  3. Find P(X ≥ 1).
  4. Explain why the number of girls in a group of 4 children chosen from a class of 10 girls and 12 boys is not exactly binomial.

Answers: 1) ⁹C₂ × 0.25² × 0.75⁷ = 36 × 0.0625 × 0.1335 = 0.3003. 2) Mean 2.25, variance 1.6875. 3) 1 − 0.75⁹ = 0.9249. 4) The children are chosen without replacement from a small class, so the probability of a girl changes after each choice.

Practise with a short timed paper

The binomial distribution and hypothesis testing come up in A-level Maths statistics. The daily A-level Maths: Statistics paper is a short timed paper of 8 questions, with a new one every day.

Common questions

What is a binomial distribution?
The distribution of the number of successes in a fixed number of independent trials, each with the same probability of success. It is written X ~ B(n, p).
What are the conditions for a binomial distribution?
A fixed number of trials, two outcomes per trial, independent trials, and the same probability of success each time.
What is the formula for the binomial distribution?
P(X = r) = ⁿCᵣ pʳ(1 − p)ⁿ⁻ʳ, where n is the number of trials, r the number of successes and p the probability of success.
What is the mean and variance of a binomial distribution?
The mean is np and the variance is np(1 − p). The standard deviation is the square root of the variance.
When can you use a normal approximation to the binomial?
When n is large and p is close to 0.5. Use N(np, np(1 − p)) with a continuity correction.
What is the difference between binomial and normal distributions?
A binomial distribution is discrete and counts successes from 0 to n; a normal distribution is continuous and models measurements.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Probability Calculator

    Visualise probability distributions and events

    Open the tool
  • Learn it

    Probability

    Distributions, expected values and the maths behind uncertainty

    Start the course
  • Test it

    A-level Maths: Statistics

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · StatisticsBinomial distribution calculator: exactly, at most, at leastFind binomial probabilities: exactly, at most, at least or between, with the mean and standard deviation, a bar chart and worked examples.