James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AA HL › Topic 4: Statistics & probability › Binomial distribution

Binomial distribution

When to use the binomial distribution, finding binomial probabilities on the TI-Nspire, and its mean and variance.

SL 4.8SL + HL extensionPaper 1Paper 2≈ 45 min to work through
Before you start: discrete random variables and nCr. See Discrete random variables and Binomial theorem.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Know the conditions for a binomial distributionSL 4.8
  • Use the notation X~B(n,p)SL 4.8
  • Find P(X=r), P(X≤r) and P(X≥r) with the TI-NspireSL 4.8
  • Use E(X)=np and Var(X)=np(1−p)SL 4.8
  • Solve problems such as finding the number of trials neededSL 4.8

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

2.1 What the binomial distribution models

The big idea

You do the same thing n times. Each time it either works or it does not, and the chance of it working is always p. The binomial distribution tells you how likely each possible number of successes is.

Situations like this come up everywhere: the number of heads in 10 coin flips, the number of faulty phones in a box of 20, the number of questions a student gets right by guessing on a multiple-choice test. In each case a random variable X counts the successes, so it can take the values 0,1,2,…,n.

"Success" just means the outcome you are counting. It does not have to be a good thing: if you are counting seeds that fail to grow, a seed failing is a "success".

We write X~B(n,p), read as "X follows a binomial distribution with n trials and probability of success p". The model only works when all four of these are true:

  • A fixed number of trials, n. You know in advance how many times you will do it.
  • Two outcomes per trial: success or failure.
  • The same probability of success, p, on every trial.
  • Independent trials: one result does not affect the next.

Is each of these binomial?

  • The number of sixes in 20 rolls of a fair die. Yes: X~B(20,16).
  • The number of rolls until the first six. No: the number of trials is not fixed.
  • The number of red cards when 3 cards are taken, without replacement, from 10 cards of which 4 are red. No: the probability of red changes after each card is taken.
  • The number of left-handed students in a class of 25, if 10% of people are left-handed. Yes, as a model: X~B(25, 0.1), assuming students are independent of each other.

2.2 Where the formula comes from

A basketball player scores a free throw with probability 0.7. She takes 3 shots. What is the probability she scores exactly 2?

Write S for a score and F for a miss. There are three ways to get exactly 2 scores: SSF, SFS and FSS. Because the shots are independent, each of these has probability 0.7×0.7×0.3=0.147. So

P(X=2)=3×0.147=0.441

The same thinking works in general. Any one particular order with r successes and n−r failures has probability pr(1−p)n−r. The number of different orders is the number of ways of choosing which r of the n trials are the successes, which is nCr.

Binomial probability Not in booklet: learn it
X~B(n,p):P(X=r)=nCrpr(1−p)n−r,r=0,1,…,n
Link: why is it called "binomial"?

The probabilities P(X=0),P(X=1),…,P(X=n) are exactly the terms of the binomial expansion of [(1−p)+p]n. That is where the name comes from. Since (1−p)+p=1, the expansion equals 1n=1, so the probabilities add up to 1, as they must. See Binomial theorem.

Worked example 1 (faded)Paper 1
X~B(4, 0.5). Find P(X=2) without a calculator.
4C2(0.5)2(0.5)2=6× 1/16  ← you work this out
= 3/8  ← you work this out

2.3 Single values and cumulative probabilities

P(X=r) is the probability of exactly r successes: one bar on the bar chart in the Explore it section. Many questions ask about several values at once, such as "at most 3" or "at least 5". You then add up several bars. This is called a cumulative probability.

The words matter. Since X only takes whole-number values, "fewer than 3" means 0, 1 or 2:

In wordsIn symbolsOn the calculator
exactly 3X=3Binomial Pdf
at most 3, no more than 3X≤3Binomial Cdf from 0 to 3
fewer than 3, less than 3X≤2Binomial Cdf from 0 to 2
at least 3, 3 or moreX≥3Binomial Cdf from 3 to n
more than 3X≥4Binomial Cdf from 4 to n

