Sign in to jmaths to print this page or save it as a PDF: jmaths-8ce638778fd6.herokuapp.com/maths/ai-sl/hypothesis-testing/13-4-7/problems/

jmaths

IB Mathematics: Applications and Interpretation SL · 13.4: Hypothesis Testing · 13.4.7

Spearman's rank correlation Problem set A Worked solutions

Skills

  1. A theatre records the ticket price and the attendance at eight shows. Calculate Spearman's rank correlation coefficient.

    Pair12345678Price (£)3441295247384531Attendance (thousands)6.14.87.23.14.25.53.96.6
    • Ranks of price (£): 3, 5, 1, 8, 7, 4, 6, 2
    • Ranks of attendance (thousands): 6, 4, 8, 1, 3, 5, 2, 7
    • From the calculator: r_s = −0.976
  2. Eight students record the number of books read in a term and their score on a reading test. Calculate Spearman's rank correlation coefficient.

    Pair12345678Books796958710Score1418152111181618
    • Ranks of books (ties averaged): 3.5, 6.5, 2, 6.5, 1, 5, 3.5, 8
    • Ranks of score (ties averaged): 2, 6, 3, 8, 1, 6, 4, 6
    • From the calculator: r_s = 0.864
  3. Two judges place eight dancers, A to H, in order, from 1st place to 8th place.

    Place1st2nd3rd4th5th6th7th8thJudge 1EBHACGFDJudge 2BEACHDGF
    1. (a) Write down the rank each judge gave to A, B, C, D, E, F, G and H, in that order.

      • Find each letter in each list. Ranks of A to H for Judge 1: 4, 2, 5, 8, 1, 7, 6, 3
      • Ranks of A to H for Judge 2: 3, 1, 4, 6, 2, 8, 7, 5
    2. (b) Calculate Spearman's rank correlation coefficient.

      • From the calculator: r_s = 0.833
  4. A shop records its weekly advertising spend (hundreds of pounds) and its sales (units) over seven weeks. Use Spearman's rank correlation to test, at the 5% significance level, whether there is a positive correlation. The critical value is 0.714.

    Pair1234567Advertising22351840283125Sales61705279607458
    1. (a) State the hypotheses.

      • H0: there is no correlation between advertising spend and sales
      • H1: there is a positive correlation between advertising spend and sales
    2. (b) Calculate r_s.

      • Ranks of advertising: 2, 6, 1, 7, 4, 5, 3
      • Ranks of sales: 4, 5, 1, 7, 3, 6, 2
      • From the calculator: r_s = 0.857
    3. (c) State the conclusion in context.

      • r_s = 0.857 > 0.714, so reject H0.
      • There is sufficient evidence, at the 5% significance level, of a positive correlation between advertising spend and sales.
  5. Eight students record their weekly hours of television (x) and their test mark (y). Use Spearman's rank correlation to test, at the 10% significance level, whether there is a negative correlation. The critical value is 0.524.

    Pair12345678TV hours152293018261220Mark7570906184528872
    1. (a) State the hypotheses.

      • H0: there is no correlation between hours of television and test mark
      • H1: there is a negative correlation between hours of television and test mark
    2. (b) Calculate r_s.

      • Ranks of tv hours: 3, 6, 1, 8, 4, 7, 2, 5
      • Ranks of mark: 5, 3, 8, 2, 6, 1, 7, 4
      • From the calculator: r_s = −0.952
    3. (c) State the conclusion in context.

      • r_s = −0.952 < −0.524, so reject H0.
      • There is sufficient evidence, at the 10% significance level, of a negative correlation between hours of television and test mark.

In context

  1. A park keeper records the age of nine trees (years) and their height (metres). The critical value for a two-tailed test at the 5% significance level is 0.700.

    Pair123456789Age5128315971114Height364741335249384557
    1. (a) Calculate r_s.

      • Ranks of age: 2, 7, 4, 1, 9, 5, 3, 6, 8
      • Ranks of height: 2, 6, 4, 1, 8, 7, 3, 5, 9
      • From the calculator: r_s = 0.933
    2. (b) Test, at the 5% significance level, whether there is any correlation. State the hypotheses and the conclusion in context.

      • H0: there is no correlation between age and height. H1: there is a correlation between age and height.
      • |r_s| = 0.933 > 0.700, so reject H0.
      • There is sufficient evidence, at the 5% significance level, of a correlation between age and height.
  2. Two judges score six singers out of 10.

    Pair123456Judge 1759684Judge 2679585
    1. (a) Calculate r_s.

      • Ranks of Judge 1: 4, 2, 6, 3, 5, 1
      • Ranks of Judge 2: 3, 4, 6, 1.5, 5, 1.5
      • From the calculator: r_s = 0.783
    2. (b) The critical value for a one-tailed test at the 5% significance level is 0.829. Determine whether there is significant evidence that the two judges tend to agree.

      • H0: there is no correlation between the two sets of scores. H1: there is a positive correlation.
      • r_s = 0.783 < 0.829, so do not reject H0.
      • There is insufficient evidence, at the 5% significance level, that the two judges tend to agree.
  3. Eight runners record their weekly training distance (km) and their time for a 2 km run (minutes).

    Pair12345678Training (km)2130254534294038Time (min)11.210.610.99.110.110.49.59.8
    1. (a) Calculate r_s and describe the correlation in context.

      • Ranks of training (km): 1, 4, 2, 8, 5, 3, 7, 6
      • Ranks of time (min): 8, 6, 7, 1, 4, 5, 2, 3
      • From the calculator: r_s = −0.976
      • strong negative correlation: runners who train more tend to run 2 km faster.
    2. (b) A coach says that runners who train more always run faster. Does the data support this claim?

      • r_s = −0.976 is close to −1 but not equal to −1.
      • No. r_s is not exactly −1, so the ranks are not perfectly reversed: at least one runner trains more than another but is slower. The data show a tendency, not 'always'.

Stretch

  1. The scatter diagram shows the height y (mm) of a plant at week x for ten plants. For these data Pearson's r = 0.692 and Spearman's r_s = 0.964. The point (10, 230) was misrecorded. The correct value is (10, 62).

    24681050100150200250xy
    1. (a) Without calculating, say how the new value of Pearson's r compares with the old value.

      • The point was far from the pattern. Once it is moved onto the pattern, the points lie closer to a straight line, so r increases.
    2. (b) Without calculating, say how the new value of r_s compares with the old value.

      • The point was the largest y before and is still the largest y after, so no rank changes and r_s does not change.
    3. (c) The heights are converted from millimetres to centimetres. How does this affect r_s?

      • Dividing every height by 10 keeps the order of the heights.
      • The ranks are unchanged, so r_s is unchanged.
  2. A culture of bacteria is counted each hour. The number of bacteria is shown.

    Pair12345678Hour12345678Count2359173365129
    1. (a) Calculate r_s.

      • Ranks of hour: 1, 2, 3, 4, 5, 6, 7, 8
      • Ranks of count: 1, 2, 3, 4, 5, 6, 7, 8
      • From the calculator: r_s = 1
    2. (b) Pearson's r for these data is 0.850. Explain why r_s = 1 although r is less than 1.

      • Every increase in x comes with an increase in y, so the ranks are identical and r_s = 1.
      • The points follow a curve, not a straight line, so Pearson's r is less than 1.

jmaths.xyz · AI SL · 13.4.7 Spearman's rank correlation