In general, the formula for obtaining r successes in n trials is given by the Binomial formula
or distribution:
P(r) = nCr pr (1-p)n-r
n!
where nCr =
r! n r !
(Note r often used for a random variable in discrete distributions, rather than x). The
Binomial distribution tends to occur when a number of independent trials (e.g. tosses of a
coin) take place, where each trial can only end in ‘success’ or ‘failure’ and the probability of
success does not vary from trial to trial.
We can calculate the probabilities of r = 1, 2, etc. when p = ½, n = 8 using the Binomial
formula, and graph the resulting probability distribution:
Binomial distribution, p = 0.5, n = 8
0.3
0.25
0.2
0.15
0.1
0.05
0
0 1 2 3 4 5 6 7 8
Mean and variance of the Binomial distribution
The Binomial distribution has a mean and variance, just like any empirical distribution. For
the case of two tosses it is easy to calculate1.
E(r) = P(r) r = 0.250 + 0.51 + 0.252 = 1
On average, you would ‘expect’ one head in two tosses.
In general, E(r) = np for the Binomial distribution, so E(r) = 2 0.5 = 1. For eight tosses, we
expect 8 0.5 = 4 heads.
The variance of the outcome is given by the formula:
V(r) = Er²Er²
Exercise – prove this).
1
For instruction on E and V notation, see the appendix at the end of these notes.
Er² P(r) r² = 0.250² + 0.51² + 0.252² = 1.5
Hence V(r) = 1.5 - 1² = 0.5
In general, V(r) = np(1-p) for the Binomial distribution. V(r) = 2 0.5 0.5 = 0.5.
We can write in shorthand notation that r ~ B(n, p). r is distributed Binomially with n trials
and probability of success p in each trial. n and p are the parameters of the distribution.
The shape of the distribution alters as n and p change.