Skip to main content

Binomial distribution calculator

Type n and p and choose the probability you need. Fractions like 1/6 are fine. The answer is the exact sum of the binomial probabilities, never an approximation.

P(X ≤ 5) = 0.416
Mean np
6.00
Variance np(1 − p)
4.20
Standard deviation
2.05
Graph loads here
Show the working

X ~ B(20, 0.3): 20 independent trials, each a success with probability 0.3.

P(X = r) = 20Cr × 0.3r × 0.720 − r

P(X ≤ 5) = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5)

= 0.000798 + 0.00684 + 0.0278 + 0.0716 + 0.130 + 0.179 = 0.416

Mean E(X) = np = 6.00; variance Var(X) = np(1 − p) = 4.20.

Answers are rounded to 3 significant figures, which is what IB papers ask for unless a question says otherwise.

How to do it by hand

  1. Check the conditions: a fixed number of trials n, each a success or a failure, independent, with the same probability p each time.
  2. For one value, use P(X = r) = ⁿCᵣ pʳ (1 − p)ⁿ⁻ʳ.
  3. For “at most”, add the probabilities from 0 up to r (your calculator's binomial CD does this). For “at least r”, use 1 − P(X ≤ r − 1).

Worked example

A basketball player scores 70% of her free throws, independently. She takes 12 free throws. Find the probability that she scores at least 10.

Solution

X ~ B(12, 0.7): 12 independent trials, each a success with probability 0.7.

P(X = r) = 12Cr × 0.7r × 0.312 − r

Add the probabilities from 10 up to 12, or use the complement: one minus the probabilities from 0 to 9.

P(X ≥ 10) = 1 − P(X ≤ 9) = 1 − 0.747 = 0.253

Mean E(X) = np = 8.40; variance Var(X) = np(1 − p) = 2.52.

Answer: P(X ≥ 10) = 0.253

Every number in this example is worked out by the same code as the tool above, and the code is tested against independent results from Python's SciPy library.

Where you need it

Where it is used in IB Maths
AA SLBinomial distribution.
AA HLBinomial distribution.
AI SLBinomial distribution.
AI HLBinomial distribution.

On your calculator

In the exam you use your own calculator, so practise it too. Our guides give the exact keystrokes for the Casio fx-CG50, TI-Nspire CX II and TI-84 Plus CE, with a worked example to check against:

Common mistakes

Questions students ask

When can I use the binomial distribution?

When there is a fixed number of independent trials, each with two outcomes (success or failure) and the same probability of success each time. Write X ~ B(n, p) and say what X counts.

What are the mean and variance of a binomial distribution?

The mean is np and the variance is np(1 − p). The tool shows both, with the standard deviation.

Why are P(X < 5) and P(X ≤ 5) different?

X can only be a whole number, so P(X < 5) stops at 4 while P(X ≤ 5) includes P(X = 5). Rewrite every inequality with ≤ before you use a cumulative function.

More maths tools