Skip to main content

Discrete random variables, expected value and variance (VCE Maths Methods Unit 2)

Syllabus dot point

“Define a discrete random variable and its probability distribution, and compute expected value (mean) and variance for given distributions”

7 min read

Quick answer

A discrete random variable lists values xix_i with probabilities pip_i that sum to 1. The expected value (mean) is E[X]=∑xipiE[X]=\sum x_i p_i and the variance is Var(X)=E[X2]−(E[X])2\text{Var}(X)=E[X^2]-(E[X])^2, with standard deviation Var(X)\sqrt{\text{Var}(X)}.

Jump to a section
  1. What this dot point is asking
  2. Discrete random variable
  3. Expected value (mean)
  4. Variance
  5. Linearity of expected value
  6. Finding unknown probabilities
  7. Functions of a random variable
  8. In one sentence
  9. Examples in context
  10. Try this
  11. Exam-style questions

What this dot point is asking

VCAA wants you to define a discrete random variable, write down its probability distribution, and compute its expected value (mean) and variance.

Discrete random variable

A random variable XX is discrete if it takes a countable set of values (often integers).

The probability distribution of XX lists each possible value xix_i with its probability pi=P(X=xi)p_i = P(X = x_i). Requirements:

  • 0≤pi≤10 \le p_i \le 1 for all ii.
  • ∑pi=1\sum p_i = 1.

Expected value (mean)

E[X]=μ=∑ixi piE[X] = \mu = \sum_{i} x_i \, p_i

The expected value is the probability-weighted average. It is the long-run mean of many independent observations of XX.

For a fair six-sided die: E[X]=(1+2+3+4+5+6)/6=3.5E[X] = (1 + 2 + 3 + 4 + 5 + 6)/6 = 3.5. Not one of the possible outcomes, but the long-run average.

Variance

Var(X)=σ2=E[(X−μ)2]=∑i(xi−μ)2pi\text{Var}(X) = \sigma^2 = E[(X - \mu)^2] = \sum_i (x_i - \mu)^2 p_i

Equivalent computational form:

Var(X)=E[X2]−(E[X])2\text{Var}(X) = E[X^2] - (E[X])^2

where E[X2]=∑xi2piE[X^2] = \sum x_i^2 p_i.

Standard deviation: σ=Var(X)\sigma = \sqrt{\text{Var}(X)}.

Linearity of expected value

For constants a,ba, b:

E[aX+b]=aE[X]+bE[aX + b] = a E[X] + b

For two independent random variables X,YX, Y: E[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y].

Variance is not linear in the same way: Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \text{Var}(X).

Finding unknown probabilities

A frequent exam task gives a distribution containing one or two unknown probabilities and a piece of information such as the value of E[X]E[X]. Two equations then pin down the unknowns: the probabilities must sum to 11, and the expected value (or another given) supplies a second linear relation. Solving the pair simultaneously is routine algebra, but you must remember to apply the "sum to one" condition, which students often omit. Once the distribution is complete, variance and standard deviation follow from the usual formulas.

Functions of a random variable

For constants aa and bb, the expected value is linear: E[aX+b]=aE[X]+bE[aX + b] = aE[X] + b, because adding a constant shifts every value and scaling stretches them. Variance behaves differently: Var(aX+b)=a2 Var(X)\text{Var}(aX + b) = a^2\,\text{Var}(X), since adding a constant does not change spread (so bb disappears) while scaling by aa stretches deviations by aa and hence variance by a2a^2. The standard deviation scales by ∣a∣|a|. These transformation rules are examinable and let you read off the mean and spread of a rescaled variable without recomputing the whole distribution.

Expected value of a lottery ticket

Step 1: Define the random variable

A lottery ticket costs $10\$10 and pays a prize of $1000\$1000 with probability 0.0050.005. Let XX be the net profit: X=990X = 990 (the $1000\$1000 prize less the $10\$10 cost) with probability 0.0050.005, and X=−10X = -10 with probability 0.9950.995. Expressing XX as net profit rather than gross receipt keeps the economics transparent and avoids having to subtract the ticket price later.

Step 2: Apply the expected-value formula

E[X]=990×0.005+(−10)×0.995E[X] = 990 \times 0.005 + (-10) \times 0.995. The expected value multiplies each outcome by its probability and sums; note that the probabilities 0.005+0.995=10.005 + 0.995 = 1 as required for a valid distribution.

Step 3: Evaluate

E[X]=4.95−9.95=−5.00E[X] = 4.95 - 9.95 = -5.00. The arithmetic is straightforward once each product is computed separately before combining.

Step 4: Interpret

The expected net result is a loss of $5\$5 per ticket, the defining feature of a negative-expected-value game. This does not mean every player loses exactly $5\$5; it means that over a large number of tickets the average loss converges to $5\$5 per ticket.

Common traps
Confusing E[X2]E[X^2] with (E[X])2(E[X])^2
These differ by exactly the variance, so never substitute one for the other.
Forgetting probabilities must sum to 11
Check (and use) this condition before computing, especially when solving for unknowns.
Treating E[X]E[X] as a typical outcome
It is the long-run average and need not be one of the possible values.
Reporting a negative variance
Variance is always non-negative; a negative result signals an arithmetic error.

In one sentence

A discrete random variable has a probability distribution listing each value xix_i with probability pip_i (summing to 11); the expected value is E[X]=∑xipiE[X] = \sum x_i p_i (the probability-weighted mean) and the variance is Var(X)=E[X2]−(E[X])2\text{Var}(X) = E[X^2] - (E[X])^2 (with standard deviation Var(X)\sqrt{\text{Var}(X)}).

