Covariance Simplified: Learn It Once, Understand It Forever!
Covariance measures the relationship between two random variables \(X\) and \(Y\). The formula for covariance is:
\[
\text{Cov}(X, Y) = \frac{1}{n} \sum_{i=1}^n (x_i – \bar{X})(y_i – \bar{Y})
\]
Expanding the terms:
\[
\text{Cov}(X, Y) = \frac{1}{n} \sum_{i=1}^n
\textcolor{red}{x_i y_i} –
\textcolor{green}{x_i \bar{Y}} –
\textcolor{blue}{\bar{X} y_i} +
\textcolor{red}{\bar{X} \bar{Y}}
\]
Simplifying Covariance
We simplify further:
\[
\text{Cov}(X, Y) = \frac{1}{n} \sum_{i=1}^n x_i y_i
– \frac{\bar{Y}}{n} \sum_{i=1}^n x_i
– \frac{\bar{X}}{n} \sum_{i=1}^n y_i
+ \frac{\bar{X} \bar{Y}}{n} \sum_{i=1}^n 1
\]
Since \( \sum_{i=1}^n 1 = n \), this simplifies to:
\[
\text{Cov}(X, Y) = \frac{1}{n} \sum_{i=1}^n x_i y_i – \bar{X} \bar{Y}
\]
Final Simplification
The covariance formula can also be written as:
\[
\text{Cov}(X, Y) = \frac{1}{n} \sum_{i=1}^n x_i y_i – \left( \frac{1}{n} \sum_{i=1}^n x_i \right) \left( \frac{1}{n} \sum_{i=1}^n y_i \right)
\]
Interpretation of Covariance
Interpretation of the covariance formula:
\[
\text{Cov}(X, Y) =
\textcolor{blue}{\text{(Mean of the product of values of \(X\) and \(Y\))}}
–
\textcolor{red}{\text{(Product of means of \(X\) and \(Y\))}}
\]
This formula provides computational simplicity and insight into the relationship between \(X\) and \(Y\).
PDF Presentation
covarsimpleformulaVideo
Connect with PostNetwork Academy
- Website: PostNetwork Academy
- YouTube: PostNetwork Academy Channel
- Facebook: Facebook Page
- LinkedIn: LinkedIn Page
Thank You!
We hope this tutorial helped simplify covariance for you. Stay tuned for more insights from PostNetwork Academy.