2
$\begingroup$

When tutoring, I try to simplify concepts. I came up with these examples to explain the intention behind variance and covariance. Could you please help me find conceptual, pedagogical or mathematical errors I've overlooked? Any comments and improvements are appreciated. And if it's correct, please feel free to use it.

Variance

A psychologist monitors Jack and his Cat in their home and regularly notes their respective moods. Negative numbers indicate stress, positive numbers indicate happiness.

Jack

Mood -20 πŸ€¦β€β™‚οΈ -15 πŸ™β€β™‚οΈ -10 πŸ™β€β™‚οΈ -5 πŸ€·β€β™‚οΈ 0 πŸ€·β€β™‚οΈ +5 πŸ€·β€β™‚οΈ +10 πŸ™‹β€β™‚οΈ +15 πŸ™‹β€β™‚οΈ +20 πŸ™†β€β™‚οΈ
Count 3 3 1 1 2 1 2 1 4

Jack's Cat

Mood -20 πŸ™€ -15 😿 -10 😿 -5 🐱 0 🐱 +5 🐱 +10 😺 +15 😺 +20 😻
Count 0 1 1 5 5 3 2 1 0

Variance is a measure for how much a value deviates from its arithmetic mean. Variance values large deviations much stronger than smaller ones.

The sample variance of Jack's mood is 238.24, while the cat's mood shows a sample variance of 55.88. From these numbers the psychologist can induce correctly, that the cat is overall a lot calmer than Jack.

Covariance

In a new measurement, the psychologist tries to determine, whether Jack and his cat influence each other in their moods. She makes three different measurements:

Jack get's a call from his boss πŸ€¦β€β™‚οΈ, cat sleeps 🐱

Time (minutes) 0 1 2 3 4 5 6 7
Jack's mood +10 -5 -15 -15 -5 0 -5 -5
Cat's mood 0 -1 +1 0 0 0 0 0

Covariance: -1.25

Jack comes home from work πŸ™‹β€β™‚οΈ, just in time for feeding his Cat 😺

Time (minutes) 0 1 2 3 4 5 6 7
Jack's mood -5 +5 +10 +10 +10 +10 +5 +5
Cat's mood -10 +10 +15 +15 +15 +10 +5 0

Covariance: 37.5

The cat intentionally anger's Jack 😺 by throwing a flower pot to the ground πŸ€¦β€β™‚οΈ

Time (minutes) 0 1 2 3 4 5 6 7
Jack's mood +10 +10 +10 -20 -15 -15 -10 -10
Cat's mood 0 +5 +10 +15 +15 +10 +5 +5

Covariance: -37.5

Covariance shows, whether two variables deviate together. In the first example only Jack is upset, the cat sleeps soundly. This makes for a covariance near zero, since the two moods don't really affect each other.

When Jack meets and feeds his cat, both get happier together. The positive covariance shows, that both variables deviate in the same direction from their respective means.

When the Cat angers Jack it get's happier while Jack grows quite unhappy at the same time. Here the covariance is negative, showing that the variables are connected but moving in opposite directions.

$\endgroup$
1
  • 1
    $\begingroup$ Appealing to intuition is not particularly useful - intuition is a very personal thing. If you read Feynman's books you will realize that your intuition is not related to his intuition at all... $\endgroup$
    – Jon Custer
    Commented May 22, 2023 at 16:52

2 Answers 2

4
$\begingroup$

Here is an everyday example familiar to many students. The time it takes to walk to school has less variance than the time it takes to get to school by bus (this is true everywhere I've lived).

This example is nice also because often the mean time walking is longer than the mean time by bus, but from experience one knows that one prefers the security of the low variance choice (or one prefers to get there quickly some of the time, that depends on psychology). Students could even do an experiment and measure such times.

$\endgroup$
1
$\begingroup$

I think it's good to try to help students develop some intuition for variance and covariance. However, a pedagogical problem I see with your variance example is that both distributions have the same expected value. This allows the psychologist to conclude that "the cat is overall a lot calmer than Jack," but the same reasoning would not work if the distributions did not have the same center. This is problematic.

I suggest using distributions with different centers, and drawing conclusions that depend only on the spread of the distributions. If you want students practice calculating the variances by hand, it helps to keep things small. For example, consider the following frequency tables, where $X$ represents Jack's mood and $Y$ represents his cat's mood, both on a scale from -1 to 1. $$ \begin{array}{c|ccc} X & -1 & 0 & 1 \\ \hline \text{freq.} & 1 & 2 & 1 \end{array} \qquad \begin{array}{c|ccc} Y & -1 & 0 & 1 \\ \hline \text{freq.} & 2 & 2 & 0 \end{array} $$ From the fact that the variance of $X$ is greater than the variance of $Y$, we can reasonably conclude that "Jack's mood fluctuates more than his cat's mood does."

If your students have some physics knowledge, another way to intuit variance is through moment of inertia. The variance represents how difficult it would be to "rotate" a distribution around its center. When the mass of a distribution is farther from its center, it will be more difficult to rotate. This generalizes well to continuous distributions.

For your covariance examples, you're missing an example of a situation where zero covariance does not imply independence. Two random variables can be nonlinearly dependent and have zero covariance. For example, we can consider the following contingency table. (I'm using a contingency table to be consistent with the frequency tables in the variance example. You could also show the raw data in both examples. Students should see both.)

$$ \begin{array}{c|ccc|l} _{\large X}\backslash^{\large Y} & -1 & 0 & 1 \\ \hline -1 & 1 & 0 & 0 & 1 \\ 0 & 0 & 2 & 0 & 2 \\ 1 & 1 & 0 & 0 & 1 \\ \hline & 2 & 2 & 0 & 4 \end{array} $$ The covariance of $X$ and $Y$ is zero, but $X$ and $Y$ exhibit a clear relationship. When Jack's mood is neutral, his cat's mood is neutral. When Jack's mood is not neutral, his cat's mood is negative.

For any concept, it's important to have examples that show boundaries/limitations/exceptions, as well as to avoid focusing on special examples with non-general properties. Also, I agree with Jon Custer that intuition is very personal, and an example that is illuminating for one student may be confusing to another. So be flexible!

$\endgroup$

Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.