Skip to main content

The Bernoulli distribution: WACE Year 12 Mathematics Methods Unit 3

Syllabus dot point

“Use the Bernoulli distribution to model a single two-outcome trial and find its mean and variance”

7 min read

Quick answer

A Bernoulli random variable models a single trial with two outcomes, success (X=1X=1) with probability pp and failure (X=0X=0) with probability 1−p1-p. Its mean is E(X)=pE(X)=p and its variance is Var(X)=p(1−p)\mathrm{Var}(X)=p(1-p). It is the building block of the binomial distribution.

Jump to a section
  1. What this dot point is asking
  2. The Bernoulli model
  3. Mean and variance
  4. Where the variance is largest
  5. Link to the binomial distribution
  6. Exam-style questions

What this dot point is asking

SCSA Unit 3 introduces the Bernoulli distribution as the simplest discrete model: one trial, two outcomes. This dot point asks you to state its distribution and derive its mean and variance, which then generalise directly to the binomial distribution. It supports questions in both examination sections.

The Bernoulli model

A Bernoulli trial has exactly two outcomes, conventionally labelled success and failure. The random variable XX records 11 for success and 00 for failure. This 00-or-11 coding is what makes the algebra so clean: the mean of XX turns out to be exactly the success probability, and because squaring 00 and 11 leaves them unchanged, the variance simplifies neatly as well. The Bernoulli distribution is the simplest possible non-trivial probability distribution, which is why the whole of discrete probability in the course can be built up from it.

The Bernoulli distribution

For a single trial with success probability pp,

P(X=1)=p,P(X=0)=1−p,P(X=1)=p, \qquad P(X=0)=1-p,

where 0≤p≤10\le p\le 1. This is written X∼Bernoulli(p)X\sim\mathrm{Bernoulli}(p).

Examples include a single coin toss (success = heads), one inspected item (success = defective), or one penalty kick (success = goal). The choice of which outcome to call "success" is a labelling decision; swapping the labels simply replaces pp with 1−p1-p. The variable is sometimes called an indicator variable, because it indicates whether the event of interest occurred, recording 11 if it did and 00 if it did not.

Mean and variance

Because XX takes only the values 00 and 11, the mean and variance follow directly from the definitions of expected value and variance.

The mean is

E(X)=0⋅(1−p)+1⋅p=p.E(X)=0\cdot(1-p)+1\cdot p = p.

For the variance, note that X2=XX^{2}=X since 02=00^{2}=0 and 12=11^{2}=1, so E(X2)=E(X)=pE(X^{2})=E(X)=p. Then

Var(X)=E(X2)−[E(X)]2=p−p2=p(1−p).\mathrm{Var}(X)=E(X^{2})-[E(X)]^{2}=p-p^{2}=p(1-p).

Bernoulli mean and variance

E(X)=p,Var(X)=p(1−p),SD(X)=p(1−p).E(X)=p, \qquad \mathrm{Var}(X)=p(1-p), \qquad \mathrm{SD}(X)=\sqrt{p(1-p)}.

Bernoulli mean and variance

Step 1: State the mean using the Bernoulli formula

A component is defective with probability p=0.05p=0.05, and X=1X=1 if defective. For any Bernoulli variable, the mean equals the success probability, so no calculation beyond substitution is needed:

E(X)=p=0.05.E(X)=p=0.05.

Step 2: Compute the variance using p(1−p)p(1-p)

The Bernoulli variance formula Var(X)=p(1−p)\mathrm{Var}(X)=p(1-p) follows from the shortcut E(X2)−[E(X)]2=p−p2E(X^2) - [E(X)]^2 = p - p^2. Substituting p=0.05p=0.05:

Var(X)=0.05×0.95=0.0475.\mathrm{Var}(X)=0.05\times 0.95 = 0.0475.

Step 3: Find the standard deviation

Taking the square root of the variance gives the standard deviation in the same units as XX:

σ=0.0475≈0.218.\sigma=\sqrt{0.0475}\approx 0.218.

