Correlation and Regression Example
Numerical Example – Karl Pearson’s Correlation Coefficient (r)
🔹 Question
Find the coefficient of correlation between X and Y.
| X | 2 | 4 | 6 | 8 | 10 |
|---|---|---|---|---|---|
| Y | 1 | 3 | 4 | 6 | 8 |
🔹 Step 1: Formula
🔹 Step 2: Prepare Calculation Table
| X | Y | X² | Y² | XY |
|---|---|---|---|---|
| 2 | 1 | 4 | 1 | 2 |
| 4 | 3 | 16 | 9 | 12 |
| 6 | 4 | 36 | 16 | 24 |
| 8 | 6 | 64 | 36 | 48 |
| 10 | 8 | 100 | 64 | 80 |
Now compute totals:
🔹 Step 3: Substitute in Formula
Numerator:
Denominator:
🔹 Step 4: Final Answer
✅ Interpretation:
There is a very strong positive correlation between X and Y.
2️⃣ Numerical Example – Spearman’s Rank Correlation (ρ)
Developed by Charles Spearman.
🔹 Question
Two judges ranked 5 students as follows:
| Student | A | B | C | D | E |
|---|---|---|---|---|---|
| Judge 1 | 1 | 2 | 3 | 4 | 5 |
| Judge 2 | 2 | 1 | 4 | 3 | 5 |
Find Spearman’s rank correlation coefficient.
🔹 Step 1: Formula
🔹 Step 2: Compute d and d²
| Student | R₁ | R₂ | d = R₁ − R₂ | d² |
|---|---|---|---|---|
| A | 1 | 2 | -1 | 1 |
| B | 2 | 1 | 1 | 1 |
| C | 3 | 4 | -1 | 1 |
| D | 4 | 3 | 1 | 1 |
| E | 5 | 5 | 0 | 0 |
🔹 Step 3: Substitute in Formula
✅ Interpretation:
There is a strong positive agreement between the two judges.
Comments
Post a Comment