Data & ComputingStatisticsA-Level
AQAIBAbiturAPBaccalauréat GénéralBachilleratoCAPSCBSE

Covariance Calculator

Measure of joint variability.

Use the free calculatorCheck the variablesOpen the advanced solver
This is the free calculator preview. Advanced walkthroughs stay in the app.
Result
Ready
Covariance

Formula first

Overview

Covariance measures the joint variability of two random variables, indicating the direction of their linear relationship. A positive value signifies that variables move in the same direction, while a negative value indicates an inverse relationship.

Symbols

Variables

Cov(X,Y) = Covariance, E[XY] = Mean Product, \mu_x = Mean X, \mu_y = Mean Y

Covariance
Mean Product
Mean X
Mean Y

Apply it well

When To Use

When to use: Apply this formula when you need to assess the linear dependency between two sets of data or as a step toward calculating correlation. It is used in probability distributions to determine how much variables change together.

Why it matters: It is crucial in finance for risk management and portfolio optimization, helping investors identify assets that do not move in tandem. It also underpins dimensionality reduction techniques like Principal Component Analysis (PCA) in data science.

Avoid these traps

Common Mistakes

  • Mixing up means for X and Y.
  • Interpreting covariance as correlation.

One free problem

Practice Problem

A financial analyst determines that the expected value of the product of two stocks (X and Y) is 45. If the average return of stock X is 5 and the average return of stock Y is 8, find the covariance.

Mean Product45
Mean X5
Mean Y8

Solve for:

Hint: Subtract the product of the means from the expected product.

The full worked solution stays in the interactive walkthrough.

References

Sources

  1. Wikipedia: Covariance
  2. A First Course in Probability by Sheldon Ross
  3. Probability and Statistics for Engineers and Scientists, 9th Edition, by Walpole, Myers, Ye, and Shafer
  4. Sheldon M. Ross, A First Course in Probability
  5. IUPAC Gold Book: Covariance (C01373)
  6. AQA A-Level Mathematics — Statistics (Bivariate Data)