For "at least" questions, it is often quicker to use the complement: everything that is not included. For example P(X≥3)=1−P(X≤2), because the values 0, 1, 2 are the only ones left out.

On your TI-Nspire Calculator tricks →

Calculator page: menu → 6: Statistics → 5: Distributions → Binomial Pdf for P(X=r), or Binomial Cdf for P(a≤X≤b). Enter n, p and the value(s). For P(X≥r), use Binomial Cdf with lower bound r and upper bound n.

Worked example 2Paper 2
X~B(10, 0.3). Find (a) P(X=4) (b) P(X≤2) (c) P(X≥3).
(a) Binomial Pdf with n=10, p=0.3, x=4: 0.200
(b) Binomial Cdf from 0 to 2: 0.383
(c) P(X≥3)=1−P(X≤2)=1−0.383=0.617
Or Binomial Cdf from 3 to 10.

2.4 Mean and variance

If you flip a fair coin 10 times, you expect about 5 heads. If a seed fails with probability 0.15 and you plant 20, you expect about 20×0.15=3 to fail. In general, the expected number of successes is np.

The expected value does not have to be a whole number. If X~B(50, 0.25), then E(X)=12.5. You will never get 12.5 successes, but over many repetitions the average number of successes will be close to 12.5.

Mean and variance In formula booklet
E(X)=npVar(X)=np(1−p)

The variance measures how spread out the results are. The standard deviation is np(1−p). For a fixed n, the spread is largest when p=0.5, because then the outcome is hardest to predict. When p is close to 0 or 1, almost every trial goes the same way, so the results are tightly bunched. Try this in the Explore it section.

Why does this work?

Think of one trial on its own. It gives 1 success with probability p and 0 with probability 1−p, so its mean is 1×p+0×(1−p)=p. Its variance works out to be p(1−p). A binomial variable is the total of n of these independent trials, and for independent trials both the means and the variances add up. That gives np and np(1−p).

Worked example 3Paper 1
X~B(20, 0.15). Find E(X) and the standard deviation of X.
E(X)=20×0.15=3
Var(X)=20×0.15×0.85=2.55
Standard deviation =2.55=1.60
Give 3 significant figures.

2.5 At least one

"At least one" questions are very common. The quick way is the complement: the opposite of "at least one success" is "no successes at all".

P(X≥1)=1−P(X=0)=1−(1−p)n

This also lets you work backwards and find how many trials are needed. You get an inequality with n in the power. Solve it with logarithms or a table of values on the calculator, then round up, because n must be a whole number and the condition must be met.

Worked example 4Paper 2
A light bulb fails with probability 0.2. How many bulbs are needed so that the probability that at least one fails is more than 0.95?
P(at least one)=1−0.8n>0.95
0.8n<0.05⇒n>ln0.05ln0.8=13.4
n=14
Round up, and check: 1−0.813=0.945, 1−0.814=0.956.

The inequality sign flips when dividing by ln0.8, because ln0.8 is negative. Checking the two whole numbers either side, as above, avoids this trap.

3Explore it

Change n and p. Choose whether to shade P(X=r), P(X≤r) or P(X≥r).

★HL extension

Extra depth for HL: harder worked examples and HL-standard exam questions.

HL binomial questions work backwards (find n and p from the mean and variance, or the least n for a probability condition) and combine the binomial with conditional probability.

Finding n and p

Worked example H1Paper 1
X~B(n,p) with E(X)=6 and Var(X)=4.2. Find n and p.
np(1−p)np=1−p=4.26=0.7
Divide the variance by the mean.
p=0.3, n=60.3=20
Worked example H2Paper 2
A component fails with probability 0.1. Find the least number of components to test so that the probability of at least one failure exceeds 0.99.
1−0.9n>0.99⇒0.9n<0.01
n>ln0.01ln0.9=43.7
n=44

Conditional binomial probabilities

