4.7 Discrete random variables

4.7 Discrete random variables

IB Maths: Analysis and Approaches HL: 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.
  • Expected value: E(X)=∑xP(X=x)E(X)=\sum xP(X=x).
  • Expected number of occurrences =np=np.
  • A fair game has E(gain)=0E(\text{gain})=0.
  • E(X)E(X) need not be a value that XX can take.

Discrete random variables

A quantity decided by chance that takes only separate, countable values.

A random variable is a quantity whose value is determined by the outcome of a random experiment. It is discrete if it takes only separate (countable) values, such as 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.1523456789101112Total xP(X = x)
Probability distribution of X, the total when two fair dice are thrown. The probabilities add to 1.

Discrete

Takes:
Separate, countable values
Examples:
Goals in a match, dice score

Continuous

Takes:
Any value in an interval
Examples:
Height, time

Which of these is a discrete random variable?

Probability distributions

A list of every value of XX with its probability; the probabilities add up to 1.

A probability distribution lists every possible value of XX with its probability. It can be a table, for example P(G=0)=0.25P(G=0)=0.25, P(G=1)=0.35P(G=1)=0.35, or a function, for example P(X=x)=4+x18P(X=x)=\frac{4+x}{18} for x∈{1,2,3}x\in\{1,2,3\}.

Every probability is between 0 and 1 and they add up to 1. Use this to find an unknown constant.

00.10.20.30.41234xP(X = x)
The distribution of X when k = 0.1
  • Total probability∑P(X=x)=1\sum P(X=x)=1

Worked example

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

Is P(X=x)=4+x18P(X=x)=\frac{4+x}{18} for x∈{1,2,3}x\in\{1,2,3\} a valid distribution?

Expected value

The long-run mean: multiply each value by its probability and add.

The expected value (mean) of XX is in the formula booklet. It is the long-run average value of XX over many trials. 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 your E(X)E(X) lies between the smallest and largest values of XX.

00.20.40.60.81123456Score xx · P(X = x)
Fair die: each bar is x·P(X = x). Adding them gives E(X) = 21/6 = 3.5, which is not a possible score.
  • 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.2P(X=0)=0.2, P(X=1)=0.5P(X=1)=0.5, P(X=2)=0.3P(X=2)=0.3. What is E(X)E(X)?

Applications and expected numbers

Multiply the number of occasions by the probability: npnp.

If an event has 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. For example P(Y1+Y2=5)=2 P(Y=2)P(Y=3)P(Y_1+Y_2=5)=2\,P(Y=2)P(Y=3) when 2 and 3 are the only values that sum to 5.

51015202530354045502468101214161820xy(30, 12)np with p = 0.4
Expected number of occurrences = np. With p = 0.4, over 30 occasions the expected number is 12.
  • Expected numbernpnp

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

Fair games

When the player's expected gain, prize minus cost, is zero.

Let XX be the gain of a player: the amount received minus the cost to play. The game is fair if E(X)=0E(X)=0.

If E(X)<0E(X)<0, the player expects to lose and the organiser expects to profit. Over nn games the organiser's expected profit is −n E(X)-n\,E(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.

  1. 1

    List the gains

    prize minus cost for each outcome

  2. 2

    Write E(X)

    in terms of the unknown

  3. 3

    Set E(X) = 0

    the fair game condition

  4. 4

    Solve

    for the prize or cost

Making a game fair

Worked example

A game costs £2 to play. A fair die is rolled and the player wins £kk if a six is rolled, otherwise nothing. Find kk for a fair game.

In a game, E(X)=−0.25E(X)=-0.25 pounds per play. What profit does the organiser expect over 200 plays?

Try an exam question

The discrete random variable XX has P(X=x)=kx2P(X=x)=kx^2 for x∈{1,2,3}x\in\{1,2,3\}. (a) Find kk. (b) Find E(X)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