Home

Covariance & Correlation

Covariance and correlation calculator. Enter paired data to compute sample covariance and Pearson r, judging how strongly the variables relate—for data analysis.

展开更多 ▾
r = Cov(X,Y)/(σX·σY)
one pair per line, comma or space separated

📖 Tutorial | Covariance & Correlation

1. Definition
Covariance Cov(X,Y)=Σ(xᵢ−x̄)(yᵢ−ȳ)/(n−1) measures co-movement; Pearson r=Cov/(σXσY) standardizes it to [−1,1].
2. Symbols
SymbolMeaning
Covsample covariance
rPearson r, −1≤r≤1
r>0positive association
r<0negative association
3. How it works
  • Compute each mean;
  • Sum products of deviations;
  • Divide by n−1 for sample covariance;
  • Divide by the two sample sds for r.
4. Steps
  1. Enter one pair per line;
  2. Click Calculate;
  3. Read covariance and r;
  4. Judge direction/strength by r.
5. Example
Example: (1,2)(2,3)(3,5)(4,6)(5,7). Cov=3.25, r≈0.991, strong positive.
6. Pitfalls
r measures only linear association, not causation;
Small |r| may hide non-linear relation;
At least two pairs are required.

❓ FAQ | Covariance & Correlation

Covariance vs correlation?
Covariance has units; r is standardized to [−1,1] and comparable across variables.
What does r=0 mean?
No linear association; a non-linear relation may still exist.
Is correlation causation?
No; association only, causation needs further evidence.
Range of r?
[−1,1]; closer to ±1 means stronger linear relation.
Why divide by n−1?
Sample estimates the population; n−1 gives an unbiased sample covariance.