Skip to content
M
hscscience Ext 1 · Y12
0/100daily goal
0
0
0 due
0
L1 · 0 XP
KJ
Your weak spots
Insights load after your first practice round.
Module 10 · L02 of 20 ~40 min ⚡ +90 XP available

The Bernoulli Random Variable

Flip one biased coin. Inspect one component. Ask one survey question with a yes/no answer. Every one of these is a single Bernoulli trial — a random variable that takes the value 1 (success) with probability $p$ or 0 (failure) with probability $1-p$. Master Bernoulli today, and the binomial distribution in the next lesson is just $n$ Bernoulli trials added together.

Today's hook — A biased coin lands heads with probability $p = 0.3$. Let $X = 1$ if heads, $X = 0$ if tails. Before reading on, write down (a) $E(X)$ and (b) $\text{Var}(X)$. What value of $p$ would maximise the variance? Compare your answer after card 05.
0/5QUESTS
01
Recall — your gut answer first
+5 XP warm-up

A single die is rolled. Let $X = 1$ if the result is a 6, and $X = 0$ otherwise. Before using any formula, write down (a) $P(X=1)$, (b) $E(X)$, and (c) describe in words what "variance of $X$" should measure.

auto-saved
02
The two moves for any Bernoulli problem
+5 XP to read

Every Bernoulli question rewards two habits: identify the single trial and its success, then apply the two formulas $E(X) = p$ and $\text{Var}(X) = p(1-p)$. The trap is recognising that something is a single Bernoulli trial rather than a larger experiment.

The name-the-success strategy: (1) confirm a single trial with exactly two outcomes, (2) define success precisely (e.g. "die shows 6"), (3) read off $p = P(\text{success})$, (4) apply $E(X) = p$ and $\text{Var}(X) = p(1-p)$.

$X \sim \text{Bernoulli}(p)$: $P(X=1) = p$, $P(X=0) = 1-p$, $E(X) = p$, $\text{Var}(X) = p(1-p)$

Single trial Define success Apply E, Var Sanity: 0 ≤ Var ≤ 0.25
$E(X) = p,\ \text{Var}(X) = p(1-p)$
Define "success" explicitly
"Defective", "heads", "passes the test" — any unambiguous binary outcome can be the success. Once defined, $p$ is fixed by the problem. Be precise: "I roll a 6" is different from "I roll an even number".
$\text{Var}(X) = p(1-p)$ is symmetric
Variance is the same for $p$ and $1-p$. It maximises at $p = 0.5$ (giving $\text{Var} = 0.25$) and vanishes at $p = 0$ or $p = 1$. Use this as a quick sanity check.
Standard deviation = $\sqrt{p(1-p)}$
The standard deviation $\sigma$ of a Bernoulli RV is just the square root of the variance. For $p = 0.5$: $\sigma = 0.5$. For $p = 0.1$: $\sigma = \sqrt{0.09} = 0.3$.
03
What you'll master
Know

Key facts

  • Bernoulli RV: $X \in \{0,1\}$ with $P(X=1) = p$ and $P(X=0) = 1-p$
  • $E(X) = p$
  • $\text{Var}(X) = p(1-p)$
  • Standard deviation $\sigma = \sqrt{p(1-p)}$
Understand

Concepts

  • Why the Bernoulli is the "atom" from which the binomial is built
  • Why variance is largest at $p = 0.5$ — the trial is most "surprising" there
  • How to interpret $E(X) = p$ as a long-run proportion of successes
Can do

Skills

  • Identify a real-world situation as a single Bernoulli trial
  • Compute $E(X)$, $\text{Var}(X)$, and $\sigma(X)$ from a given $p$
  • Derive $E(X)$ and $\text{Var}(X)$ from first principles using $\sum x p$ and $\sum (x-\mu)^2 p$
