How to use
Covariance measures the direction of joint variation between two variables. Enter equal-length datasets and choose sample or population mode. A positive sign means the variables tend to move together, a negative sign means opposite movement, while magnitude depends on the measurement units.
- Enter X values.
- Enter Y values with the same count and matching order.
- Choose sample to divide by n−1 or population to divide by n.
- Review covariance, means and r for context.
How it is calculated
Example
Example: X={1,2,3,4,5} and Y={2,4,5,4,5}. In sample mode, mean X=3 and mean Y=4; paired deviations from those means are multiplied and summed before division by n−1.
Important notes
Do not compare covariance magnitudes directly across datasets with different units. Correlation standardizes the relationship to −1 through 1. Neither covariance nor correlation proves causation.
Frequently asked questions
Sample versus population covariance?
Sample covariance divides by n−1; population covariance divides by n.
Does covariance have units?
Yes. Its unit is the product of the X and Y units.
Why show correlation too?
Correlation removes scale effects and provides context for covariance.
Does positive covariance mean a strong relationship?
Not necessarily; covariance magnitude depends on units.