Mean & Variance (DP IB Analysis & Approaches (AA)): Revision Note

Expected values E(X)

What does E(X) mean and how do I calculate E(X)?

  • E(X) means the expected value or the mean of a random variable X

    • The expected value does not need to be an obtainable value of X

      • For example: the expected value number of times a coin will land on tails when flipped 5 times is 2.5

  • For a discrete random variable, it is calculated by:

    • Multiplying each value of X with its corresponding probability

    • Adding all these terms together


      straight E open parentheses X close parentheses equals sum from blank to blank of x straight P open parentheses X equals x close parentheses

      • This is given in the exam formula booklet

  • Look out for symmetrical distributions (where the values of X are symmetrical and their probabilities are symmetrical)

    • The mean of these is the same as the median

      • For example: if X can take the values 1, 5, 9 with probabilities 0.3, 0.4, 0.3 respectively then by symmetry the mean would be 5

How can I decide if a game is fair?

  • Let X be the random variable that represents the gain/loss of a player in a game

    • X will be positive if there is a gain, and negative if there is a loss

  • Normally the expected gain or loss, straight E open parentheses X close parentheses. is calculated by subtracting the cost to play the game from the expected value of the prize

    • If E(X) is positive then it means the player can expect to make a gain

    • If E(X) is negative then it means the player can expect to make a loss

  • The game is called fair if the expected gain is 0

    • straight E open parentheses X close parentheses equals 0

Worked Example

Daphne pays $15 to play a game where she wins a prize of $1, $5, $10 or $100. The random variable W represents the amount she wins and has the probability distribution shown in the following table:

w

1

5

10

100

straight P left parenthesis W equals w right parenthesis

0.35

0.5

0.05

0.1

a) Calculate the expected value of Daphne's prize.

4-4-2-ib-ai-aa-sl-expected-we-a-solution

b) Determine whether the game is fair.

4-4-2-ib-ai-aa-sl-expected-we-b-solution

Variance Var(X)

What does Var(X) mean and how do I calculate Var(X)?

  • Var(X) means the variance of a random variable X

    • The standard deviation is the square root of the variance

      • This provides a measure of the spread of the outcomes of X

    • The variance and standard deviation can never be negative

  • The variance of X is the mean of the squared difference between X and the mean of X

    • i.e. of the squared difference between X and mu equals straight E open parentheses X close parentheses

Var open parentheses X close parentheses equals straight E open parentheses X minus mu close parentheses squared

  • This is given in the exam formula booklet

  • This formula can be rearranged into the more useful form:

Var open parentheses X close parentheses equals straight E open parentheses X squared close parentheses minus open square brackets straight E open parentheses X close parentheses close square brackets squared

  • This is also given in the exam formula booklet

    • Compare this formula to the formula for the variance of a set of data

  • This formula works for both discrete and continuous X

How do I calculate E(X²) for discrete X?

  • E(X²) means the expected value or the mean of the random variable defined as 

  • For a discrete random variable, it is calculated by:

    • Squaring each value of X to get the values of X2

    • Multiplying each value of X2 with its corresponding probability

      • these are the same as the probabilities for X

    • Adding all these terms together

      • straight E invisible function application open parentheses X squared close parentheses equals sum x squared straight P open parentheses X equals x close parentheses

    • This is given in the exam formula booklet as part of the formula for Var(X):

      • Var invisible function application open parentheses X close parentheses equals sum x ² straight P invisible function application left parenthesis X equals x right parenthesis minus mu ²

  • E(f(X)), where f is a function of X, can be found in a similar way

Is E(X²) equal to [E(X)]²?

  • Definitely not!

    • They are only equal if X can only take one value

  • E(X²) is the mean of the values of X²

  • [E(X)]² is the square of the mean of the values of X

  • To see the difference

    • Imagine a random variable X that can only take 1 and -1 with equal chance

    • E(X) = 0 so [E(X)]² = 0

    • The square values are 1 and 1 so E(X²) = 1

Examiner Tips and Tricks

In an exam you can enter the probability distribution into your GDC using the statistics mode:

  • Enter the possible values as the data

  • Enter the probabilities as the frequencies

You can then calculate the mean and variance just like you would with data.

Worked Example

The score on a game is represented by the random variable S defined below.

s

0

1

2

10

straight P left parenthesis S equals s right parenthesis

0.4

0.3

0.25

0.05

Calculate Var left parenthesis S right parenthesis.

4-4-2-ib-aa-hl-variance-we-solution

You've read 0 of your 5 free revision notes this week

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Dan Finlay

Author: Dan Finlay

Expertise: Maths Subject Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.

Roger B

Reviewer: Roger B

Expertise: Maths Content Creator

Roger's teaching experience stretches all the way back to 1992, and in that time he has taught students at all levels between Year 7 and university undergraduate. Having conducted and published postgraduate research into the mathematical theory behind quantum computing, he is more than confident in dealing with mathematics at any level the exam boards might throw at you.