22  Variance and standard deviation

The values of a random variable vary. The distribution of a random variable describes its pattern of variability. The expected value of a random variable summarizes the distribution in just a single number, the long run average value. But the expected value does not tell us much about the degree of variability of the random variable. Do the values of the random variable tend to be close to the expected value, or are they spread out? Variance and standard deviation are numbers that address these questions.

Example 22.1

A roulette wheel has 18 black spaces, 18 red spaces, and 2 green spaces, all the same size and each with a different number on it. Guillermo bets $1 on black. If the wheel lands on black, Guillermo wins his bet back plus an additional $1; otherwise he loses the money he bet. Let \(W\) be Guillermo’s net winnings (net of the initial bet of $1.)

  1. Find the distribution of \(W\).




  2. Compute \(\text{E}(W)\).




  3. Interpret \(\text{E}(W)\) in context.




  4. An expected profit for the casino of 5 cents per $1 bet seems small. Explain how casinos can turn such a small profit into billions of dollars.




  5. Recall that variance is the long run average squared distance from the mean. Describe how you could use simulation to approximate the variance of \(W\). What would you expect the simulation results to look like?




  6. Without doing any further calculations, provide a ballpark estimate of the variance. Explain. What are the measurement units for the variance?




  7. The random variable \((W-\text{E}(W))^2\) represents the squared deviation from the mean. Find the distribution of this random variable and its expected value.




  8. Recall that standard deviation is the square root of the variance. Why would we want to take the square root of the variance? Compute and interpret the standard deviation of \(W\).




  9. Compute \(\text{E}(W^2)\). (For this \(W\) you should be able to compute \(\text{E}(W^2)\) without any calculations; why?) Then compute \(\text{E}(W^2) - (\text{E}(W))^2\); what do you notice?




\[ \text{Var}(X) = \text{E}\left(X^2\right) - \left(\text{E}\left(X\right)\right)^2 \]

\[ \text{E}\left(X^2\right) = \text{Var}(X) + \left(\text{E}\left(X\right)\right)^2 \]

Example 22.2

Continuing with roulette, Nadja bets $1 on number 7. If the wheel lands on 7, Nadja wins her bet back plus an additional $35; otherwise she loses the money she bet. Let \(X\) be Nadja’s net winnings (net of the initial bet of $1.)

  1. Find the distribution of \(X\).




  2. Compute \(\text{E}(X)\).




  3. How do the expected values of the two $1 bets — bet on black versus bet on 7 — compare? Explain what this means.




  4. Are the two $1 bets — bet on black versus bet on 7 — identical? If not, explain why not.




  5. Before doing any calculations, determine if \(\text{SD}(X)\) is greater than, less than, or equal to \(\text{SD}(W)\). Explain.




  6. Compute \(\text{Var}(W)\) and \(\text{SD}(W)\).




  7. Which $1 bet — betting on black or betting on 7 — is “riskier”? How is this reflected in the standard deviations?




Example 22.3

Let \(X\) be a Uniform(\(a\), \(b\)) distribution.

  1. First, suppose \(X\) has a Uniform(0, 1) distribution. Make a ballpark estimate of the standard deviation.




  2. Compute \(\text{SD}(X)\) if \(X\) has a Uniform(0, 1) distribution.




  3. Now suggest a rough formula for the standard deviation for the general Uniform(\(a\), \(b\)) case.




  4. Compute \(\text{SD}(X)\) if \(X\) has a Uniform(\(a\), \(b\)) distribution.




Example 22.4

The plots below summarize hypothetical distributions of quiz scores in six classes. All plots are on the same scale. Each quiz score is a whole number between 0 and 10 inclusive.

  1. Donny Dont says that C represents the smallest SD, since there is no variability in the heights of the bars. Do you agree that C represents “no variability? Explain.




  2. What is the smallest possible value the SD of quiz scores could be? What would need to be true about the distribution for this to happen? (This scenario might not be represented by one the plots.)




  3. Without doing any calculations, arrange the classes in order based on their SDs from smallest to largest.





  4. In one of the classes, the SD of quiz scores is 5. Which one? Why?




  5. Is the SD in F greater than, less than, or equal to 1? Why?




  6. Provide a ballpark estimate of SD in each case.




Example 22.5

Let \(X\) have an Exponential(1) distribution. Make a ballpark estimate for \(\text{SD}(X)\), and then compute it.






22.1 Standardization

  • Standard deviation provides a “ruler” by which we can judge a particular realized value of a random variable relative to the distribution of values.
  • If \(X\) is a random variable with expected value \(\text{E}(X)\) and standard deviation \(\text{SD}(X)\), then the standardized random variable is

\[ Z = \frac{X - \text{E}(X)}{\text{SD}(X)} \]

  • However, keep in mind that comparing standardized values is most appropriate for distributions that have similar shapes.

Example 22.6

For which distribution — Uniform(0, 1) or Exponential(1) — is it more unsual to see a value smaller than 0.15?

  1. Standardize the value 0.15 relative to the Uniform(0, 1) distribution.




  2. Standardize the value 0.15 relative to the Exponential(1) distribution.




  3. Donny Dont says: “For the Uniform(0, 1) distribution, a value of 0.15 is 1.2 standard deviations below the mean. For the Exponential(1) distribution, a value of 0.15 is 0.85 standard deviations below the mean. So a value smaller than 0.15 is more unusual for a Uniform(0, 1) distribution, since there it’s more standard deviations below the mean.” Do you agree with his conclusion? Explain.




  4. How can you answer the original question in the setup?




  5. The value 0.15 is what percentile for a Uniform(0, 1) distribution?




  6. The value 0.15 is what percentile for an Exponential(1) distribution?




  7. For which distribution — Uniform(0, 1) or Exponential(1) — is it more unsual to see a value smaller than 0.15?




22.2 Chebyshev’s inequality

  • Chebyshev’s inequality says that for any distribution, the probability that the random variable takes a value more than \(z\) SDs away from its mean is at least \(1 - 1 / z^2\). For any distribution,
    • (\(z = 2\).) At most 25% of values fall more than 2 standard deviations away from the mean.
    • (\(z = 3\).) At most 11.1% of values fall more than 3 standard deviations away from the mean.
    • (\(z = 4\).) At most 6.25% of values fall more than 4 standard deviations away from the mean.
    • (\(z = 5\).) At most 4% of values fall more than 5 standard deviations away from the mean.
    • (\(z = 6\).) At most 2.8% of values fall more than 6 standard deviations away from the mean.
    • and so on, for different values of \(z\).
  • This universal “empirical rule” works for any distribution, but will tend to be very conservative when applied to any particular distribution.
  • In short, Chebyshev’s inequality says that if a value is more than a few standard deviations away from the mean then it is a fairly extreme value, regardless of the shape of the distribution.