4.7 Discrete random variables and expected value

4.7 Discrete random variables and expected value

IB Maths: Applications and Interpretation HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A discrete random variable XX takes separate values by chance; its probabilities add up to 1.
  • Use ∑P(X=x)=1\sum P(X=x)=1 to find an unknown such as kk.
  • The expected value is E(X)=∑xP(X=x)\mathrm{E}(X)=\sum xP(X=x): a long-run average.
  • For a game, E(X)\mathrm{E}(X) of the gain is 00 if the game is fair.
  • Expected total over nn plays =n×E(X)=n\times\mathrm{E}(X).

Discrete random variables

A distribution lists every value of XX with its probability, and the probabilities add up to 1.

A discrete random variable XX takes separate values (usually whole numbers) according to chance, such as the score on a die. A probability distribution lists each value xx with its probability P(X=x)P(X=x).

Every probability satisfies 0≤P(X=x)≤10\le P(X=x)\le1, and all of them add up to 1:

∑P(X=x)=1.\sum P(X=x)=1.

00.10.20.30.40.512345xP(X = x)
A probability distribution as a bar chart: the bars add up to 1.

A table has probabilities 0.20.2, kk, 0.50.5. What is kk?

Tables and formulae

A distribution is given as a table or a formula; substitute to build the table, then add probabilities for ranges.

A distribution can be a table, such as x=1,…,5x=1,\dots,5 with P(X=x)=0.1,0.2,0.15,0.05,0.5P(X=x)=0.1,0.2,0.15,0.05,0.5, or a formula, such as P(X=x)=4+x18P(X=x)=\frac{4+x}{18} for x∈{1,2,3}x\in\{1,2,3\}.

Substitute each value to build the table: 518,618,718\frac{5}{18},\frac{6}{18},\frac{7}{18}, which sum to 1. For P(X≥2)P(X\ge2), add the probabilities of every value that qualifies.

00.10.20.30.4123xP(X = x)
The distribution P(X = x) = (4 + x)/18 for x = 1, 2, 3: 5/18, 6/18, 7/18 (they sum to 1).

Table

Looks like:
Values and probabilities listed
To use it:
Read the entries directly

Formula

Looks like:
P(X=x)=4+x18P(X=x)=\frac{4+x}{18}
To use it:
Substitute each xx

Worked example

P(X=x)=4+x18P(X=x)=\frac{4+x}{18} for x∈{1,2,3}x\in\{1,2,3\}. Find P(X≥2)P(X\ge2).

For P(X=x)=4+x18P(X=x)=\frac{4+x}{18}, what is P(X=3)P(X=3)?

Expected value

The expected value is the probability-weighted mean of XX, the long-run average over many trials.

The expected value (mean) of a discrete random variable is E(X)=∑xP(X=x)\mathrm{E}(X)=\sum xP(X=x).

It is the long-run average of XX, not necessarily a value XX can take. With P(X=1)=0.1P(X=1)=0.1, P(X=2)=0.3P(X=2)=0.3, P(X=3)=0.4P(X=3)=0.4, P(X=4)=0.2P(X=4)=0.2:

E(X)=0.1+0.6+1.2+0.8=2.7.\mathrm{E}(X)=0.1+0.6+1.2+0.8=2.7.

On the GDC, enter values and probabilities as two lists and use the probabilities as frequencies in one-variable statistics.

00.20.40.60.811.21234xx × P(X = x)
Each term x·P(X = x) for P = 0.1, 0.3, 0.4, 0.2: they add to E(X) = 2.7.
  • E(X)\mathrm{E}(X)∑x P(X=x)\sum x\,P(X=x)

Worked example

P(X=1)=0.1P(X=1)=0.1, P(X=2)=0.3P(X=2)=0.3, P(X=3)=0.4P(X=3)=0.4, P(X=4)=0.2P(X=4)=0.2. Find E(X)\mathrm{E}(X).

X=0,1X=0,1 with P=0.25,0.75P=0.25,0.75. What is E(X)\mathrm{E}(X)?

Games and fairness

A game is fair if the expected gain is zero; a negative expected gain favours the organiser.

If XX is the gain of a player (prize minus entry fee), then E(X)\mathrm{E}(X) is the expected gain per game. If E(X)=0\mathrm{E}(X)=0 the game is fair. Negative favours the organiser; positive favours the player.

A game costs 4 AED and pays 0, 6 or 10 AED with probabilities 0.50.5, 0.30.3, 0.20.2. The expected prize is 3.83.8 AED, so the expected gain is −0.2-0.2 AED. Over 500 games the organiser expects to make 500×0.2=100500\times0.2=100 AED.

  1. 1

    Expected prize

    ∑\sum prize ×\times probability

  2. 2

    Subtract the entry fee

    this is the expected gain

  3. 3

    Compare with zero

    zero means fair

Is the game fair?

Worked example

A game costs 4 AED to play and pays 0, 6 or 10 AED with probabilities 0.50.5, 0.30.3, 0.20.2. Is it fair?

A fair game has expected gain...

Applications

Count equally likely outcomes for each value of XX, check the total, then calculate E(X)\mathrm{E}(X).

Many problems build a distribution by counting outcomes. For two fair four-sided dice with XX the larger number, there are 16 equally likely outcomes, and P(X=3)=516P(X=3)=\frac{5}{16} because five outcomes have a larger number of 3.

The full table is 116,316,516,716\frac{1}{16},\frac{3}{16},\frac{5}{16},\frac{7}{16}, giving E(X)=5016=3.125\mathrm{E}(X)=\frac{50}{16}=3.125. For a total over repeated plays, multiply E(X)\mathrm{E}(X) by the number of plays.

00.10.20.30.41234xP(X = x)
The larger number on two fair four-sided dice.

Worked example

Two fair four-sided dice are rolled and XX is the larger number. Find E(X)\mathrm{E}(X).

Two fair four-sided dice: how many outcomes give a larger number of 2?

Try an exam question

The discrete random variable XX has P(X=0)=0.2P(X=0)=0.2, P(X=1)=kP(X=1)=k, P(X=2)=0.3P(X=2)=0.3 and P(X=3)=0.1P(X=3)=0.1. Find kk and E(X)\mathrm{E}(X).

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the value of kk.

1 mark, marked against the mark scheme

Revision notes