# Discrete Random Variables

> Probability distributions, expected value, fair games, variance and standard deviation of a random variable.

From HSC Maths Advanced on WhizzNotes, free study notes for NSW students: https://whizznotes.com/mathematics-advanced/discrete-random-variables/. Updated 3 November 2026.
Year 11 and Year 12 boxes go deeper than the Year 10 text around them.

### Story time: The school fete game
At the school fete, Ms Patel runs a game. You pay 2 dollars and roll a die. Roll a 6 and you win 8 dollars. Anything else and you win nothing. Is the game fair, or is the school making money?

You cannot tell from one roll. But over hundreds of players, the results settle down to a predictable average. That long-run average is the **expected value**, and it tells the school exactly how much it should make.

**In short:** A discrete random variable takes separate values, like the number on a die, each with a probability, and the probabilities add to 1. Its expected value $E(X) = \sum x\,P(X = x)$ is the long-run average, and its variance measures the spread.

## Starting point: Years 9 and 10

### Relative frequency

If you repeat an experiment many times,

$$\text{relative frequency} = \frac{\text{number of times it happened}}{\text{number of trials}}$$

This gets closer to the true probability as the number of trials grows.

### Expected number of outcomes

$$\text{expected number} = \text{number of trials} \times \text{probability}$$

Roll a die 120 times and you expect about $120 \times \dfrac{1}{6} = 20$ sixes.

### Probability tables

A table can list every outcome and its probability. The probabilities must add to 1.

| Number of heads in 2 tosses | 0 | 1 | 2 |
|---|---|---|---|
| Probability | $\dfrac{1}{4}$ | $\dfrac{1}{2}$ | $\dfrac{1}{4}$ |

### Worked example: Is the fete game fair?
Out of 600 players, about 100 roll a 6 and win 8 dollars, so the school pays out 800 dollars. It collects $600 \times 2 = 1200$ dollars. Profit: 400 dollars, or about 67 cents per player. The game is not fair, but it is for a good cause.

### Key idea: Long run
Probability does not predict one result. It predicts what happens on average over many trials.

### Watch out: Probabilities must add to 1
If a table's probabilities do not add to 1, a value is missing or wrong. Use this to find an unknown.

### Calculator tip: Expected value from statistics mode
Switch on the frequency column, enter the values of $X$ in the first column and their probabilities in the frequency column. Then $\bar{x}$ is the expected value $E(X)$, and $(\sigma x)^2$ is the variance. It is a quick check on a hand calculation.

**Mind map**

```text
Discrete random variables
  Random variable X
    A number from chance
    Countable values
  Distribution
    Table of x and P(X = x)
    Adds to 1
  Expected value
    E(X) = Σ x P(x)
    Long-run average
    Fair game: E = 0
  Spread
    Var(X) = E(X²) - μ²
    σ = √Var(X)
  Changing X
    E(aX + b) = aE(X) + b
    Var(aX + b) = a²Var(X)
```

### Year 11: Random variables and expected value
A **random variable** $X$ is a number that depends on chance. It is **discrete** if it can only take separate values that you can list, such as 0, 1, 2.

The **expected value** (mean) of $X$ is

$$E(X) = \mu = \sum x \, P(X = x)$$

**Fete game.** Let $X$ be the net winnings. $X = 6$ (win 8 dollars minus the 2 dollar entry) with probability $\dfrac{1}{6}$, and $X = -2$ with probability $\dfrac{5}{6}$.

$$E(X) = 6 \times \frac{1}{6} + (-2) \times \frac{5}{6} = 1 - \frac{10}{6} = -\frac{2}{3}$$

Players lose about 67 cents each on average. A **fair game** has $E(X) = 0$.

**Finding an unknown.** If $P(X = 0) = 0.2$, $P(X = 1) = k$ and $P(X = 2) = 0.5$, then $k = 1 - 0.7 = 0.3$.

**Probabilities with unknowns.** If $X = 1, 2, 3$ has probabilities $k$, $2k$ and $3k$, then $6k = 1$ and $k = \frac{1}{6}$. If they are $p^2$, $p$ and $0.61$, then $p^2 + p - 0.39 = 0$, so $p = 0.3$ (a probability cannot be negative). A rule such as $P(X = x) = kx$ for $x = 1, 2, 3, 4$ works the same way: $k(1 + 2 + 3 + 4) = 1$, so $k = \frac{1}{10}$.

**Two unknowns.** If $X = 0, 1, 2$ has probabilities $0.2$, $a$ and $b$ with $E(X) = 1.1$, then $a + b = 0.8$ and $a + 2b = 1.1$, so $b = 0.3$ and $a = 0.5$.

**Conditional probability in a table.** $P(X \geq 3 \mid X > 1) = \dfrac{P(X \geq 3)}{P(X > 1)}$: restrict to the values with $X > 1$, then find the share of them with $X \geq 3$.

### Year 12: Variance and standard deviation
The **variance** measures how spread out $X$ is around its mean:

$$\text{Var}(X) = E\big((X - \mu)^2\big) = E(X^2) - \mu^2$$

where $E(X^2) = \sum x^2 P(X = x)$. The **standard deviation** is $\sigma = \sqrt{\text{Var}(X)}$.

**Example.** For the number of heads in 2 tosses: $\mu = 0 + \dfrac{1}{2} + \dfrac{2}{4} = 1$ and $E(X^2) = 0 + \dfrac{1}{2} + 1 = 1.5$. So $\text{Var}(X) = 1.5 - 1 = 0.5$ and $\sigma \approx 0.71$.

**Linear changes.** If $Y = aX + b$:

$$E(Y) = aE(X) + b \qquad \text{Var}(Y) = a^2\,\text{Var}(X)$$

Adding $b$ moves every value but does not change the spread. If prizes are tripled, the mean triples and the variance becomes 9 times bigger.

## Quick summary

- Relative frequency approaches probability over many trials. Expected number $= n \times p$.
- A probability distribution lists each value with its probability. They add to 1.
- $E(X) = \sum x\,P(X = x)$ is the long-run average. A fair game has $E(X) = 0$.
- $\text{Var}(X) = E(X^2) - \mu^2$ and $\sigma = \sqrt{\text{Var}(X)}$.
- $E(aX + b) = aE(X) + b$ and $\text{Var}(aX + b) = a^2\text{Var}(X)$.

## Quiz

Try these questions from the chapter quiz.

1. A coin is tossed 200 times. About how many heads do you expect?
   - A. 50
   - B. 100
   - C. 200
   - D. 150
   - Answer: B. 100. $200 \times \dfrac{1}{2}$.

2. A spinner lands on red 36 times in 120 spins. The relative frequency of red is:
   - A. 0.36
   - B. 0.3
   - C. 0.12
   - D. 3.3
   - Answer: B. 0.3. $\dfrac{36}{120} = 0.3$.

3. A die is rolled 300 times. About how many times do you expect a number less than 3?
   - A. 50
   - B. 100
   - C. 150
   - D. 200
   - Answer: B. 100. $P = \dfrac{2}{6}$, so $300 \times \dfrac{1}{3}$.

The whole chapter quiz is on the page, for signed-in students: https://whizznotes.com/mathematics-advanced/discrete-random-variables/#quiz
