4.7 Discrete random variables

4.7 Discrete random variables

IB Maths: Analysis and Approaches SL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • ∑P(X=x)=1\sum P(X=x)=1; use it to find unknown constants.
  • E(X)=∑xP(X=x)E(X)=\sum xP(X=x), the long-run average.
  • Expected number of occurrences =np=np.
  • Fair game: E(gain)=0E(\text{gain})=0.
  • E(X)E(X) need not be a value that XX can take.

Discrete random variables

A random variable takes a value determined by chance; it is discrete if it can take only separate, countable values.

Examples are the number of goals in a match or the score on a dice. We write XX for the random variable and xx for a value it takes, so P(X=2)P(X=2) means "the probability that XX takes the value 2".

00.050.10.15123456xP(X = x)
Score on a fair dice: a discrete random variable, each value has P(X = x) = 1/6 (shown as 0.167)

Discrete

  • Number of goals in a match
  • Score on a dice

Continuous

  • Height of a student
  • Time taken to run 100 m

Which of these is a discrete random variable?

Probability distributions

A probability distribution lists every possible value of XX with its probability; the probabilities always sum to 1.

It can be a table, e.g. P(G=0)=0.25P(G=0)=0.25, P(G=1)=0.35P(G=1)=0.35, …, or a function, e.g. P(X=x)=4+x18P(X=x)=\frac{4+x}{18} for x∈{1,2,3}x\in\{1,2,3\}. Every probability lies between 0 and 1 and ∑P(X=x)=1\sum P(X=x)=1.

Use this to find an unknown constant. Never assume the values are equally likely.

00.10.20.30.41234xP(X = x)
The distribution P(X=x)=x10P(X=x)=\frac{x}{10}: larger values are more likely.

Worked example

P(X=x)=kxP(X=x)=kx for x∈{1,2,3,4}x\in\{1,2,3,4\}. Find kk.

A discrete variable has P(X=1)=0.2P(X=1)=0.2, P(X=2)=0.5P(X=2)=0.5 and P(X=3)=pP(X=3)=p. What is pp?

Expected value

Multiply each value by its probability and add: the long-run average of XX.

The expected value E(X)E(X) is in the formula booklet. It need not be a possible value of XX: a team can have E(G)=1.33E(G)=1.33 goals per match. Check that it lies between the smallest and largest values of XX.

For P(X=x)=x10P(X=x)=\frac{x}{10}, x=1,2,3,4x=1,2,3,4: E(X)=1+4+9+1610=3E(X)=\frac{1+4+9+16}{10}=3, above 2.5 because larger values are more likely.

00.10.20.30.41234xP(X = x)
P(X = x) = x/10 for x = 1, 2, 3, 4: larger values are more likely, so E(X) = 3 is above 2.5
  • Expected valueE(X)=∑x P(X=x)E(X)=\sum x\,P(X=x)

Worked example

P(X=x)=x10P(X=x)=\frac{x}{10} for x=1,2,3,4x=1,2,3,4. Find E(X)E(X).

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. What is E(X)E(X)?

Expected numbers

With probability pp on each of nn occasions, the expected number of occurrences is npnp.

With P(G≥2)=0.4P(G\ge2)=0.4, over 30 matches the expected number with at least 2 goals is 30×0.4=1230\times0.4=12.

For two independent observations, multiply probabilities and remember different orders: P(Y1+Y2=5)=2P(Y=2)P(Y=3)P(Y_1+Y_2=5)=2P(Y=2)P(Y=3) when 2 and 3 are the only values summing to 5.

051015G ≥ 2G < 2Matches
Expected number of matches in 30 with P(G ≥ 2) = 0.4: 30 × 0.4 = 12 and 30 × 0.6 = 18
  • Expected numbernpnp

P(G≥2)=0.4P(G\ge2)=0.4. Over 50 matches, how many matches are expected to have at least 2 goals?

Fair games

A game is fair when the expected gain, prize minus cost, is zero.

Let XX be the gain: the amount received minus the cost to play. If E(X)<0E(X)<0 the player loses on average, and over nn games the organiser's expected profit is −nE(X)-nE(X).

To make a game fair, write E(X)E(X) in terms of the unknown prize or cost, set it equal to 0 and solve.

51015202530−6−4−2246prize x / £E(X) / £E(X) = x/6 − c
Win probability 1/6, prize x, cost c (slider): E(X) = x/6 − c, so the game is fair where the line crosses zero, x = 6c
  • Fair gameE(X)=0E(X)=0

Worked example

A game costs £2 to play. You roll a fair die and win £6 if you throw a six, otherwise nothing. Is it fair?

A game costs £1 to play. You win £3 with probability 13\frac13, otherwise nothing. Is it fair?

Try an exam question

The probability distribution of XX is: P(X=0)=0.1P(X=0)=0.1, P(X=1)=0.4P(X=1)=0.4, P(X=2)=pP(X=2)=p, P(X=3)=0.2P(X=3)=0.2. (a) Find pp. (b) Find E(X)E(X).

[3 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