Statistics & Probability
Covariance (sample)
How two variables vary together.
Formula
Formula
cov = Σ (xi−x̄)(yi−ȳ)n−1
Variables
| Symbol | Definition | Type & range | Units | Role |
|---|---|---|---|---|
| x, y | paired data series | list of real numbers | — | input |
Try it yourself
Interactive calculator
Worked examples
Example 1
Givenx = 1, 2, 3, 4, 5, y = 2, 4, 5, 4, 5
Result1.5
Example 2
Givenx = 1, 2, 3, y = 3, 2, 1
Result-1