04
Key terms
Bernoulli trialA single experiment with exactly two outcomes — success (probability $p$) and failure (probability $1-p$).
Bernoulli random variable$X \sim \text{Bernoulli}(p)$: takes value 1 with probability $p$ and 0 with probability $1-p$. Notation: $X \sim B(1,p)$ — a binomial with one trial.
Success probability $p$The probability of the outcome you label "success". By choice, $0 \leq p \leq 1$.
Variance$\text{Var}(X) = E[(X-\mu)^2] = E(X^2) - [E(X)]^2$. For a Bernoulli RV this simplifies to $p(1-p)$.
Standard deviation$\sigma = \sqrt{\text{Var}(X)} = \sqrt{p(1-p)}$. Measures typical deviation of $X$ from its mean.
ME12-5NESA outcome: solves problems using appropriate statistical processes — including the use of Bernoulli and binomial distributions.
05
Defining the Bernoulli RV and deriving its mean
core concept

A Bernoulli random variable $X$ is the simplest non-trivial RV: it takes only two values, 0 and 1, with probabilities $1-p$ and $p$ respectively. The distribution table is:

$\begin{array}{c|cc} x & 0 & 1 \\ \hline P(X=x) & 1-p & p \end{array}$

Derivation of $E(X)$. Using the definition of expected value:

  • $E(X) = \displaystyle\sum_x x\,P(X=x) = 0\cdot(1-p) + 1\cdot p = p$.

Worked through the hook: A biased coin with $p = 0.3$. Then $E(X) = 0.3$ and $\text{Var}(X) = 0.3 \times 0.7 = 0.21$. The variance is maximised when $p = 0.5$ — you can see this by differentiating $p(1-p) = p - p^2$ to get $1 - 2p = 0$, so $p = 0.5$ and $\text{Var}_{\max} = 0.25$.

Connecting to binomial. If $Y = X_1 + X_2 + \cdots + X_n$ where each $X_i$ is an independent $\text{Bernoulli}(p)$, then $Y \sim B(n,p)$ — the binomial distribution. So Bernoulli is literally "binomial with $n=1$", and the binomial mean $np$ and variance $np(1-p)$ are simply $n$ copies of the Bernoulli versions.

A Bernoulli RV $X$: $P(X=0)=1-p$, $P(X=1)=p$. Results: $E(X)=p$; $\text{Var}(X)=p(1-p)$.

Pause — copy the Bernoulli distribution table, the derivation $E(X)=0\cdot(1-p)+1\cdot p=p$, and the result $\text{Var}(X)=p(1-p)$ into your book.

Quick check: A fair coin is tossed once. Let $X = 1$ if heads, $X = 0$ if tails. What is $\text{Var}(X)$?

06
Deriving $\text{Var}(X) = p(1-p)$
core concept

We just saw that a Bernoulli RV $X$ has $E(X)=p$, derived from $E(X)=0\cdot(1-p)+1\cdot p=p$. That raises a question: how do you compute $\text{Var}(X)$ for this simplest random variable, and why does the formula $p-p^2=p(1-p)$ emerge? This card answers it → since $X\in\{0,1\}$, $X^2=X$, so $E(X^2)=p$, and $\text{Var}(X)=p-p^2=p(1-p)$.

To prove the variance formula, use $\text{Var}(X) = E(X^2) - [E(X)]^2$.

Step 1. Compute $E(X^2)$. Since $X \in \{0,1\}$ we have $X^2 = X$, so:

$E(X^2) = 0^2(1-p) + 1^2(p) = p$

Step 2. Substitute into the variance formula:

$\text{Var}(X) = E(X^2) - [E(X)]^2 = p - p^2 = p(1-p)$

The clever step is recognising $X^2 = X$ for a 0/1 variable, which makes $E(X^2) = E(X) = p$ and the algebra collapses to $p - p^2$. Alternatively, using the direct definition: $\text{Var}(X) = (0-p)^2(1-p) + (1-p)^2 p = p^2(1-p) + (1-p)^2 p = p(1-p)[p + (1-p)] = p(1-p)$.

Common mistake. Students sometimes write $\text{Var}(X) = p^2(1-p)$ or $\text{Var}(X) = p(1-p)^2$, picking up only one term of the sum. The correct formula is symmetric: $\text{Var}(X) = p(1-p)$, the same value if you swap "success" and "failure".

To prove the variance formula, use $\text{Var}(X) = E(X^2) - [E(X)]^2$.

Pause — copy the variance proof: because $X^2=X$ for $X\in\{0,1\}$, we get $E(X^2)=p$, so $\text{Var}(X)=E(X^2)-[E(X)]^2=p-p^2=p(1-p)$ into your book.

