Covariance
Covariance measures whether two variables move together, positive when both tend to rise above their means simultaneously and negative when one rises as the other falls, though its size depends on the units of measurement.
Also known ascov
See it move
A scatter chart with a fitted trend line plots advertising spend (€'000) on the horizontal axis against sales (€'000) on the vertical axis. The covariance between spend and sales is reported as 4, indicating a positive relationship: when spend is above its mean, sales tend also to be above their mean, so the data points cluster in the upper-right and lower-left quadrants around the two means.
The formula
Variables
- Individual observation of variable X (—)
- Individual observation of variable Y (—)
- Sample mean of X (—)
- Sample mean of Y (—)
- Number of paired observations (—)
Sample covariance
Check yourself
An analyst observes four café outlets and records monthly advertising spend and sales revenue for each. The sum of the products of deviations from their respective means, Σ(xi − x̄)(yi − ȳ), equals 18. What is the sample covariance between advertising spend and sales?