Examples in context

Example 1. Expected payout on a carnival game. A stall charges $2\$2 to spin a wheel. The wheel pays $5\$5 with probability 0.20.2, $1\$1 with probability 0.30.3, and $0\$0 with probability 0.50.5. Let XX be the payout. Then E[X]=5(0.2)+1(0.3)+0(0.5)=1.0+0.3=$1.30E[X] = 5(0.2) + 1(0.3) + 0(0.5) = 1.0 + 0.3 = \$1.30. Since the player pays $2\$2 but expects only $1.30\$1.30 back, the expected loss per play is $0.70\$0.70, the stall's average profit.

Example 2. Insurance expected cost. An insurer covers a $2000\$2000 claim that occurs with probability 0.030.03 in a year; otherwise the cost is $0\$0. Let CC be the claim cost. Then E[C]=2000(0.03)+0(0.97)=$60E[C] = 2000(0.03) + 0(0.97) = \$60. To break even the insurer must charge at least $60\$60 in premium (before expenses), the expected value of the random cost.

Try this

Q1. A variable XX has P(X=0)=0.5P(X = 0) = 0.5, P(X=1)=0.3P(X = 1) = 0.3, P(X=2)=0.2P(X = 2) = 0.2. Find E[X]E[X]. [2 marks]

  • Cue. 0(0.5)+1(0.3)+2(0.2)=0.70(0.5) + 1(0.3) + 2(0.2) = 0.7.

Q2. For the same distribution, find Var(X)\text{Var}(X). [3 marks]

  • Cue. E[X2]=0+1(0.3)+4(0.2)=1.1E[X^2] = 0 + 1(0.3) + 4(0.2) = 1.1; Var(X)=1.1−0.72=1.1−0.49=0.61\text{Var}(X) = 1.1 - 0.7^2 = 1.1 - 0.49 = 0.61.

Q3. A game gives net winnings XX: +$8+\$8 with probability 0.250.25, −$3-\$3 with probability 0.750.75. (a) Find E[X]E[X]. (b) Is the game favourable to the player? [2+1 marks]

  • Cue. (a) 8(0.25)−3(0.75)=2−2.25=−$0.258(0.25) - 3(0.75) = 2 - 2.25 = -\$0.25. (b) No; negative expected value.

Exam-style questions

Questions in the style of VCAA 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.

Practice4 marks
A discrete random variable XX has distribution P(X=1)=0.4P(X=1) = 0.4, P(X=2)=0.3P(X=2) = 0.3, P(X=3)=0.2P(X=3) = 0.2, P(X=4)=0.1P(X=4) = 0.1. Find (a) E[X]E[X] and (b) Var(X)\text{Var}(X).
Show worked answer →

(a) Expected value. E[X]=1(0.4)+2(0.3)+3(0.2)+4(0.1)=0.4+0.6+0.6+0.4=2.0E[X] = 1(0.4) + 2(0.3) + 3(0.2) + 4(0.1) = 0.4 + 0.6 + 0.6 + 0.4 = 2.0.

(b) Variance. Compute E[X2]E[X^2] first.

E[X2]=1(0.4)+4(0.3)+9(0.2)+16(0.1)=0.4+1.2+1.8+1.6=5.0E[X^2] = 1(0.4) + 4(0.3) + 9(0.2) + 16(0.1) = 0.4 + 1.2 + 1.8 + 1.6 = 5.0.

Var(X)=E[X2]−(E[X])2=5.0−4.0=1.0\text{Var}(X) = E[X^2] - (E[X])^2 = 5.0 - 4.0 = 1.0.

Markers reward correct probability-weighted sums, the variance formula E[X2]−(E[X])2E[X^2] - (E[X])^2, and units (none for these abstract variables).

Practice5 marks
A discrete random variable XX has P(X=0)=0.2P(X = 0) = 0.2, P(X=1)=aP(X = 1) = a, P(X=2)=0.3P(X = 2) = 0.3 and P(X=3)=bP(X = 3) = b, where aa and bb are constants. It is known that E[X]=1.6E[X] = 1.6. (a) Set up two equations in aa and bb and solve them. (b) Hence find the standard deviation of XX, correct to two decimal places.
Show worked answer →

(a) Probabilities sum to 11: 0.2+a+0.3+b=10.2 + a + 0.3 + b = 1, so a+b=0.5a + b = 0.5.

Expected value: 0(0.2)+1(a)+2(0.3)+3(b)=1.60(0.2) + 1(a) + 2(0.3) + 3(b) = 1.6, so a+3b=1.0a + 3b = 1.0.

Subtract the first from the second: 2b=0.52b = 0.5, giving b=0.25b = 0.25 and a=0.25a = 0.25.

(b) E[X2]=0+1(0.25)+4(0.3)+9(0.25)=0.25+1.2+2.25=3.7E[X^2] = 0 + 1(0.25) + 4(0.3) + 9(0.25) = 0.25 + 1.2 + 2.25 = 3.7.

Var(X)=E[X2]−(E[X])2=3.7−1.62=3.7−2.56=1.14\text{Var}(X) = E[X^2] - (E[X])^2 = 3.7 - 1.6^2 = 3.7 - 2.56 = 1.14. Standard deviation =1.14≈1.07= \sqrt{1.14} \approx 1.07.

Markers reward both simultaneous equations, solving for aa and bb, and the variance then square-root step.

Practise this

Sources & how we know this

ExamExplained