# Statistics - Covariance

The covariance gives the degree to which two variables vary together.

Covariance is not considered hindering interpretability in higher dimensions.

## Equation

$$\begin{array}{rrl} \text{Covariance of X and Y} & = & \frac{\displaystyle \sum_{i=1}^{N}{(X_i-\bar{X}).(Y_i-\bar{Y})}}{N} \\ & = & \frac{\displaystyle\sum_{i=1}^{N}{\href{cross_product}{\text{Cross Product of X & Y}}}}{N} \\ & = & \frac{\displaystyle \href{cross_product#SP}{\text{Sum of Cross Product (SP)}}}{N} \end{array}$$

where:

• $\bar{X}$ and $\bar{Y}$ are the mean
• N is the sample size