Covariance Correlation

Multivariate Distributions

What is Covariance?

Covariance is a statistical term that refers to a systematic relationship between two random variables in which a change in the one reflects a change in other variable.

I. Covariance tells us the Direction

II. Measured on a scale

III. Formula

Covxy=i=1N(xiμx)(yiμy)N

where

What is Correlation?

Correlation measures the relationship between two variables, indicating how one variable changes when the other does.

I. Types:

II. Measured on a scale

III. Formula

Corrxy=Covxyσxσy

Why do we divide the covariance by the standard deviations to derive Correlation?

To understand why, we have to look at what each part of the formula actually does.

Covxy=i=1N(xiμx)(yiμy)N
《 I 》Covariance tells us the Direction

Covariance measures how two variables move together.

The Problem: Covariance is "unscaled." Its value depends entirely on the units of measurement. If you calculate the covariance of heights and weights in meters and kilograms, you get a small number. If you switch to feet and pounds, the covariance number becomes massive, even though the relationship between the people hasn't changed.

《 II 》 Standard Deviation tells us the Scale

The standard deviations (σx and σy) represent the "typical" spread or scale of each individual variable. They are measured in the same units as the data (e.g., meters or kilograms).

《 III 》The Division "Normalizes" the Data

By dividing the covariance by the product of the standard deviations, we are essentially canceling out the units.
Think of it like this:

When you divide them, the units cancel out completely, leaving you with a pure number. This process is called Normalization or Standardization.

Corrxy=Covxyσxσy=i=1N(xiμx)(yiμy)Ni=1N(xiμx)2Ni=1N(yiμy)2NCorrxy=i=1N(xiμx)(yiμy)(xiμx)2(yiμy)2
Covariance vs Correlation
Parameter Covariance Correlation
Meaning A measure of how much two
random variables change together.
A statistical measure that indicates
how strongly two variables are related.
What is it? Measure of Correlation Scaled version of Covariance
Values [, ] [-1, 1]
Change in Scale Affects covariance Does not effect correlation
Unit of Measurement Measured in the product of the
units of the two variables.
It is a dimensionless unit
(no units)
Goal To find the direction of the relationship. To find the strength and direction
of the relationship.
Formula Covxy=i=1N(xiμx)(yiμy)N Corrxy=i=1N(xiμx)(yiμy)(xiμx)2(yiμy)2