Free online math practice

Covariance and correlation formulas Practice

Covariance, second-moment, and correlation relationships.

Start practicingCovariance and correlation formulas

  • Free to practice.
  • No account required.
  • Progress stays on this device.

What you’ll practice

Covariance carries the combined units of two variables, while correlation is standardized. The standard deviations in a correlation denominator must be nonzero.

Where this helps

Describing how two quantities vary together.

Before you start

Try the examples to see what you’ll practice. Check the answer form and any stated conditions.

Explainers

Compare the product with the separate means

Suppose (X, Y) is equally likely to be (1, 2) or (3, 4). E[X] = 2, E[Y] = 3, and E[XY] = (2 + 12)/2 = 7. Cov(X, Y) = 7 − 2 × 3 = 1.

Use Cov(X, Y) = E[XY] − E[X]E[Y]. E means the probability-weighted average. Multiply paired values before averaging XY. The required expectations must be finite.

Multiply paired deviations

The paired observations are (1, 2), (3, 6), and (5, 4). Their means are x̄ = 3 and ȳ = 4. Sum of deviation products = (−2)(−2) + (0)(2) + (2)(0) = 4. Sample covariance = 4/(3 − 1) = 2.

Use sₓᵧ = Σ(xᵢ − x̄)(yᵢ − ȳ)/(n − 1), with n ≥ 2 pairs. Keep each x paired with its own y and divide by n − 1.

Scale covariance by both spreads

If Cov(X, Y) = 3, σₓ = 2, and σᵧ = 3, then: ρₓᵧ = 3/(2 × 3) = 1/2.

Use ρₓᵧ = Cov(X, Y)/(σₓσᵧ). The symbols σₓ and σᵧ are the population standard deviations. Dividing by both removes the units. Both must be finite and strictly positive. If either is zero, this correlation is undefined.

Try a few examples

Real practice. Real progress.

Example 1 of 3

X and Y have finite positive standard deviations and a defined covariance.

Choose the exact expression.

Grades and courses that include this topic

Related practice

Start practicingCovariance and correlation formulas

  • Free to practice.
  • No account required.
  • Progress stays on this device.