Covariance
How two variables vary together.
Key idea
How two variables vary together.
In depth
Cov(X, Y) = E[(X − μₓ)(Y − μᵧ)] measures whether variables move together. Positive means they rise together; negative means opposite. Scaling by SDs gives the correlation.
Worked example
X and Y = 2X have covariance 2Var(X) > 0.
Formula
Real-world uses
- Measuring whether two stock prices tend to move together when building a portfolio
Common mistake
Reading covariance size without scale, and treating zero covariance as independence.
How to learn this
- Read the key idea and say it in your own words.
- Work through the worked example, then try a similar problem.
- Use the interactive lesson’s visual and mini-quiz to check the pattern.
Frequently asked questions
What is Covariance?
How two variables vary together. It is a topic at the expert level in Probability & Statistics.
What is the formula for Covariance?
The key formula is Cov(X,Y) = E[XY] − E[X]E[Y].
Where is Covariance used in real life?
Real-world examples: Measuring whether two stock prices tend to move together when building a portfolio.
What should I learn before Covariance?
Make sure you are comfortable with Joint and Marginal Distributions, the previous topic in Probability & Statistics.
What is a common mistake with Covariance?
Reading covariance size without scale, and treating zero covariance as independence.
How can I practise Covariance?
Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.
What comes after Covariance?
Move on to Law of Large Numbers next.
Related expert topics in Probability & Statistics
- Skewness and Kurtosis – Measures of asymmetry and tail heaviness.
- Residuals and R² – Error of a fit and proportion of variance explained.
- Simpson’s Paradox – A trend reverses when groups are combined.
- Law of Total Probability – Split an event over a partition.
- Bayes’ Theorem – Update beliefs with evidence.
- Medical Tests and Base Rates – Why positive results can still be probably false.