Spearman’s rank coefficient
Calculate the Spearman's rank coefficient

Calculate the Spearman's rank coefficient

Consider the following set of data:

x y
29
5-6
8-7
15.5-28
16.2-15
14-20
12-15
13-20.3
2.59
14.1
0.56
-312.1

Let’s see how to rank these values with the TI-Nspire.

  1. Create a new document and select Add Lists & Spreadsheets. Enter the data in columns A and B.

    Data Entry Screenshot

  2. Select all cells of columns A and B. Press Menu Icon and select Actions > Sort. Fill the parameters as follows and press Enter Icon.

    Sort AB Screenshot

  3. Enter numbers from 1 to 12 in column C:

    Sort ABC Screenshot

  4. Select all cells of columns A, B, and C. Press Menu Icon and select Actions > Sort. Fill the parameters as follows:

    Sort ABC Screenshot

    Press Enter Icon . This table should be displayed:

    Sort ABC Screenshot

  5. Enter numbers from 1 to 12 in column D. For duplicates in column B, use the mean of rankings. For example:
    • 4th and 5th positions: use 4.5 for both.
    • 10th and 11th positions: use 10.5 for both.

    Sort ABC Screenshot

  6. Perform a linear regression on columns C and D. Press Menu Icon and select Statistics > Stat Calculations > Linear Regression (\(mx+b\)). Fill the parameters as follows:

    Regression Parameters Screenshot

    The results should appear as follows:

    Spearman Results Screenshot

    The \(r\)-value displayed is the ranked Spearman correlation coefficient.