What a Bernoulli trial is
A Bernoulli trial has two possible outcomes. One is labelled success, with probability p. The other is failure, with probability 1 minus p. For a fair coin, calling heads a success gives p = 0.5.
A Bernoulli random variable X takes the value 1 for success and 0 for failure. Its expected value is p, and its variance is p(1 − p). For a fair coin, the variance is 0.5 × 0.5 = 0.25.
Independence and the multiplication rule
A sequence of trials is called independent when the result of one trial does not change the probabilities of the others. For independent trials, the probability of a specific sequence is the product of the individual probabilities. The probability of heads then heads on a fair coin is 0.5 × 0.5 = 0.25.
Independent trials with the same p are often called a Bernoulli process. The number of successes in n such trials follows the binomial distribution. Its probability of exactly k successes is C(n, k) × p^k × (1 − p)^(n − k), where C(n, k) counts the ways to choose which trials succeed.
Worked example: exactly two heads in four flips
Take n = 4 fair flips and k = 2. The number of arrangements is C(4, 2) = 6. Each specific arrangement, such as HHTT, has probability 0.5^4 = 0.0625.
The probability of exactly two heads is 6 × 0.0625 = 0.375. As a check, the probabilities for 0 to 4 heads are 1, 4, 6, 4 and 1 sixteenths. These sum to 16/16 = 1. The expected number of heads is np = 4 × 0.5 = 2.
Common misconceptions
The gambler's fallacy is the belief that after several heads, tails becomes more likely. With independent flips of a fair coin, the next flip is still 0.5 for each side. The coin has no memory.
Another error is expecting the counts to even out exactly. The law of large numbers says the proportion of heads tends toward p as n grows. The raw difference between heads and tails can still grow. Also, real coins are only approximately fair, and the model assumes p is known and constant.
Where Bernoulli trials show up
Any yes or no outcome with a stable probability can be modelled this way. Examples include a manufactured part passing or failing inspection, a patient responding or not responding to a treatment, and a survey respondent answering yes or no. The model needs independent trials and a constant p, so it fits poorly when those conditions fail.
Bernoulli trials also underlie hypothesis tests for proportions. For large n, the binomial distribution is approximated by the normal distribution, which makes calculations for many trials practical.
Key terms
- Bernoulli trial
- A random experiment with two outcomes, success with probability p and failure with probability 1 − p.
- Independence
- Events are independent when the occurrence of one does not change the probability of the other.
- Binomial distribution
- The distribution of the number of successes in n independent Bernoulli trials with the same p.
- Expected value
- The long-run average of a random variable. For a binomial count, it equals np.
- Gambler's fallacy
- The mistaken belief that past independent outcomes change the probability of the next one.
- Law of large numbers
- The result that the sample proportion of successes approaches p as the number of trials grows.
