What is a Bernoulli trial, and what are its mean and variance?
Define a Bernoulli random variable, compute its mean and variance, and recognise scenarios that fit the model
A focused answer to the HSC Maths Extension 1 dot point on Bernoulli trials. The definition, mean p, variance p(1−p), and the role of Bernoulli trials as the building block of the binomial distribution.
✦ Generated by Claude Opus 4.8·10 min answer·
Reviewed by: AI editorial process; not yet individually human-reviewed
NESA wants you to recognise a Bernoulli trial (a single experiment with two outcomes), state its probability mass function, compute its mean and variance, and see it as the unit of a sequence used to build the binomial distribution.
The answer
Definition
A Bernoulli trial is a random experiment with exactly two possible outcomes, conventionally labelled "success" (value 1) and "failure" (value 0), where success occurs with probability p and failure with probability q=1−p.
If X is a Bernoulli random variable with parameter p (written X∼B(p) or Bern(p)):
P(X=1)=p,P(X=0)=1−p.
The whole distribution is just two bars: a bar of height q=1−p at x=0 and a bar of height p at x=1. Because something must happen, the two heights add to 1, which is the only consistency check a Bernoulli variable needs.
Mean (expected value)
E(X)=1⋅p+0⋅(1−p)=p.
The expected value of a single Bernoulli trial is its success probability.
Variance
E(X2)=12⋅p+02⋅(1−p)=p.
Var(X)=E(X2)−[E(X)]2=p−p2=p(1−p).
Equivalently, σ=p(1−p).
Standard examples
Flipping a fair coin with X=1 if heads: p=21.
Rolling a die and checking for a 6: p=61.
Asking a random voter if they support a policy with p unknown.
A medical test giving a positive result on someone with the condition (sensitivity).
Why this matters
A Bernoulli trial is the simplest non-trivial random variable. The binomial distribution counts the number of successes in a fixed number of independent Bernoulli trials.
A sequence of n independent identically distributed Bernoulli trials, where Xi=1 if the i-th trial is a success and 0 otherwise, has total S=X1+X2+⋯+Xn∼B(n,p).
By linearity of expectation, E(S)=np. By independence and the variance addition rule, Var(S)=np(1−p).
Recognising a Bernoulli model
The examinable judgement is whether a described situation fits the Bernoulli model at all. Three conditions must hold: there is a single trial (or you are looking at one trial in a sequence), there are exactly two outcomes, and a fixed probability p is attached to success. If the experiment has three or more outcomes, or a continuous range of outcomes, it is not Bernoulli. Where an outcome with many categories is reframed as "the event of interest happened, or it did not", a Bernoulli model is recovered. This reframing (success versus everything-else) is how almost every binomial question is built.
From one trial to many
The reason this small model matters is that it is the atom from which the binomial distribution is built. Each of n independent, identically distributed Bernoulli trials contributes its mean p and variance p(1−p), and because expectation is linear and variance adds for independent variables, the totals are np and np(1−p). Understanding that the binomial mean and variance are just n copies of the Bernoulli mean and variance removes any need to memorise them as separate facts.
Where the variance is largest, stage by stage
A favourite short proof question asks you to show that Var(X)=p(1−p) is greatest at p=21. The variance is a function of p, and seeing its shape makes the result obvious before you differentiate anything. The three panels build that picture up.
Stage 1, pin down the certain cases. At p=0 failure is guaranteed and at p=1 success is guaranteed; either way the outcome is certain, so there is no spread and Var(X)=0(1−0)=0 and 1(1−1)=0. The variance curve must therefore touch zero at both ends of the interval [0,1].
Stage 2, fill in the shape between the ends. Because Var(X)=p−p2 is a quadratic with a negative leading coefficient, it is a downward parabola. Pinned to 0 at each end and opening downward, it must bulge up in the middle: uncertainty is small near the certain ends and grows as the two outcomes become more evenly matched.
Stage 3, locate the peak. By symmetry of a parabola the maximum sits exactly halfway between the roots, at p=21. Differentiating confirms it: dpd(p−p2)=1−2p=0 gives p=21, and the second derivative −2<0 makes it a maximum. The peak value is 21⋅21=41, so a fair trial (p=21) is the most uncertain Bernoulli trial of all.
How exam questions ask about Bernoulli trials
Bernoulli rarely gets a question to itself; it is usually the setup line of a binomial question, or a short part that tests whether you know the parameters and formulas. The wordings to recognise:
"A Bernoulli random variable has P(X=1)=…" or "a single trial succeeds with probability p": state E(X)=p and Var(X)=p(1−p) and substitute. These are usually 1 to 2 mark recall parts.
"Show that the variance is greatest / maximised when p=21": differentiate V(p)=p−p2, set V′(p)=0, and confirm a maximum with V′′(p)=−2<0 before stating V(21)=41.
"Does this situation fit a Bernoulli model?" or "explain why X is (not) a Bernoulli variable": check the three conditions out loud, that there is one trial, exactly two outcomes, and a fixed p. Continuous quantities (a time, a height) and three-or-more-outcome experiments are not Bernoulli unless reframed as "event happened or it did not".
"X counts successes in n trials": this is the cue that you have left a single Bernoulli trial and entered the binomial; the mean becomes np and the variance np(1−p).
Exam-style practice questions
Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
HSC 20232 marksA Bernoulli random variable X has P(X=1)=0.4. Find E(X) and Var(X).
Show worked answer →
For a Bernoulli variable, E(X)=p and Var(X)=p(1−p).
Here p=0.4, so E(X)=0.4.
Var(X)=0.4×0.6=0.24.
HSC 20203 marksA Bernoulli trial has success probability p. Show that the variance is greatest when p=21, and state the maximum variance.
Show worked answer →
The variance is V(p)=p(1−p)=p−p2, a downward parabola in p.