E(X) & Var(X) (Discrete) (Cambridge (CIE) A Level Maths: Probability & Statistics 1): Revision Note

Exam code: 9709

Dan Finlay

Written by: Dan Finlay

Reviewed by: Lucy Kirkham

Updated on

E(X) & Var(X) (Discrete)

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

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

    • Multiplying each value of X with its corresponding probability

    • Adding all these terms together

straight capital sigmax straight P left parenthesis X equals x right parenthesis

  • 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 do I calculate E(X²)?

  • E(X²) means the expected value or the mean of a 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 capital sigmax squared straight P left parenthesis X equals x right parenthesis

  • In a similar way E(f(x))  can be calculated for a discrete random variable by:

    • Applying the function f to each value of to get the values of f(X)

    • Multiplying each value of f(X ) with its corresponding probability

    • Adding all these terms together

straight capital sigmaf left parenthesis x right parenthesis space straight P left parenthesis X equals x right parenthesis

3-1-2-ex-_-varx-discrete-diagram-1
3-1-2-ex-_-varx-discrete-diagram-2

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

  • Definitely not!

    • They are only equal if X can take only one value with probability 1

      • if this was the case it would no longer be a random variable

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

  • (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 the values 1 and -1 with equal chance

    • The mean would be 0 so the square of the mean would also be 0

    • The square values would be 1 and 1 so the mean of the squares would also be 1

  • In general E(f(X)) does not equal f(E(X)) where f is a function

    • So if you wanted to find something like begin mathsize 16px style E open parentheses 1 over x close parentheses end style then you would have to use the definition and calculate:

begin inline style stack sum begin display style 1 over x end style straight P left parenthesis X equals x right parenthesis with blank below end style

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

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

  • For any random variable this can be calculated using the formula

begin mathsize 16px style E left parenthesis X to the power of blank squared end exponent right parenthesis minus left parenthesis E left parenthesis X right parenthesis right parenthesis squared end style

  • This is the mean of the squares of X minus the square of the mean of X

    • Compare this to the definition of the variance of a set of data

  • Var(X) is always positive

  • The standard deviation of a random variable X is the square root of Var(X)

Worked Example

The discrete random variable X has the probability distribution shown in the following table:

bold italic x

2

3

5

7

bold P bold left parenthesis bold italic X bold equals bold italic x bold right parenthesis

0.1

0.3

0.2

0.4

(a) Find the value of straight E left parenthesis X right parenthesis.

 

(b) Find the value of E left parenthesis X squared right parenthesis.

 

(c) Find the value of Var left parenthesis X right parenthesis .

Answer:

3-1-2-ex-_-varx-discrete-we-solution_a
3-1-2-ex-_-varx-discrete-we-solution_b
3-1-2-ex-_-varx-discrete-we-solution_c

Examiner Tips and Tricks

  • Check if your answer makes sense. The mean should fit within the range of the values of X.

Unlock more, it's free!

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

the (exam) results speak for themselves:

Build on this topic

Dan Finlay

Author: Dan Finlay

Expertise: Portfolio 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.

Lucy Kirkham

Reviewer: Lucy Kirkham

Expertise: Content Creator

Lucy has been a passionate Maths teacher for over 12 years, teaching maths across the UK and abroad helping to engage, interest and develop confidence in the subject at all levels.Working as a Head of Department and then Director of Maths, Lucy has advised schools and academy trusts in both Scotland and the East Midlands, where her role was to support and coach teachers to improve Maths teaching for all.