# Question Video: Determining the Variance for a Discrete Random Variable Mathematics

Let 𝑋 denote a discrete random variable which can take the values 0, 2, and 5. Given that 𝑋 has probability distribution function 𝑓(𝑥) = 𝑎/(6𝑥 + 6), find the variance of 𝑋.

05:17

### Video Transcript

Let 𝑋 denote a discrete random variable, which can take the values zero, two, and five. Given that 𝑋 has probability distribution function 𝑓 of 𝑥 equals 𝑎 over six 𝑥 plus six, find the variance of 𝑋.

The variance of a discrete random variable is a measure of the extent to which the values of that discrete random variable differ from their expected value. It’s calculated using the formula variance of 𝑋 is equal to the expected value of 𝑋 squared minus the expected value of 𝑋 squared. And we need to be clear on the difference in notation here. In the second term, we’re finding the expected value of 𝑋 and we then square it, whereas in the first term we’re squaring the 𝑋-values first and then finding their expectation. We can also think of this as the expectation of the squares minus the square of the expectation.

The expected value of 𝑋 and the expected value of 𝑋 squared are calculated using the following formula. For the expected value of 𝑋, we multiply each 𝑥-value by its 𝑓 of 𝑥 value, where 𝑓 is the probability distribution function of 𝑥, and then we find their sum. For the expected value of 𝑋 squared, we multiply each 𝑥 squared value by 𝑓 of 𝑥 and then find their sum. We’ve been given the probability distribution function 𝑓 of 𝑥, but it is in terms of an unknown value 𝑎. We know that 𝑥 can only take the values zero, two, and five. So these are the values in its range. The sum of all the probabilities in a probability distribution function must be equal to one.

So by finding expressions for the probabilities when 𝑥 equals zero, two, and five, we can then form an equation to determine the value of 𝑎. 𝑓 of zero is 𝑎 over six multiplied by zero plus six, which is 𝑎 over six. 𝑓 of two is 𝑎 over six multiplied by two plus six, which is 𝑎 over 18. And 𝑓 of five is 𝑎 over six multiplied by five plus six, which is 𝑎 over 36. The sum of these three values must be equal to one, so we have the equation 𝑎 over six plus 𝑎 over 18 plus 𝑎 over 36 is equal to one.

Writing each term on the left-hand side with a common denominator of 36 gives six 𝑎 over 36 plus two 𝑎 over 36 plus 𝑎 over 36 is equal to one. We add the three fractions together to give nine 𝑎 over 36 is equal to one. And then we can cancel a factor of nine in the numerator and denominator to give 𝑎 over four equals one. To solve for 𝑎, we multiply both sides of the equation by four to give 𝑎 equals four. So we found the value of 𝑎, and this allows us to determine the three probabilities exactly. 𝑎 over six is four over six, or two-thirds. 𝑎 over 18 is four over 18, or two-ninths. And 𝑎 over 36 is four over 36, or one-ninth.

Next, we’ll write the probability distribution of 𝑥 in a table. So we put the values 𝑥 can take, which are zero, two, and five, in the top row and then their probabilities, which we’ve just calculated to be two-thirds, two-ninths, and one-ninth, in the second row. To find the expected value of 𝑋, we need to multiply each 𝑥-value by its 𝑓 of 𝑥 value. We can add an extra row in our table for this. And we have zero multiplied by two-thirds, which is zero, two multiplied by two-ninths, which is four-ninths, and five multiplied by one-ninth, which is five-ninths.

The expected value of 𝑋 is then the sum of these three values. Zero plus four-ninths plus five-ninths is nine-ninths, or simply one. To work out the expected value of 𝑋 squared, we need to multiply each 𝑥 squared value by 𝑓 of 𝑥. So we add a row to our table for the 𝑥 squared values, which are zero, four, and 25. We then add one final row to our table in which we multiply these values by the 𝑓 of 𝑥 values. Zero multiplied by two-thirds is zero. Four multiplied by two-ninths is eight-ninths. And 25 multiplied by one-ninth is twenty-five ninths. The expected value of 𝑋 squared is the sum of these three values, which is 33 over nine. And this simplifies to 11 over three.

To find the variance of 𝑋, we take this expected value of 𝑋 squared, and from it we subtract the expected value of 𝑋 squared. So we have 11 over three minus one squared. That’s 11 over three minus one, or 11 over three minus three over three, which is eight over three. So by first determining the value of this unknown constant 𝑎, which we did by recalling that the sum of all probabilities in a probability distribution function is one, we found that the variance of this discrete random variable 𝑋 is eight over three.