Before the method: the idea behind it

Counting successes

An enormous number of real situations reduce to the same shape: something is tried repeatedly, each attempt either works or it doesn’t, and you want to know how many will work. Free throws, quality control, medical tests, opinion polls. One distribution handles all of them, and it is the last piece of machinery you need before statistical inference in Term 3.

One trial, two outcomes

Start with the simplest possible random variable: something happens, or it doesn’t.

Call the outcome you are counting a success, with probability p, and everything else a failure, with probability 1 − p. Let X be 1 for a success and 0 for a failure. That is a Bernoulli random variable, and its whole distribution fits in two lines.

Its mean and variance come straight out of last lesson’s formulas, and both are worth memorising because the binomial builds on them.

\[ E(X)=0(1-p)+1(p)=p, \qquad \text{Var}(X)=E(X^2)-\left[E(X)\right]^2=p-p^2=p(1-p) \]

Note that E(X²) equals p as well, because 0² = 0 and 1² = 1 leave the values unchanged. That is what makes the variance collapse so neatly.

“Success” carries no judgement: if you are counting faulty items, a faulty item is the success. Deciding what counts as a success, and getting p to match it, is the first move in every question in this lesson.

Many trials, and why the formula looks like it does

Now repeat the trial n times, independently, with p unchanged each time, and count the successes.

Take 5 free throws with p = 0.6 and ask for the probability of exactly 3 successes. One way it could happen is success, success, success, fail, fail, whose probability is 0.6 × 0.6 × 0.6 × 0.4 × 0.4, that is 0.6³ × 0.4². But so does fail, success, fail, success, success, with probability 0.4 × 0.6 × 0.4 × 0.6 × 0.6, which multiplies out to exactly the same number.

Every arrangement with 3 successes has the same probability. So the total is that probability multiplied by the number of arrangements, and counting arrangements is what the combination \(\binom{n}{x}\) does.

Press the button to see different arrangements of 3 successes in 5 trials. The probability is identical every time.

This arrangement: 0.6³ × 0.4² = 0.03456
Arrangements seen: 1 of 10

Teal is a success, rose is a failure.

\[ P(X=x)=\binom{n}{x}p^x(1-p)^{n-x}, \qquad \binom{n}{x}=\frac{n!}{x!\,(n-x)!} \]

Read the formula as three parts: \(p^x\) for the successes, \((1-p)^{n-x}\) for the failures, and \(\binom{n}{x}\) for the number of ways to arrange them. Written compactly, this is \(X\sim\text{Bin}(n,p)\), and stating n and p explicitly is the first line of any solution.

Three conditions must hold before you may use it: a fixed number of trials, exactly two outcomes each time, and independence with p constant throughout. Drawing cards without replacement fails the last condition, because p changes as the deck depletes.

The shape, the centre and the spread

Change n and p and watch what happens to the distribution.

P(X = x)
X ~ Bin(10, 0.50)
Mean np: 5.00
Standard deviation: 1.581

The dashed line marks the mean. Notice it sits at the tallest bar, or between the two tallest.

Three things to notice. With p = 0.5 the distribution is symmetric. Push p towards 0 or 1 and it becomes lopsided, bunching against the end. And as n grows the shape becomes smoother and more bell-like, which is the hint that connects this topic to the normal distribution next term.

The centre and spread have short formulas, which follow from adding up n independent Bernoulli variables:

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

The mean is exactly what intuition says: 8 free throws at 60% should produce about 4.8 goals. The variance being np(1 − p) explains something less obvious, that uncertainty is greatest when p is near 0.5 and shrinks as p approaches either extreme. A 99% reliable machine is predictable; a coin flip is not.

Where this shows up in real life

Quality control

A factory samples 50 items and counts defectives. If the true defect rate is 2%, the binomial distribution says how many defectives are normal and how many should trigger an investigation. Shutting a line down needs a number, and this is where it comes from.

Medical testing and polling

A test with 95% accuracy applied to 200 patients, or a poll of 1000 voters, are both binomial. In Term 3 you will run this in reverse: from the observed count, estimate the unknown p and say how confident you are. That is statistical inference, and it rests on this distribution.

What to reach for

The question asks for…Use
exactly x successesBinomial PDf, or the formula by hand
at most x, at least x, or between two valuesBinomial CDf with the right bounds
at least one success1 − P(X = 0), far quicker than adding
the mean or standard deviationnp and √(np(1−p))
n or p given the mean and varianceSolve np and np(1−p) simultaneously
the smallest n for a given probabilitySet up the inequality and solve, or use a table

Next: the working method, twenty practice questions, ten harder ones, and the ClassPad guide covering binomialPDf, binomialCDf and finding n.