STA154 · 2078 · 5 marks
Define correlation coefficient? Calculate the coefficient of correlation for the following ages (in years) of husbands and wives and interpret it. | Husband's age X: | 23 | 27 | 28 | 28 | 29 | 30 | 31 | 33 | 35 | 36 | |---|---|---|---|---|---|---|---|---|---|---| | Wife's age Y: | 18 | 20 | 27 | 21
Define correlation coefficient? Calculate the coefficient of correlation for the following ages (in years) of husbands and wives and interpret it.
| Husband's age X: | 23 | 27 | 28 | 28 | 29 | 30 | 31 | 33 | 35 | 36 |
|---|---|---|---|---|---|---|---|---|---|---|
| Wife's age Y: | 18 | 20 | 27 | 21 | 29 | 27 | 27 | 29 | 28 | 29 |
[5]
Correlation Coefficient: Definition and Calculation
Definition
The correlation coefficient is a statistical measure that expresses the degree and direction of the linear relationship between two variables. It ranges from $-1$ to $+1$:
- $+1$ = perfect positive correlation
- $-1$ = perfect negative correlation
- $0$ = no linear correlation
Pearson's correlation coefficient:
$$r = \frac{n\sum XY - \sum X \sum Y}{\sqrt{[n\sum X^2 - (\sum X)^2][n\sum Y^2 - (\sum Y)^2]}}$$
Given Data (n = 10)
| X | Y | XY | X² | Y² |
|---|---|---|---|---|
| 23 | 18 | 414 | 529 | 324 |
| 27 | 20 | 540 | 729 | 400 |
| 28 | 27 | 756 | 784 | 729 |
| 28 | 21 | 588 | 784 | 441 |
| 29 | 29 | 841 | 841 | 841 |
| 30 | 27 | 810 | 900 | 729 |
| 31 | 27 | 837 | 961 | 729 |
| 33 | 29 | 957 | 1089 | 841 |
| 35 | 28 | 980 | 1225 | 784 |
| 36 | 29 | 1044 | 1296 | 841 |
Summations (verified)
- $\sum X = 23+27+28+28+29+30+31+33+35+36 = 300$
- $\sum Y = 18+20+27+21+29+27+27+29+28+29 = 255$
- $\sum XY = 414+540+756+588+841+810+837+957+980+1044 = 7767$
- $\sum X^2 = 529+729+784+784+841+900+961+1089+1225+1296 = 9138$
- $\sum Y^2 = 324+400+729+441+841+729+729+841+784+841 = 6659$
Note: the correct sums are $\sum X = 300$ (not 310), $\sum X^2 = 9138$ (not 9738) and $\sum Y^2 = 6659$ (not 6859). Rechecking $\sum Y^2$: $324+400=724$, $+729=1453$, $+441=1894$, $+841=2735$, $+729=3464$, $+729=4193$, $+841=5034$, $+784=5818$, $+841=6659$. Confirmed $6659$.
Substitution
Numerator: $$n\sum XY - \sum X\sum Y = 10(7767) - (300)(255) = 77670 - 76500 = 1170$$
X-term: $$n\sum X^2 - (\sum X)^2 = 10(9138) - (300)^2 = 91380 - 90000 = 1380$$
Y-term: $$n\sum Y^2 - (\sum Y)^2 = 10(6659) - (255)^2 = 66590 - 65025 = 1565$$
$$r = \frac{1170}{\sqrt{1380 \times 1565}} = \frac{1170}{\sqrt{2159700}} = \frac{1170}{1469.59}$$
$$\boxed{r \approx 0.796}$$
Interpretation
$r \approx +0.796$ indicates a strong positive correlation between husbands' and wives' ages. As the husband's age increases, the wife's age also tends to increase. This is consistent with real-world marriage patterns. The coefficient of determination $r^2 \approx 0.634$, so about 63% of the variation in wife's age is explained by husband's age.
A result of $r \approx -0.646$ comes from using $\sum X = 310$ instead of $300$, together with wrong squared sums, which flips the sign of the numerator.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.