Calculate sample or population covariance between two paired datasets.
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].
Cov(X,Y) = Σ(xᵢ−x̄)(yᵢ−ȳ) / (n−1)
Correlation is the standardized form of covariance: r = Cov(X,Y) / (σₓ × σᵧ). This removes the effect of scale.
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.