Final answer: E(X)=0.05E(X)=0.05, Var(X)=0.0475\mathrm{Var}(X)=0.0475, σ≈0.218\sigma\approx 0.218

Where the variance is largest

The Bernoulli variance p(1−p)p(1-p) is a downward parabola in pp, zero at p=0p=0 and p=1p=1 and largest at p=0.5p=0.5, where it equals 0.250.25. This matches intuition: a trial that is almost certain to succeed (or fail) carries little uncertainty, while a fair trial is the least predictable. The same shape carries through to the binomial, whose variance np(1−p)np(1-p) is also maximised at p=0.5p=0.5 for fixed nn.

Variance across different success probabilities

Compare two Bernoulli trials

Trial A has p=0.5p=0.5; trial B has p=0.9p=0.9. Compare their variances.

For trial A,

Var(XA)=0.5×0.5=0.25.\mathrm{Var}(X_A)=0.5\times 0.5=0.25.

For trial B,
Var(XB)=0.9×0.1=0.09.\mathrm{Var}(X_B)=0.9\times 0.1=0.09.

Trial A is far more uncertain even though both are single trials, because its success probability sits at the peak of p(1−p)p(1-p). Markers reward both variance calculations and the observation that the fair trial has the larger spread.

A binomial random variable counts the number of successes in nn independent Bernoulli trials, each with the same pp. Adding nn independent Bernoulli variables gives the binomial, which is why the binomial mean npnp and variance np(1−p)np(1-p) are simply nn times the Bernoulli values. Understanding the single-trial case makes the binomial formulae intuitive rather than memorised.

Common errors
Using a variance formula with nn
For a single Bernoulli trial the variance is p(1−p)p(1-p), not np(1−p)np(1-p); the factor nn appears only for the binomial sum of trials.
Treating pp as the variance
pp is the mean of a Bernoulli variable; the variance is p(1−p)p(1-p).
Forgetting the variance is maximised at p=0.5p=0.5
Since p(1−p)p(1-p) peaks at p=0.5p=0.5, a fair trial has the most uncertainty.
Confusing the labels
By convention X=1X=1 is success with probability pp; mixing up which outcome is the success changes pp to 1−p1-p.

Exam-style questions

Questions in the style of SCSA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

WACE 2021-style4 marks
Calculator-free. A single random voter supports a policy with probability p=0.6p=0.6. Let X=1X=1 if the voter supports it and X=0X=0 otherwise. (a) State E(X)E(X) and Var(X)\mathrm{Var}(X). (b) Explain how this Bernoulli trial relates to the binomial distribution for a sample of nn voters.
Show worked answer →

A definition-and-link question.

(a) E(X)=p=0.6E(X)=p=0.6 and Var(X)=p(1−p)=0.6×0.4=0.24\mathrm{Var}(X)=p(1-p)=0.6\times 0.4=0.24.

(b) A sample of nn independent voters, each modelled by the same Bernoulli(0.6)(0.6) trial, gives a binomial variable counting total supporters. Summing nn independent Bernoulli variables produces B(n,0.6)\mathrm{B}(n,0.6) with mean npnp and variance np(1−p)np(1-p), that is nn times the single-trial values.

Markers reward stating E(X)=pE(X)=p and p(1−p)p(1-p) and explaining the binomial as a sum of nn Bernoulli trials.

WACE 2023-style3 marks
Calculator-free. For a Bernoulli random variable, show that the variance p(1−p)p(1-p) is greatest when p=0.5p=0.5, and state the maximum value.
Show worked answer →

A short reasoning question about the variance.

The variance V(p)=p(1−p)=p−p2V(p)=p(1-p)=p-p^{2}. Differentiating, V′(p)=1−2pV'(p)=1-2p, which is zero at p=0.5p=0.5. Since V′′(p)=−2<0V''(p)=-2<0, this is a maximum.

The maximum value is V(0.5)=0.5×0.5=0.25V(0.5)=0.5\times 0.5=0.25.

Markers reward differentiating p−p2p-p^{2}, solving V′(p)=0V'(p)=0, confirming a maximum, and the value 0.250.25.

Practise this

Sources & how we know this

ExamExplained