Covariance calculator

This online calculator computes covariance between two discrete random variables. It also shows the expected value (mean) of each random variable. You can find the formula used for the calculation of covariance below the calculator.

This page exists due to the efforts of the following people:



Karen Luckhurst

Created: 2019-02-27 13:23:49, Last updated: 2021-09-30 12:33:17
Creative Commons Attribution/Share-Alike License 3.0 (Unported)

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work Also, please do not modify any references to the original work (if any) contained in this content.

PLANETCALC, Covariance Calculator

Covariance Calculator

Digits after the decimal point: 2
Expected Value of X / Mean of X
Expected Value of Y / Mean of Y
Covariance, cov(X,Y)

Covariance between two discrete random variables

\operatorname {cov} (X,Y)=\frac {1}{n-1}\sum _{i=1}^{n}(x_{i}-E(X))(y_{i}-E(Y)),
where E(X) is the mean of X, and E(Y) is the mean of Y.

Note that we only know sample means for both variables, that's why we have n-1 in the denominator

If the covariance is positive, then increasing one variable results in the increase of another variable. If the covariance is negative, then increasing one variable results in the decrease of another variable. The absolute value of covariance is usually normalized by dividing by the product of the variables' standard deviations. This is the so-called Pearson correlation coefficient.

URL copied to clipboard
PLANETCALC, Covariance calculator