Skip to main content
Examonaut

Topic 4 · Lesson 1 of 4

Discrete distributions and the binomial

Random variables and discrete distributions

A random variable XX is a quantity whose value depends on chance, such as the score on a dice. Capital XX is the variable; lower-case xx is a particular value. It is discrete if it takes separate values (counts, scores) and continuous if it can take any value in a range (heights, times).

A probability distribution gives P(X=x)P(X = x) for every possible xx, and these probabilities must add up to 1. That fact lets you find unknowns. For example, if P(X=x)=kxP(X = x) = kx for x=1,2,3,4x = 1, 2, 3, 4, then k+2k+3k+4k=1k + 2k + 3k + 4k = 1, so k=110k = \frac{1}{10}, and P(X≥3)=310+410=0.7P(X \ge 3) = \frac{3}{10} + \frac{4}{10} = 0.7.

In a discrete uniform distribution, every value is equally likely, like the score on a fair dice: P(X=x)=16P(X = x) = \frac{1}{6} for x=1,…,6x = 1, \ldots, 6.

The binomial distribution: where it comes from

Suppose a basketball player scores each free throw with probability 0.3 and takes 10 throws. What is the probability of exactly 3 scores? One particular order, such as SSSFFFFFFF, has probability 0.33×0.770.3^3 \times 0.7^7. But the 3 scores could be any 3 of the 10 throws, and the number of ways to choose them is (103)=120\binom{10}{3} = 120 (see the binomial expansion). Each way has the same probability, so

P(X=3)=(103)0.33×0.77=0.267P(X = 3) = \binom{10}{3}0.3^3 \times 0.7^7 = 0.267

In general, if XX is the number of successes in nn trials, each with success probability pp, then X∼B(n,p)X \sim B(n, p) ("XX has a binomial distribution") and

P(X=r)=(nr)pr(1−p)n−r,r=0,1,…,nP(X = r) = \binom{n}{r}p^r(1 - p)^{n-r}, \quad r = 0, 1, \ldots, n

The bar chart shows the whole distribution B(10,0.3)B(10, 0.3). It peaks near 3, which is np=10×0.3np = 10 \times 0.3: on average you expect npnp successes.

x0123456789100.10.2P(X = x)X ~ B(10, 0.3)solid bars: P(X ≤ 3)

The conditions for a binomial model come straight from that derivation:

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

In context questions, you must say what these mean for the situation, for example "each seed germinates independently of the others, with the same probability".

Calculating binomial probabilities

For a single value use the formula or your calculator's binomial probability function. For ranges use the cumulative function, which gives P(X≤x)P(X \le x) (it is also in the tables in the formula booklet for some values of nn and pp). Every other range can be built from it:

  • P(X<4)=P(X≤3)P(X < 4) = P(X \le 3), because XX only takes whole numbers.
  • P(X≥4)=1−P(X≤3)P(X \ge 4) = 1 - P(X \le 3).
  • P(2≤X≤5)=P(X≤5)−P(X≤1)P(2 \le X \le 5) = P(X \le 5) - P(X \le 1).

Converting "at least", "more than" and "fewer than" into ≤\le is where most errors happen, so write each step down.

Try it: move n and p and see which bars make up P(X = r), P(X ≤ r) or P(X ≥ r), with the working.

Try it: simulation

Binomial distribution and hypothesis tests

Loading the simulation…

Worked example

Binomial calculationsAS standard

The probability that a seed germinates is 0.3, independently. Ten seeds are planted. Find the probability that a) exactly 3 germinate, b) at most 3 germinate, c) at least 4 germinate, d) between 2 and 5 inclusive germinate.

Show solution
  1. Let XX be the number that germinate: X∼B(10,0.3)X \sim B(10, 0.3).
  2. a) P(X=3)=120×0.33×0.77=0.2668P(X = 3) = 120 \times 0.3^3 \times 0.7^7 = 0.2668.
  3. b) P(X≤3)=0.6496P(X \le 3) = 0.6496 (cumulative function: the solid bars in the chart).
  4. c) P(X≥4)=1−P(X≤3)=0.3504P(X \ge 4) = 1 - P(X \le 3) = 0.3504.
  5. d) P(2≤X≤5)=P(X≤5)−P(X≤1)=0.9527−0.1493=0.8034P(2 \le X \le 5) = P(X \le 5) - P(X \le 1) = 0.9527 - 0.1493 = 0.8034.

Worked example

Finding nntop grade

A machine makes items, of which 10% are faulty, independently. How many items must be checked so that the probability of finding at least one faulty item is more than 0.95?

Show solution
  1. If nn items are checked, P(no faulty)=0.9nP(\text{no faulty}) = 0.9^n, so P(at least one)=1−0.9nP(\text{at least one}) = 1 - 0.9^n.
  2. Need 1−0.9n>0.951 - 0.9^n > 0.95, so 0.9n<0.050.9^n < 0.05.
  3. Take logs (dividing by ln⁡0.9\ln 0.9, which is negative, reverses the inequality): n>ln⁡0.05ln⁡0.9=28.4n > \frac{\ln 0.05}{\ln 0.9} = 28.4.
  4. So at least 29 items. Check: 0.928=0.0520.9^{28} = 0.052, 0.929=0.0470.9^{29} = 0.047 ✓.

Practise this topic

Both are part of Premium.