How to derive correlation from variances
JefferiesData Scientist · Technical ScreenLast updated
Evaluates derivation of correlation from variance identities for two random variables. Strong answers explain why Var(X+Y) and Var(X) alone do not identify correlation, then derive covariance and correlation when Var(Y) is also known.
Deriving Correlation from Variances
You have two random variables X and Y with finite second moments. You are given Var(X + Y) and Var(X).
Answer the questions below.
Constraints & Assumptions
- All variances are computed under the same probability model.
- Variances are finite.
- Correlation is defined only when Var(X) and Var(Y) are positive.
- Show the variance identity used in the derivation.
Clarifying Questions to Ask
- Is Var(Y) known?
- Are X and Y non-degenerate?
- Are we assuming independence, or should covariance be inferred?
- Are these population variances or sample estimates?
Part 1 - Identifiability
Is Corr(X, Y) identifiable from only Var(X + Y) and Var(X)? Explain why or why not.
What This Part Should Cover
- Use Var(X + Y) = Var(X) + Var(Y) + 2 Cov(X, Y).
- Explain that Var(Y) and Cov(X, Y) are both unknown.
- State that one equation with two unknowns does not identify correlation.
- Note that covariance must be normalized by both standard deviations.
Part 2 - Derivation with Var(Y)
If Var(Y) is also given, derive Corr(X, Y) in terms of Var(X + Y), Var(X), and Var(Y).
What This Part Should Cover
- Rearrange the variance identity to get Cov(X, Y) = [Var(X + Y) - Var(X) - Var(Y)] / 2.
- Divide by sqrt(Var(X) Var(Y)).
- Provide the final formula for correlation.
- Mention valid inputs must produce a correlation in [-1, 1].
Follow-up questions
- How would the formula change for Var(X - Y)?
- What if Var(Y) = 0?
- How would sampling error affect an estimated correlation from sample variances?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.