Video Transcript
Which of the following is the formula we use to calculate the variance of a discrete random variable π? (a) The variance of π equals the expected value of π squared minus the expected value of π squared. (b) The variance of π equals the expected value of π squared plus the expected value of π squared. (c) The variance of π equals the expected value of π squared minus the expected value of π squared. (d) The variance of π equals the expected value of π minus the expected value of π squared. Or (e) the variance of π equals the expected value of π plus the expected value of π squared.
Before we discuss the formula for finding the variance, letβs just be clear on the different notation used in the five options given. πΈ of π squared means we find the expected value of π first, and then we square this value, whereas πΈ of π squared means we find the squared values of π first and then calculate their expectation. Itβs sometimes helpful to think of these as the square of the expectation and the expectation of the squares.
Now weβre asked to determine the formula we use to calculate the variance of a discrete random variable. Now the variance is a measure of the extent to which values of that variable differ from their expected value, which we denote as π. We can denote this either as Var of π or as π squared or sometimes π sub π squared if there are multiple variables in the same problem. The formula for calculating the variance from first principles is the variance of π is equal to the expected value of π minus π squared, where π is the expected value of π, which we calculate using the formula the sum of each π₯-value in the range of the discrete random variable multiplied by the probability that π is equal to that value.
Another way of writing this is as the sum of π₯ minus π squared multiplied by the probability that π is equal to π₯. This means that we subtract the expected value π from each value that the discrete random variable can take, square these values, multiply by the probability that π is equal to that value, and then add them all up. Returning to the formula we first wrote down though, we can manipulate this. Weβll begin by distributing the inner parentheses, so we square π minus π. This gives the expected value of π squared minus two ππ plus π squared. As the expectation is linear, this can be distributed over the brackets. So we have the expected value of π squared minus the expected value of two ππ plus the expected value of π squared.
Now π is just a constant. So the expected value of π squared is just π squared. And in the second term, we can bring two π outside the front of the expectation. So we have the expected value of π squared minus two π multiplied by the expected value of π plus π squared. But π, remember, is the expected value of π, so we can replace π with πΈ of π. And we have πΈ of π squared minus two πΈ of π πΈ of π plus πΈ of π squared. The term in the center becomes negative two multiplied by the expected value of π squared, and we can then group the like terms. Negative two multiplied by πΈ of π squared plus πΈ of π squared is negative πΈ of π squared. So the formula simplifies to the expected value of π squared minus the expected value of π squared.
Using the descriptions we wrote down earlier, we can think of this as the expectation of the squares minus the square of the expectation. Looking carefully at the five options we were given, itβs this one here: the variance of π is equal to the expected value of π squared minus the expected value of π squared. The other options we were given do highlight various common mistakes. For example, in the first option, the terms have been subtracted in the wrong order. In the second option, the terms have been added instead of subtracted. In fact, the most common error isnβt actually given, which is to forget to square the second term. So the most common incorrect formula used in practice is the expected value of π squared minus the expected value of π.
The correct answer is that the formula we use to calculate the variance of a discrete random variable π is the variance of π is equal to the expected value of π squared minus the expected value of π squared.