Did you get this? True or false: for $X \sim \text{Bernoulli}(p)$ with $p = 0.8$, the variance is $0.8 \times 0.2 = 0.16$, and the standard deviation is $0.4$.

PROBLEM 1 · BASIC BERNOULLI

A factory produces light bulbs. The probability that any individual bulb is defective is $p = 0.05$. Let $X = 1$ if a randomly chosen bulb is defective, $X = 0$ otherwise. Find (a) $E(X)$, (b) $\text{Var}(X)$, (c) $\sigma(X)$.

1
$X \sim \text{Bernoulli}(0.05)$ since the trial is binary and $P(X=1) = 0.05$.
Recognise the situation as a single Bernoulli trial. Define success explicitly: "bulb is defective" $\Rightarrow X=1$.
PROBLEM 2 · DERIVATION FROM FIRST PRINCIPLES

A random variable $X$ takes value 1 with probability $p$ and 0 with probability $1-p$. Using the definitions $E(X) = \sum x P(X=x)$ and $\text{Var}(X) = \sum (x - \mu)^2 P(X=x)$, derive expressions for $E(X)$ and $\text{Var}(X)$.

1
$E(X) = 0\cdot(1-p) + 1\cdot p = p$. So $\mu = p$.
Apply the definition directly: multiply each value by its probability and add.
PROBLEM 3 · INTERPRETING MEAN AND VARIANCE

A multiple-choice question has 5 options with exactly one correct answer. A student guesses at random. Let $X = 1$ if the guess is correct, $X = 0$ otherwise. Find $E(X)$ and $\sigma(X)$, and interpret each in plain language.

1
$P(X=1) = 1/5 = 0.2$, so $X \sim \text{Bernoulli}(0.2)$.
Identify $p$ from the problem: a random guess from 5 options has $p = 1/5$.

Fill the gap: A single die is rolled. Let $X = 1$ if the result is a 6, $X = 0$ otherwise. Then $X \sim \text{Bernoulli}(1/6)$, $E(X) = 1/6$, and $\text{Var}(X) = \dfrac{1}{6}\cdot\dfrac{5}{6} = \dfrac{}{36}$.

Trap 01
Writing $\text{Var}(X) = p^2$ or $\text{Var}(X) = p$
A Bernoulli variance is always $p(1-p)$, not $p^2$ and not $p$. The most common slip is forgetting the $(1-p)$ factor, which makes the variance equal to the mean — that is only true for a Poisson distribution, not a Bernoulli. Memorise the symmetric form $p(1-p)$.
Trap 02
Mixing up variance and standard deviation
Variance is $p(1-p)$; standard deviation is $\sqrt{p(1-p)}$. For $p = 0.5$ they happen to look similar ($0.25$ vs $0.5$), but for $p = 0.1$ they are very different ($0.09$ vs $0.3$). Always check whether the question asks for variance or standard deviation.
Trap 03
Treating a multi-trial scenario as Bernoulli
Bernoulli describes one trial. If the problem rolls a die 10 times and asks for the number of sixes, that is binomial $B(10, 1/6)$ — not Bernoulli. Bernoulli applies only when exactly one trial occurs. The binomial is what you get when you add several Bernoullis together.

Did you get this? True or false: $\text{Var}(X)$ for a Bernoulli RV is maximised when $p = 1$.

Work mode · how are you completing this lesson?
1

A biased coin lands heads with probability $p = 0.4$. Let $X = 1$ if heads, $X = 0$ if tails. Find $E(X)$, $\text{Var}(X)$, and $\sigma(X)$.

2

For what value of $p$ is the variance of a Bernoulli RV maximised, and what is that maximum value? Justify by differentiating $p(1-p)$.

3

A pollster asks a random voter whether they support party A. The proportion of party-A supporters in the population is $0.55$. Let $X = 1$ if the voter supports party A, $X = 0$ otherwise. Find $E(X)$ and $\sigma(X)$.

4

Use the formula $\text{Var}(X) = E(X^2) - [E(X)]^2$ to verify that $\text{Var}(X) = p(1-p)$ for a Bernoulli RV. (Hint: $X^2 = X$.)

5

If $X \sim \text{Bernoulli}(p)$ with $\sigma(X) = 0.3$, find the two possible values of $p$.

