Enter your x and y values to see how they vary together.
Numbers separated by commas, spaces or new lines.
One y for each x, in the same order.
Try
Result
You enteredx={1,2,3,4,5}y={2,4,5,4,5}
Sample covariance 1.5,population covariance 1.2
Mean of x
3
Mean of y
4
Show the work
1
Means of x and y
Covariance measures how x and y move together around their means, so find the means first. There are n=5 pairs.
xˉ=3yˉ=4
2
Sum of products of deviations
Each pair contributes the product of its two deviations: positive when both are above or both below their means, negative when one is above and the other below.