Covariance Calculator
Calculate sample or population covariance between two paired datasets.
Inputs
Covariance
6.666667
Mean of X
5.0000
Mean of Y
4.0000
Step by step
Values used
X values (comma separated) = 2, 4, 6, 8; Y values (comma separated) = 1, 3, 5, 7; Type = Sample (n−1)
Formula applied
Cov(X,Y) = Σ(xᵢ−x̄)(yᵢ−ȳ) / (n−1)
Covariance
= 6.666667
Mean of X
= 5.0000
Mean of Y
= 4.0000
How it works
Covariance measures how two variables change together. Positive covariance indicates they tend to increase together; negative means one tends to decrease when the other increases. Unlike correlation, covariance is not bounded to [−1, 1].
Formula
Cov(X,Y) = Σ(xᵢ−x̄)(yᵢ−ȳ) / (n−1)
- xᵢ,yᵢ
- Paired data points
- x̄,ȳ
- Means
- n
- Sample size
Frequently Asked Questions
How does covariance relate to correlation?
Correlation is the standardized form of covariance: r = Cov(X,Y) / (σₓ × σᵧ). This removes the effect of scale.
Can covariance be greater than 1?
Yes, covariance is unbounded. Its magnitude depends on the scales of X and Y. That's why correlation (bounded −1 to 1) is often preferred.