Odd one out: Three of these statements about $X \sim \text{Bernoulli}(0.3)$ are correct. Which one is NOT?

11
Revisit your thinking

Earlier you considered a biased coin with $p = 0.3$ and were asked for $E(X)$, $\text{Var}(X)$, and which value of $p$ maximises the variance.

The answers are $E(X) = 0.3$ and $\text{Var}(X) = 0.3 \times 0.7 = 0.21$. The variance is maximised at $p = 0.5$, giving $\text{Var}_{\max} = 0.25$. The intuition: when the trial is most "balanced" (50/50), the outcome is most uncertain, so the spread is greatest. When $p$ is close to 0 or 1, the outcome is almost certain and the variance shrinks toward 0.

auto-saved
01
Multiple choice
+5 XP per correct · +25 XP all-correct

Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.

02
Short answer
ApplyBand 32 marks

Q1. Let $X \sim \text{Bernoulli}(0.7)$. Find $E(X)$ and $\text{Var}(X)$. (2 marks)

auto-saved
ApplyBand 43 marks

Q2. A factory's defect rate is $p$. Let $X = 1$ if a randomly chosen item is defective. Show from first principles that $\text{Var}(X) = p(1-p)$. (3 marks)

auto-saved
AnalyseBand 53 marks

Q3. A Bernoulli random variable $X$ has $\sigma(X) = 0.4$. (i) Find $\text{Var}(X)$. (ii) Hence find the two possible values of $p$. (iii) For each value, state $E(X)$. (3 marks)

auto-saved
Comprehensive answers (click to reveal)

Activity answers:

1. $E(X) = 0.4$. $\text{Var}(X) = 0.4 \times 0.6 = 0.24$. $\sigma = \sqrt{0.24} \approx 0.490$.

2. $\dfrac{d}{dp}[p - p^2] = 1 - 2p = 0 \Rightarrow p = 0.5$. Maximum variance $= 0.5 \times 0.5 = 0.25$.

3. $E(X) = 0.55$. $\text{Var}(X) = 0.55 \times 0.45 = 0.2475$. $\sigma = \sqrt{0.2475} \approx 0.497$.

4. $X \in \{0,1\} \Rightarrow X^2 = X$, so $E(X^2) = E(X) = p$. Therefore $\text{Var}(X) = E(X^2) - [E(X)]^2 = p - p^2 = p(1-p)$. $\square$

5. $\sigma^2 = 0.09 = p(1-p) \Rightarrow p^2 - p + 0.09 = 0$. Quadratic formula: $p = \dfrac{1 \pm \sqrt{1 - 0.36}}{2} = \dfrac{1 \pm \sqrt{0.64}}{2} = \dfrac{1 \pm 0.8}{2}$, giving $p = 0.9$ or $p = 0.1$.

Q1 (2 marks): $E(X) = 0.7$ [1]. $\text{Var}(X) = 0.7 \times 0.3 = 0.21$ [1].

Q2 (3 marks): $E(X) = 0(1-p) + 1(p) = p$ [1]. $\text{Var}(X) = (0-p)^2(1-p) + (1-p)^2 p = p^2(1-p) + (1-p)^2 p$ [1] $= p(1-p)[p + (1-p)] = p(1-p)(1) = p(1-p)$. $\square$ [1]

Q3 (3 marks): (i) $\text{Var}(X) = 0.4^2 = 0.16$ [1]. (ii) $p(1-p) = 0.16 \Rightarrow p^2 - p + 0.16 = 0 \Rightarrow p = \dfrac{1 \pm \sqrt{1 - 0.64}}{2} = \dfrac{1 \pm 0.6}{2}$, so $p = 0.8$ or $p = 0.2$ [1]. (iii) $E(X) = 0.8$ or $E(X) = 0.2$ correspondingly [1].

01
Boss battle · The Bernoulli Gauntlet
earn bronze · silver · gold

Five timed questions on Bernoulli mean, variance, standard deviation, and first-principles derivations. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.

⚔ Enter the arena
02
Science Jump · platform challenge

Climb platforms by answering Bernoulli questions. Lighter alternative to the boss.

Mark lesson as complete

Tick when you've finished the practice and review.

🎓
Want help with The Bernoulli Random Variable?

Work through this topic 1-on-1 with an experienced HSC tutor.

Book a free session →