KS Maths
Topic 4.7 · AA and AI, SL and HL

Discrete random variables and expected value

The expected value is where it balances

Probability distributions, E(X), and why the expected value is usually a number the variable can never be.

Words you need (10 key words in this lesson)

The maths words this lesson uses, in plain English. Open this before you start if English is not your first language.

expected value
The average result if we repeated many times.Expected heads in 10 tosses is 5.
variable
A letter that stands for a number that can change.In y = 2x, x and y are variables.
random
Chosen by chance, with no pattern.A random number is picked by chance.
discrete
Data that can only take separate values, usually counted.The number of pets is discrete.
probability
How likely it is that something happens, from 0 to 1.The probability of heads is one half.
distribution
How data or probabilities are spread over the possible values.The distribution shows how likely each value is.
add
Put numbers together to find the total.Add 3 and 4 to get 7.
exact
Not rounded. Completely correct.The exact answer is one third, not 0.33.
write down
Give the answer with little or no working.Write down the median.
decimal
A number with a decimal point. It shows parts smaller than one.0.5 is a decimal.

Preview You are reading the start of this lesson. The rest opens with a plan. See plans Already paid? Sign in

Warm-up

Four quick ones from earlier work. Try each on paper before you open the answer; a slip here shows you what to watch for later in the lesson.

  1. Four probabilities in a table are 0.2, 0.3, 0.4 and k, and they cover every possible value. Find k.
    Answer

    0.2 + 0.3 + 0.4 = 0.9, so k = 1 − 0.9 = 0.1. Every complete distribution adds to exactly 1, which is how a missing value is found.

  2. Work out 2 × 0.1 + 4 × 0.4 + 6 × 0.5.
    Answer

    0.2 + 1.6 + 3 = 4.8. Multiply each pair first and then add, with the decimal points lined up. This is exactly the shape of ΣxP(X = x).

  3. Find the mean of the three values 2, 2 and 5.
    Answer

    (2 + 2 + 5) ÷ 3 = 3. The value 2 appears twice, so it pulls the mean towards 2. Probabilities do the same job as repeats.

  4. Write 7/20 as a decimal.
    Answer

    0.35, since 7 ÷ 20 = 0.35. A distribution given as fractions often has to be turned into decimals before you multiply.

Words used in this lesson
random variable
a quantity whose value depends on chance; written with a capital letter such as X. For example: X is the number a die lands on.
distribution
a list of all possible values with their probabilities. For example: a table of values and probabilities.
discrete
takes separate values, usually whole numbers you can count. For example: the number of children in a family.
expected value E(X)
the long-run average of the variable; the balance point. For example: the average score over many rolls of a die.
sum to 1
when you add all the probabilities, the total is exactly one. For example: 0.5 and 0.5 sum to 1.
stake
the amount you pay to play a game. For example: paying 2 to enter a raffle.
prize
the amount you receive if you win. For example: a prize of 20 for the winning ticket.
gain
what you win minus what you paid; it can be negative. For example: win 5, pay 2, gain 3.
fair game
a game where the expected gain is zero. For example: neither side loses money in the long run.
hence
use the result you have just found. For example: “find k, and hence E(X)” means use your value of k.

Predict first. Probability is moved from the bar at 1 onto the bar at 4. Will E(X) go up or down, and will the balance point move as quickly as the probability does, or more slowly? Decide before you look.

Then check

Press Shift and watch the triangle underneath the bars as the probability moves. Compare how far the triangle travels with how far the probability moved, and note where it comes to rest.

Here is a distribution on 1, 2, 3, 4. The triangle underneath is the balance point, and it sits at E(X). Shift the probability and watch where it has to move to keep the bars balanced.

the distribution, resting on its meanE(X) = Σ x P(X = x)12340.20.40.6
1.000probabilities sum to
3.18E(X)
4most likely value

E(X) = 3.18, most likely value = 4. They are different questions and usually different answers.

E(X) is not the value you expect. It is the long-run average, so it is a balance point, not a prediction. The most likely value is the tallest bar, and the two are usually different numbers. A family cannot have 2.4 children and a die cannot land on 3.5, and both are perfectly good expected values.

The two things every distribution must satisfy

Worked example

x1234
P(X = x)0.10.20.30.4
x × P0.10.40.91.6
ΣP(X = x)= 0.1 + 0.2 + 0.3 + 0.4 = 1 always check this first E(X)= Σx P(X = x) = 0.1 + 0.4 + 0.9 + 1.6 = 3 here it does land on a value, which is the exception

When the distribution is given as a formula

P(X = x) = 4 + x18 for x ∈ {1, 2, 3}.

check: 5 + 6 + 718 = 1818 = 1 ✓ E(X)= 1(5) + 2(6) + 3(7)18 = 3818 ≈ 2.111 not 1, 2 or 3

On the GDC. Applications allows a calculator in every paper (Analysis Paper 1 does not, so AA students need the hand method too), and a long table is quicker as two lists. Put the values of x in one list and the probabilities in the next, then add up the products.

Run the same sum on the probability list alone first. If it is not 1, the table is not a distribution. Still write ΣxP(X = x) out with the products in your working: the method mark is for that line, not for the number on the screen.

The rest of this lesson is in the full course

Still to come in this lesson:

In the full lesson every figure moves as you drag it, and every answer you type is checked, with a note on what each wrong answer means.

IB Diploma plan: AI SL$99Every Diploma lesson in both courses and both levels, so a change of course never locks you out, and every lesson from Year 7 for the refreshers. This lesson is in AA and in AI: choose your own course below. $99 for 12 months or $149 for 2 years.

One plan opens every Diploma lesson, AA and AI, SL and HL, for the whole family.

One payment. Nothing renews. Full refund within 30 days. Prices are in US$; Gumroad shows your local currency at checkout. Pay by card on Gumroad, then come back here and type the email you paid with: we email you a sign-in link. For a refund, reply to your Gumroad receipt or email hello@ksmaths.com.

Try a free sample lesson in every unit, and the whole Skill Tree. See this unit.

Already have a revision pack or the Years 7 to 11 plan? Move up and the unused part of what you paid comes off.

Teaching students who need extra support? Student codes for 5, 10 or 30 students.

AI SL Mock Exam Pack, $19BuyPlan $99