The topic of correlation is one of the most enjoyable parts of statistics,
I think. And that is because everyone can understand correlation.
We all know what it is to have relationships with other people, and
we know how our behavior can change when we are around others.
Except that instead of describing relationships between people,
we are describing relationships between variables, and
variables are actually much easier to deal with than people. So let me begin with a most curious question.
Where is the most dangerous place in the world?
Where are you most likely to die? I mean, if you wake up dead
where are we most likely to find you?
More people die in bed than any other place.
Therefore, if you don't want to die, don't go to bed, right?
Now despite that strong correlation between death rates and horizontal posture, there is a third variable that explains
why you need not fear going to bed each night.
Most people die in hospitals or are placed in a bed before they die.
There is a relationship between dying and being in bed,
but it is not a causal relationship. It is a correlation.
The term correlation is synonymous with
relationship. In fact, when you hear correlation you should think
relationship in the same way when you hear regression you should think prediction.
Correlation and regression are closely linked, and we will talk more about regression in the next unit.
Correlation is a way of measuring the extent to which two variables are related
Related means that changes in one variable are consistently associated with changes in another variable,
and there are a limited number of ways that a variable can change.
When one variable increases does the other variable increase,
decrease, or
stay the same.
So let's imagine that we are running the concession stand at the football game, and of course
American football season begins in late August, and the weather will still be hot.
But by the end of the season in November the weather will be cold.
So we need to know how much product we should order for the concession stand.
Consider times when the weather is hot.
As temperature goes up,
what happens to the sales of cold soda?
It also goes up.
Hotter temperatures correlate with more cold soda sales.
Cold temperatures means fewer cold soda sales.
So the way that these two variables go up and down is together. They change in the same way.
Now what happens as temperature goes up to the sales of hot chocolate?
They go down.
Hotter temperatures correlate with less hot chocolate sales.
Colder temperatures, when the temperature goes down,
correlates with
increased hot chocolate sales. When one goes up the other goes down. They change in the opposite way, and
how about the sales of those big foam number one fingers?
How does that relate to temperature?
Well, it stays the same. There's really no relationship between the temperature and the sales of the foam number one fingers.
Temperature goes up, foam fingers may go up or go down
because those variables are unrelated.
So we have three options. When one variable increases the other variable can increase,
it can decrease, or
It could stay the same.
When two variables are correlated
changes in one variable are consistently associated with changes in another variable.
Now, let's talk briefly about the math behind correlation.
We have learned about variance.
Variance is the degree to which a variable deviates from its mean.
We learned about
variability, and variance, and standard deviation.
Well here is a new term:
covariance.
Covariance is the degree to which two variables deviate from their respective means.
Covariance is how two variables vary together. They may deviate together in a similar way, if so
strong covariance.
When two variables co-vary together they are correlated.
In fact, when covariance is standardized, divided by
both standard deviations, it becomes a correlation
So we are going to learn how to measure that covariance so that we can use the statistical technique of correlation.