Mean & Variance (DP IB Maths: AA HL)

Revision Note

Dan

Author

Dan

Last updated

Did this video help you?

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

begin mathsize 22px style straight E left parenthesis X right parenthesis equals sum x straight P left parenthesis X equals x right parenthesis end style

      • This is given in the formula booklet
  • Look out for symmetrical distributions (where the values of X are symmetrical and their probabilities are symmetrical) as 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 negative if there is a loss
  • Normally the expected gain or loss 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
    • E(X) = 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

Did this video help you?

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

Var invisible function application open parentheses X close parentheses equals straight E invisible function application open parentheses X minus mu close parentheses squared

    • This is given in the formula booklet
  • This formula can be rearranged into the more useful form:

Var invisible function application open parentheses X close parentheses equals straight E invisible function application open parentheses X squared close parentheses minus left square bracket straight E invisible function application open parentheses X close parentheses right square bracket ²

    • This is given in the 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
    • 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 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)) 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 Tip

  • 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

Did this video help you?

Transformation of a Single Variable

How do I calculate the expected value and variance of a transformation of X?

  • Suppose X is transformed by the function f to form a new variable T = f(X)
    • This means the function f is applied to all possible values of X
  • Create a new probability distribution table
    • The top row contains the values t subscript i equals f open parentheses x subscript i close parentheses
    • The bottom row still contains the values straight P invisible function application open parentheses X equals x subscript i close parentheses which are unchanged as:
      • straight P invisible function application open parentheses X equals x subscript i close parentheses equals straight P invisible function application open parentheses f open parentheses X close parentheses equals f open parentheses x subscript i close parentheses close parentheses equals straight P invisible function application left parenthesis T equals t subscript i right parenthesis
      • Some values of may be equal so you can add their probabilities together
  • The mean is calculated in the same way
    • straight E invisible function application open parentheses T close parentheses equals sum t straight P invisible function application left parenthesis X equals x right parenthesis blank
  • The variance is calculated using the same formula
    • Var invisible function application open parentheses T close parentheses equals straight E invisible function application open parentheses T ² close parentheses minus open square brackets straight E invisible function application open parentheses T close parentheses close square brackets squared

Are there any shortcuts?

  • There are formulae which can be used if the transformation is linear
    • T equals a X plus b where a and b are constants
  • If the transformation is not linear then there are no shortcuts
    • You will have to first find the probability distribution of T

What are the formulae for E(aX + b) and Var(aX + b)?

  • If a and b are constants then the following formulae are true:
    • straight E left parenthesis a X space plus space b right parenthesis space equals space a straight E left parenthesis X right parenthesis space plus space b
    • Var left parenthesis a X space plus space b right parenthesis space equals space a ² Var left parenthesis X right parenthesis
      • These are given in the formula booklet
  • This is the same as linear transformations of data
    • The mean is affected by multiplication and addition/subtraction
    • The variance is affected by multiplication but not addition/subtraction
  • Remember division can be written as a multiplication
    • X over a equals 1 over a X

Worked example

X is a random variable such that straight E left parenthesis X right parenthesis equals 5and Var left parenthesis X right parenthesis equals 4.

Find the value of:

(i)
straight E left parenthesis 3 X plus 5 right parenthesis
(ii)
Var left parenthesis 3 X plus 5 right parenthesis
(iii)
Var left parenthesis 2 minus X right parenthesis.

4-4-2-ib-aa-ai-hl-axb-we-solution

You've read 0 of your 10 free revision notes

Unlock more, it's free!

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

the (exam) results speak for themselves:

Did this page help you?

Dan

Author: Dan

Expertise: Maths

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.