Worked example H3Paper 2
X~B(10,0.2). Find P(X≥2∣X≥1).
P(X≥2)P(X≥1)
=0.624190.89263=0.699
The event X≥2 is inside X≥1, so the intersection is just X≥2.

HL exam-style questions

Question 1Paper 1[4 marks]

X~B(n,p) with mean 4 and variance 3.2.

  • (a)Find p.[2]
  • (b)Find n.[2]
(a)
1−p=3.24M1
p=0.2A1
(b)
0.2n=4M1
n=20A1
Question 2Paper 2[5 marks]

In a large population, 20% of people have a certain gene. A random sample of 10 people is taken.

  • (a)Find the probability that at least one person has the gene.[2]
  • (b)Given that at least one person has the gene, find the probability that at least two do.[3]
(a)
1−0.810M1
0.893A1
(b)
P(X≥2)P(X≥1)M1
0.6240.893A1
0.699A1

4Common mistakes & exam tips

Common mistakes

  • Using Binomial Pdf when the question needs a cumulative probability ("at most", "fewer than").
  • Treating "fewer than 3" as X≤3: it is X≤2.
  • Calculating P(X≥3) as 1−P(X≤3): it is 1−P(X≤2).
  • Using a binomial model when trials are not independent (e.g. without replacement from a small group).

Exam tips

  • Write the distribution and the probability statement, e.g. X~B(20,0.15), P(X≥5)=0.170.
  • Translate the words: "at most 3" X≤3; "more than 3" X≥4; "at least 3" X≥3.
  • The standard deviation is np(1−p).

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
X~B(8, 0.25). Find P(X=2).
0.311
FluencyP2
X~B(8, 0.25). Find P(X≥1).
1−0.758=0.900
FluencyP3
X~B(8, 0.25). Find P(X≤3).
0.886
FluencyP4
Find E(X) for X~B(50, 0.2).
10
Problem solvingP5
A fair die is rolled 12 times. Find the probability of exactly two sixes, and of at least two sixes.
X~B(12,16): P(X=2)=0.296; P(X≥2)=0.619.
Problem solvingP6
Each item is faulty with probability 0.2. Find the smallest sample size for which the probability of at least one faulty item exceeds 0.95.
1−0.8n>0.95⇒n=14

6Exam-style questions

Original questions in the style of the IB exam, with full markschemes. Give yourself about 1 minute per mark.

Question 1Paper 2[8 marks]

15% of seeds of a certain type fail to grow. 20 seeds are planted. Let X be the number that fail.

  • (a)Write down the distribution of X.[1]
  • (b)Find P(X=3).[2]
  • (c)Find the probability that at most 2 seeds fail.[2]
  • (d)Find the probability that at least 5 seeds fail.[2]
  • (e)Find the expected number of seeds that fail.[1]
(a)
X~B(20, 0.15)A1
(b)
Binomial PdfM1
0.243A1
(c)
P(X≤2)M1
0.405A1
(d)
1−P(X≤4)M1
0.170A1
(e)
3A1
Question 2Paper 2[4 marks]

A fair die is rolled n times. Find the least value of n for which the probability of at least one six is greater than 0.9.

1−(56)n>0.9M1 A1
n>12.6A1
n=13A1
Question 3Paper 1[4 marks]

X~B(4, 0.5).

  • (a)Find P(X=2).[2]
  • (b)Write down E(X).[1]
  • (c)Find Var(X).[1]
(a)
4C2(0.5)4M1
38A1
(b)
2A1
(c)
1A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real IB questions. Your school or teacher will have these papers.

PaperQuestionFocusDifficulty
May 2023 · TZ2 · Paper 2Q3Normal weights of rice, then a binomial count★☆☆
May 2024 · TZ1 · Paper 2Q6Rainfall probabilities using the binomial distribution★★☆
May 2024 · TZ2 · Paper 2Q5Find least n so that binomial probability exceeds a given threshold★★☆
May 2025 · TZ2 · Paper 2Q10Solve normal and binomial probability problems about apple weights★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake