James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
A level Maths › Statistics · Statistical distributions › Discrete random variables

Discrete random variables

Probability distributions of discrete random variables, the expected value, and fair games.

Stats 4.1Year 1≈ 40 min to work through
Before you start: probability. See Probability.

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Know that the probabilities in a distribution add to 1Y1
  • Find unknown probabilities in a distribution table or formulaY1
  • Find the expected value E(X)Y1
  • Use expected value in context, including fair gamesY1

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

A random variable is a number whose value depends on chance, such as the score on a die or the number of heads in three flips. Listing its values with their probabilities gives its distribution, and the expected value is the long-run average.

Edexcel specification note: going further

The Edexcel A level specification (Stats 4.1) excludes calculating the mean and variance of a discrete random variable. You need to understand probability distributions, use the fact that the probabilities add to 1, and know the discrete uniform distribution. The sections on expected value and fair games go beyond the A level course: treat them as an extension. They are a good taste of where the subject goes next, and they appear in A level Further Mathematics.

2.1 Distributions and expected value

"Discrete" means the values are separate, usually whole numbers, so you can list them. (Heights and times are continuous: they can take any value in a range. See Normal distribution.)

A discrete random variable X takes separate values x with probabilities P(X=x). These probabilities must add to 1.

A probability distribution is often shown in a table, with the values of X in one row and their probabilities in the other. The probabilities must add to 1 because one of the values is certain to happen. This fact is often used to find a missing probability.

Expected value
∑P(X=x)=1E(X)=∑xP(X=x)
Why is this the average?

Roll a fair die 600 times. You would expect about 100 of each score, so the total would be about 100×1+100×2+…+100×6=2100, and the average score about 2100600=3.5. That is the same as 1×16+2×16+…+6×16. So E(X) is a weighted average: each value is weighted by how often it occurs. It does not have to be a value that X can actually take.

Worked example 1No calculator
P(X=x)=kx for x=1,2,3,4. Find k and E(X).
k(1+2+3+4)=1⇒10k=1, so k=0.1.
E(X)=0.1(12+22+32+42)=0.1(30)=3
Worked example 2No calculator
X takes values 0, 1, 2, 3 with probabilities 0.1, p, 0.3, q. E(X)=1.8. Find p and q.
Sum: 0.1+p+0.3+q=1⇒p+q=0.6
Mean: 0+p+0.6+3q=1.8⇒p+3q=1.2
Subtract: 2q=0.6, so q=0.3 and p=0.3.

2.2 Fair games

A game is fair if the expected gain (winnings minus cost) is 0.

Casinos and lotteries are designed so that the expected gain for the player is negative: over many games, the player loses money on average, even though some individuals win. To check a game, list each possible gain (prize minus cost to play), multiply by its probability and add.

Worked example 3No calculator
It costs €2 to play. A fair die is rolled: a six wins €5, a 4 or 5 wins €1, anything else wins nothing. Is the game fair?
Expected winnings =5×16+1×26=76
Expected gain =76−2=−56
Not fair: a player loses about €0.83 per game on average.

Setting up your own distribution. Some questions describe a situation, such as drawing two counters, and ask you to find the distribution of X. List every possible value of X first, then find the probability of each (a tree diagram often helps), and check that the probabilities add to 1. Only then work out E(X).

Worked example 4 (faded)No calculator
Find E(X) when X is the score on a fair die.
E(X)=1+2+3+4+5+66= 3.5  ← you work this out
On your Casio ClassWiz Calculator tricks →

To find E(X), open the Statistics app → 1-Variable with the Frequency column on. Enter the values of x and use the probabilities as the frequencies: x¯ is then E(X).

3Explore it

The distribution of the total score when fair dice are rolled. Choose the number of dice and a target total.

4Common mistakes & exam tips

Common mistakes

  • Forgetting that the probabilities must add to 1.
  • Calculating E(X) as the average of the x values without weighting.
  • Forgetting to subtract the cost to play when finding the expected gain.
  • Expecting E(X) to be a possible value of X: it need not be (e.g. 3.5 on a die).

Exam tips

  • Lay out a table of x and P(X=x) first.
  • Two unknowns usually need two equations: sum to 1 and the given mean.
  • In context, interpret E(X) as a long-run average.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
X takes three values with probabilities 0.2, 0.5 and p. Find p.
0.3
FluencyP2
X takes values 0, 1, 2 with probabilities 0.5, 0.3, 0.2. Find E(X).
0.3+0.4=0.7
FluencyP3
Find the expected score on a fair six-sided die.
3.5
FluencyP4
What is the expected gain in a fair game?
0
Problem solvingP5
P(X=x)=k(x+1) for x=0,1,2,3. Find k and E(X).
k(1+2+3+4)=1, so k=0.1. E(X)=0.1(0+2+6+12)=2.
Problem solvingP6
Two fair coins are tossed. X is the number of heads. Write down the distribution and find E(X).
P(0)=14, P(1)=12, P(2)=14; E(X)=1.

6Exam-style questions

Original exam-style questions with full markschemes. Edexcel papers allow a calculator throughout, but questions labelled “No calculator” practise exact working. Allow about 1.2 minutes per mark.

Question 1No calculator[6 marks]

X takes the values 1, 2, 3, 4 with probabilities 0.1, 0.3, k, 0.2.

  • (a)Find k.[2]
  • (b)Find E(X).[2]
  • (c)Find P(X≥3).[2]
(a)
0.1+0.3+k+0.2=1M1
k=0.4A1
(b)
1(0.1)+2(0.3)+3(0.4)+4(0.2)M1
2.7A1
(c)
0.4+0.2M1
0.6A1
Question 2No calculator[5 marks]

A spinner lands on red with probability 14, blue with probability 12 and green with probability 14. It costs €2 to play. Red wins €6, blue wins €1 and green wins nothing. Determine whether the game is fair.

Expected winnings 6×14+1×12+0×14M1 A1
=2A1
Expected gain =2−2=0M1
so the game is fairR1
Question 3Calculator[5 marks]

P(X=x)=x230 for x=1,2,3,4.

  • (a)Show that this is a valid probability distribution.[2]
  • (b)Find E(X).[2]
  • (c)Find P(X>2).[1]
(a)
1+4+9+1630M1
=1, and every probability is between 0 and 1R1
(b)
1+8+27+6430M1
103≈3.33A1
(c)
2530=56A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try real Edexcel A level questions. Past papers and markschemes are on the Pearson website.

PaperQuestionFocusDifficulty
June 2018 · Paper 3Q1Discrete uniform model for cloud cover★☆☆
Nov 2020 · Paper 31Q4Find k, then a probability for the sum of two variables★★☆
Nov 2021 · Paper 31Q6Probability distribution defined with logarithms★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake