Kendall’s Tau Hypothesis Testing

Table of Critical Values

For small samples, the table of critical values found in Kendall’s Tau Table can be used for hypothesis testing (where the two-tailed null hypothesis is H0: τ = 0). For one-tailed testing use the value of α found in the table multiplied by 2.

Worksheet Function

The values of the elements in this table can be found using the following function.

Real Statistics Function: The following function is provided in the Real Statistics Resource Pack:

TauCRIT(n, α, tails, h) = the critical value from Kendall’s Tau Table for samples of size n, for the given value of alpha (default .05), and tails = 1 or 2 (default). If h = TRUE (default) harmonic interpolation is used; otherwise linear interpolation is used.

Examples

Example 1: Repeat the analysis for Example 1 of Correlation Testing via the t Test using Kendall’s tau (to determine whether there is a correlation between longevity and smoking). Here the last two data items have been modified as shown in range A3:B18 of Figure 1 (we did this to eliminate any ties).

Kendall's tau testing table

Figure 1 – Hypothesis testing for Kendall’s tau

Sorting and Counting

We begin by sorting the data in range A3:B18 in ascending order by life expectancy putting the results in range D4:E18. This can be done by using Excel’s sort capability (Data > Sort & Filter|Sort) or by using the Real Statistics worksheet array formula =QSORTRows(A4:B18,1).

Since there are n = 15 people in the sample, there are C(15, 2) = 105 pairs of elements. We next calculate how many inversions D we have for each of the pairs. By way of illustration, we look at the number of inversions that corresponds to the person in row 8 (i.e. F8).

Since the number of cigarettes smoked by that person is 14 (the value in cell E8), we count the entries in column E below E8 that have a value smaller than 14. This is 5 since only the entries in cells E10, E14, E15, E16, and E18 have smaller values. We carry out the same calculation for each of the rows and sum the result to get 80 (the value in cell F19).

This is done by putting the formula =COUNTIF(E5:E$19,”<“&E4) in cell F4 (see Built-in Excel Functions for a description of COUNTIF). We next highlight the range F4:F18 and press Ctrl-D to copy this formula into all the relevant cells in column F. Cell F8 now contains the array formula =COUNTIF(E9:E$19,”<“&E8). This approach works as long as cell E19 is left empty.

Calculating Tau

We now can calculate the key statistics (column I) as described in Figure 1 where column K displays the formulas that are found in the cells in column I. We see that tau is -.524 (cell I10).

Since τcrit = .395 < .524 = |τ| we reject the null hypothesis and conclude that the tau correlation coefficient is significantly different from zero. Thus, smoking and longevity are correlated.

Examples Workbook

Click here to download the Excel workbook with the examples described on this webpage.

References

eGyanKosh (2017) Unit 2: other types of correlation
http://egyankosh.ac.in/bitstream/123456789/20956/1/Unit-2.pdf

Wikipedia (2015) Kendall rank correlation coefficient
https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient

13 thoughts on “Kendall’s Tau Hypothesis Testing”

  1. Great explanation, very useful. It worked perfectly for me.

    On the COUNTIF part, you write ‘This approach works as long as cell E19 is left empty or contains a blank or 0’. However, ‘0’ will affect the results (at least in my spreadsheet); empty or a space will do fine.

    Reply
    • Jan,
      Yes, you are correct. E19 shouldn’t contain a zero. I have corrected this on the webpage.
      Thank you very much for catching this mistake and helping to improve the website.
      Charles

      Reply
  2. Greetings Charles.
    I am working with two ordinal variables which values are coded as numbers within a range from 1 to 5. I tried the method you described here [ Tau=(C-D)/C(n,2) ] to calculate Kendall’s Tau for a dataset with n=14 and the value I get (0.69) is far from the value calculated by your function KCORREL (0.34). Is there some fundamental principle I am missing here?
    My understanding is that Kendall’s Tau is particularly useful with outliers, which is not my case since the values are tightly close, but I do not understand why there is such a big difference between the two approaches (“by hand” calculating step by step each term of the formula vs using the KCORREL function).
    Any ideas? Thank you in advance for your help and for your lifesaving website.
    Kind regards,
    Andrés

    Reply
    • Andrés,
      Glad you find the Real Statistics website useful.
      If you send me an Excel file with your data and the calculation you performed, I will try to see why there is such a difference between the two values.
      Charles

      Reply
  3. Hello,
    I need to perform a significance testing analysis for the kendal tau-b. The questions are mainly two:
    1) Is the Kendal Tau distributed as a normal with mean $0$ and with variance
    3 Sqrt[((N)^2 – N)/(2 (2N + 5)) for N enough large (N>10)?
    2) Is the Kendal tau-b distribution equal to the Kendall Tau’s distribution?
    where N is the size of the sample.
    Thanks very much. Francesco.

    Reply
  4. Hi Charles,
    I have used SPSS to calculate my Kendall’s Tau b and the results are:
    Correlations
    Leadership Managerial
    Kendall’s tau_b Leadership Correlation Coefficient 1.000 .367*
    Sig. (2-tailed) . .048
    N 16 16
    Managerial Correlation Coefficient .367* 1.000
    Sig. (2-tailed) .048 .
    N 16 16

    *. Correlation is significant at the 0.05 level (2-tailed).

    How ever if I go through the critical value table i find that the critical value is .383
    thus we cannot reject the null hypothesis.

    Kindly guide me that how should I report my results

    Reply
  5. Hello,
    Thank-you for this accessible exposition of Kendall Tau. I am not a statistician, but I have a problem for which I believe this is the correct analysis to pursue, with a twist: I’d like to test the hypothesis that the two series (which have many ties) are perfectly correlated (H0: tau = 1). Forgive me if this is an elementary question, but how would I formulate this test using the critical values of Kendall Tau.

    Thank-you for your time,
    Mark

    Reply
    • Hello Mark,
      You would normally use the Fisher transformation of the usual Pearson’s correlation to accomplish this.
      I am not sure how you would do this using Kendall’s tau, but I believe the following article shows how to transform Kendall’s tau in a similar way, and so perhaps this is useful. Please let me know whether this was helpful.
      http://www.cedu.niu.edu/~walker/personal/Walker%20Kendall‘s%20Tau.pdf
      Charles

      Reply
  6. Dear collegue,

    Thank you very much for showing us the way to apply Kendall’s tau with Excel. Could I ask you how to manage with some duplicated value ? For instance, where xi=xj or yi=yj as in such a case the couple (xi,yi) and (xj,yj) are neither concordant nor discondant.

    Best regards,

    Reply
    • Silbi,
      The referenced webpage shows how to deal with such values. As you said they are not considered as concordant or discordant, but they are if there a lot of such values then they figure in the ties correction.
      Charles

      Reply

Leave a Comment