FRM Exam Part I · Sample Moments
Covariance and Correlation: Sample Formulas and Limitations
Updated 11 October 2026 · Fact-checked
Sample covariance measures how two variables move together: Σ(xᵢ − x̄)(yᵢ − ȳ) ÷ (n − 1). Sample correlation divides covariance by both standard deviations, giving a unit-free value between −1 and +1. To solve questions, compute means, deviations, cross-products, then divide. Correlation captures linear dependence only.
Understand Covariance and Correlation
Covariance tells you whether two variables tend to move in the same direction. If x is above its average when y is above its average, the cross-product is positive. If they move opposite ways, it is negative. Average those cross-products and you have the covariance.
The problem is units. Covariance of a stock return and an interest rate change is in "percent times percent". Its size depends on how you scale the data, so you cannot tell if a link is strong or weak. Only the sign is clear.
Correlation fixes this. You divide the covariance by the product of the two sample standard deviations. The units cancel. The result always lies between −1 and +1. A value of +1 means a perfect increasing linear relationship, −1 a perfect decreasing one, and 0 means no linear relationship.
The key limit is that correlation measures linear dependence only. Two variables can be tightly linked in a curve, such as y = x² with x symmetric around zero, and still have correlation near zero. Correlation is also sensitive to outliers, can change across market regimes (it often rises in crises), and does not show causation.
In risk work, covariance and correlation feed portfolio variance. Lower correlation means more diversification benefit. Be sure you know which one a question gives you and which one it asks for.
Key formulas to remember
- Sample covariance
- s_xy = Σ(xᵢ − x̄)(yᵢ − ȳ) ÷ (n − 1)
- Uses n − 1 for the sample. Population covariance divides by n. Equivalent form: [Σxᵢyᵢ − n·x̄·ȳ] ÷ (n − 1).
- Sample correlation
- r = s_xy ÷ (s_x × s_y)
- Unit-free, between −1 and +1. The n − 1 factors cancel, so you can use sums of squares and cross-products directly.
- Correlation from sums
- r = Σ(xᵢ − x̄)(yᵢ − ȳ) ÷ √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²]
- Fastest when you have deviations. No need to divide by n − 1 at all.
- Covariance from correlation
- s_xy = r × s_x × s_y
- Use when a question gives r and the standard deviations.
- Variance as self-covariance
- Cov(x, x) = Var(x)
- Covariance of a variable with itself is its variance.
- Scaling property
- Cov(aX + b, cY + d) = ac × Cov(X, Y); Corr(aX + b, cY + d) = Corr(X, Y) for ac > 0
- Correlation is unchanged by positive linear rescaling. It flips sign if ac < 0.
How to solve Covariance and Correlation questions
Use this routine for any question that asks for sample covariance or correlation from data, or that moves between the two.
- 1Write down what is given: raw data, summary sums, or covariance and standard deviations.
- 2Compute the sample means x̄ and ȳ.
- 3Compute the deviations (xᵢ − x̄) and (yᵢ − ȳ) for each observation.
- 4Multiply deviations pairwise and sum them to get Σ(xᵢ − x̄)(yᵢ − ȳ). Also sum the squared deviations for each variable.
- 5Divide the cross-product sum by n − 1 for sample covariance. For correlation, divide the cross-product sum by the square root of the product of the two squared-deviation sums.
- 6Check the result: correlation must be in [−1, +1], and its sign must match the sign of the covariance.
- 7Read the question for interpretation: linear only, outlier sensitivity, no causation.
Quickest way: Sums-of-squares shortcut and calculator statistics mode
When to use it: Use when you have small datasets (about 4 to 6 pairs) and time is tight.
- Skip the n − 1 divisions if only correlation is needed. They cancel.
- Compute Sxy = Σ(xᵢ − x̄)(yᵢ − ȳ), Sxx and Syy using deviations.
- Then r = Sxy ÷ √(Sxx × Syy).
- On a financial calculator, enter pairs in the statistics (two-variable) mode and read r directly. Check that it gives the sample, not population, standard deviation if you need covariance.
- Sanity check: if the data rise together, r must be positive and close to 1 when the points are nearly on a line.
Common mistakes in Covariance and Correlation
Dividing by n instead of n − 1 for sample covariance.
Population formulas are learned first and look the same.
Fix: The word "sample" means n − 1. If the question gives only a population, divide by n.
Mixing n and n − 1 when computing correlation from covariance and standard deviations.
Covariance and standard deviations are computed separately.
Fix: Use the same divisor for all three. Or use the sums-of-squares form where the divisor cancels.
Treating zero correlation as independence.
Correlation of zero sounds like no relationship.
Fix: Zero correlation means no linear relationship only. Nonlinear dependence can remain. Independence implies zero correlation, not the reverse.
Interpreting covariance size as strength of relationship.
Covariance looks like a measure of strength.
Fix: Covariance depends on units. Use correlation to judge strength.
Getting a correlation outside −1 to +1 and not noticing.
Arithmetic slips in sums, or forgetting the square root.
Fix: Always check the range. A value like 1.4 means an error, often a missing square root.
Assuming correlation is stable and implies causation.
A single estimate is treated as a fixed fact.
Fix: Remember correlations are estimates that shift over time and rise in stress. They show association, not cause.
Worked examples
Example 1
Monthly returns (%) for two assets over four months: X = 2, 4, 6, 8 and Y = 1, 3, 2, 6. Compute the sample covariance and sample correlation.
Show the solution
- n = 4. x̄ = (2+4+6+8) ÷ 4 = 5. ȳ = (1+3+2+6) ÷ 4 = 3.
- Deviations of x: −3, −1, 1, 3. Deviations of y: −2, 0, −1, 3.
- Cross-products: (−3)(−2) = 6; (−1)(0) = 0; (1)(−1) = −1; (3)(3) = 9. Sum = 14.
- Sample covariance = 14 ÷ (4 − 1) = 4.6667.
- Sxx = 9 + 1 + 1 + 9 = 20. Syy = 4 + 0 + 1 + 9 = 14.
- r = 14 ÷ √(20 × 14) = 14 ÷ √280 = 14 ÷ 16.7332 = 0.8367.
Answer: Sample covariance ≈ 4.67 (%²); sample correlation ≈ 0.837.
Example 2
Two portfolios have a sample correlation of 0.60. Their sample standard deviations are 5% and 8%. Each return series is then rescaled: X is multiplied by 2 and Y is multiplied by 3, with no shift. What is the new covariance and correlation?
Show the solution
- Original covariance = r × s_x × s_y = 0.60 × 5 × 8 = 24 (%²).
- Scaling: Cov(2X, 3Y) = 2 × 3 × 24 = 144.
- Check via new standard deviations: 10 and 24. New covariance = 0.60 × 10 × 24 = 144.
- Correlation is unchanged by positive rescaling, so it stays at 0.60.
Answer: New covariance = 144 (%²); correlation remains 0.60.
Exam tips
- Read whether the question says sample or population. It decides n − 1 or n.
- If only correlation is asked, use the sums-of-squares form and skip the divisors.
- Expect conceptual options on linearity: pick the answer saying correlation captures linear dependence only.
- Use the scaling rules to avoid recomputing: correlation is unchanged by positive linear transformations, covariance is not.
- Always check that your correlation is between −1 and +1 before choosing an answer.
Practice questions from Sample Moments
- A risk analyst estimates the sample kurtosis of a portfolio's daily returns to be 5.2. Which interpretation is correct?
- Which statement about the coskewness S(X,X,Y) is correct?
- Three i.i.d. observations X1, X2, X3 each have variance 12. Estimator A is the sample mean (X1+X2+X3)/3. Estimator B is (X1+2X2+3X3)/6. Both…
- An estimator of a population mean is defined as 0.25X1 + 0.25X2 + 0.25X3 + 0.25X4 + 0.10 for i.i.d. observations with mean 8 and variance 16…
- A risk analyst has five daily returns (in %): 1, 3, 5, 7, 9. She treats them as a sample from a larger return distribution. What is the unbi…
Covariance and Correlation in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Covariance and Correlation: frequently asked questions
What is the difference between covariance and correlation?
Covariance shows the direction of co-movement and depends on the units of the variables. Correlation is covariance divided by both standard deviations, so it is unit-free and lies between −1 and +1. Use correlation to judge strength.
How do I calculate the correlation coefficient from data?
Find the means, then the deviations from the means. Sum the cross-products of deviations and the squared deviations for each variable. Divide the cross-product sum by the square root of the product of the two squared-deviation sums.
Why does sample covariance use n − 1?
The sample mean is estimated from the same data, which uses up one degree of freedom. Dividing by n − 1 corrects this and gives an unbiased estimate of the population covariance.
What are the limitations of correlation in risk management?
It captures linear dependence only, is sensitive to outliers, and changes over time. Correlations tend to rise in market stress, so diversification can fall when you need it most. It also does not prove causation.