Free Pearson Edexcel International A-level Mathematics · S3

Rank correlation and tests of association

What you’ll learn

  • Calculate Spearman rank correlation without ties.
  • Select a direction and compare with a supplied critical value.
  • Distinguish rank association from linear correlation.

Understand the idea

Spearman correlation applies product moment correlation to ranks and describes monotonic association: values tend to rise together or one tends to fall as the other rises. With no ties, a short formula uses the squared differences between the two ranks. Assign both sets of ranks consistently; reversing only one reverses the sign.

When ties occur, assign each tied observation the average of the rank positions it occupies. The no-ties shortcut is not automatically valid for tied data; a rank-based calculation or the stated procedure is needed. Product moment correlation instead measures linear association in the original numerical values.

A test of zero population correlation compares the sample coefficient with a critical value for the sample size and chosen tail. A two-sided test checks either sign; a one-sided test requires the proposed direction to be decided in advance. For a product moment significance test, the reference model commonly assumes an independent random sample from a bivariate Normal population.

Key formulae

rs=1−6∑di2n(n2−1)when there are no tiesr_s=1-\frac{6\sum d_i^2}{n(n^2-1)}\quad\text{when there are no ties}

r=SxySxxSyyr=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}

H0:ρ=0,H1:ρ≠0H_0:\rho=0,\qquad H_1:\rho\ne0

Worked example

Five paired observations have x-ranks (1, 2, 3, 4, 5) and y-ranks (1, 3, 2, 5, 4). Find Spearman’s coefficient. For a one-sided positive-association test, use the supplied critical value 0.9.

  1. The rank differences are 0,−1,1,−1,10,-1,1,-1,1, so ∑d2=4\sum d^2=4.
  2. rsr_s =1−6(4)/(5(52−1))=1-6(4)/(5(5^2-1)) =1−24/120=1-24/120 =0.8=0.8.
  3. The observed coefficient is positive but below the supplied critical value 0.9.
  4. Do not reject zero rank correlation in favour of positive association at the level represented by that critical value.

Answer: rs=0.8r_s=0.8; the test is not significant using the supplied critical value.

Open the interactive lesson to try original questions and recall. Build a revision plan.