What is Correlation?
Correlation is a statistical measure that describes the strength and direction of the relationship between two variables. If two variables move in the same direction, they are positively correlated; if they move in opposite directions, they are negatively correlated.
Karl Pearson's Coefficient of Correlation ($r$)
The Pearson correlation coefficient, denoted by $r$, measures the linear association between two continuous variables. The value ranges from $-1$ to $+1$, where:
- $r = 1$: Perfect positive linear correlation.
- $r = -1$: Perfect negative linear correlation.
- $r = 0$: No linear correlation.
The formula is given by: $$r = \frac{n\sum XY - (\sum X)(\sum Y)}{\sqrt{[n\sum X^2 - (\sum X)^2][n\sum Y^2 - (\sum Y)^2]}}$$
Step-by-Step Calculation
Given data:
| X | Y | XY | X^2 | Y^2 |
|---|---|---|---|---|
| 20 | 50 | 1000 | 400 | 2500 |
| 30 | 46 | 1380 | 900 | 2116 |
| 40 | 30 | 1200 | 1600 | 900 |
| 50 | 24 | 1200 | 2500 | 576 |
| 60 | 8 | 480 | 3600 | 64 |
| **Sum** | **Sum** | **5260** | **9000** | **6156** |
Sums: $n=5$, $\sum X=200$, $\sum Y=158$, $\sum XY=5260$, $\sum X^2=9000$, $\sum Y^2=6156$.
- Calculate the numerator: $5(5260) - (200)(158) = 26300 - 31600 = -5300$.
- Calculate the denominator terms:
- Term X: $5(9000) - (200)^2 = 45000 - 40000 = 5000$.
- Term Y: $5(6156) - (158)^2 = 30780 - 24964 = 5816$.
- Denominator: $\sqrt{5000 \times 5816} = \sqrt{29080000} \approx 5392.59$.
- Result: $r = \frac{-5300}{5392.59} \approx -0.9828$.
Conclusion
The value $r \approx -0.98$ indicates a very strong negative linear correlation between variables $X$ and $Y$.