You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson extends correlation and regression to include Spearman's rank correlation coefficient, hypothesis testing for correlation, and deeper analysis of the product-moment correlation coefficient (PMCC).
The PMCC r measures the strength and direction of a linear relationship between two variables:
r=SxxSyySxy
where Sxy=∑(xi−xˉ)(yi−yˉ), Sxx=∑(xi−xˉ)2, Syy=∑(yi−yˉ)2.
| Value of r | Interpretation |
|---|---|
| r=1 | Perfect positive linear correlation |
| r=−1 | Perfect negative linear correlation |
| r=0 | No linear correlation |
To test whether there is a significant linear correlation in the population:
H0:ρ=0 (no linear correlation in the population) H1:ρ=0 (two-tailed) or ρ>0 / ρ<0 (one-tailed)
Compare the sample r with the critical value from the PMCC table for n data points at the chosen significance level.
If ∣r∣>critical value, reject H0.
For n=10 pairs, r=0.65. Test at 5% (two-tailed).
Critical value (n=10, two-tailed 5%): 0.6319.
Since 0.65>0.6319, reject H0. There is significant evidence of linear correlation.
Spearman's rank correlation coefficient rs measures the strength and direction of a monotonic relationship (not necessarily linear). It is calculated by ranking the data and applying the PMCC formula to the ranks.
If there are no tied ranks:
rs=1−n(n2−1)6∑di2
where di=rank(xi)−rank(yi) is the difference between the ranks.
| Student | Maths score | Science score | Rank (Maths) | Rank (Science) | d | d2 |
|---|---|---|---|---|---|---|
| A | 85 | 78 | 1 | 2 | -1 | 1 |
| B | 72 | 65 | 3 | 4 | -1 | 1 |
| C | 90 | 85 | 0 | 0 | — | — |
Let me redo with a proper dataset:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.