metrics explained

Variance vs Covariance: What's the Difference?

When it comes to statistical measures of spread, the two most common are variance and covariance. But what's the difference between these two measures? Here's a quick overview:

Variance

Variance is a measure of how far a set of numbers is spread out from the mean. The formula for variance is:

Variance formula

where x is each number in the set, is the mean, and n is the number of items in the set.

Variance is always positive, because the difference from the mean is squared. This means that variance is affected by outliers (extreme values that are far from the rest of the data) more than other measures of spread.

Covariance

Covariance is a measure of how two variables vary together. The formula for covariance is:

Covariance formula

where x and y are the two variables being compared,

x

and y are the means of those variables, and n is the number of items in the set.

Covariance can be positive or negative, depending on whether the variables increase or decrease together. If the variables tend to increase together, the covariance is positive. If the variables tend to decrease together, the covariance is negative. If the variables are unrelated, the covariance is zero.

Variance and Covariance in Practice

Both variance and covariance are used in a variety of statistical applications. For example, variance is used in calculating standard deviation, which is a measure of how spread out a set of data is. Covariance is used in calculating correlation, which is a measure of how two variables relate to each other.

Variance and covariance can also be used together in regression analysis, which is a statistical technique used to predict the value of one variable based on the value of another. In regression analysis, the variance and covariance of the variables are used to calculate the slope and intercept of the regression line.

The Bottom Line

Variance and covariance are two measures of spread that are used in statistics. Variance is a measure of how far a set of numbers is spread out from the mean. Covariance is a measure of how two variables vary together. Both measures are used in a variety of statistical applications.

Upgrade your financial models

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.