Before you start
You will be able to
- Calculate the ranks of a variable, giving tied values their average rank, by hand and with RANK.AVG.
- Calculate Spearman’s ρ as Pearson’s r of the ranks, and with the d² shortcut when there are no ties.
- Calculate Kendall’s τ-b from concordant, discordant and tied pairs, and interpret it.
- Distinguish a monotonic relationship from a linear one, and explain why ranks resist a single wild value.
- Choose between Pearson’s r, Spearman’s ρ and Kendall’s τ-b for curved relationships, ordinal ratings, heavy ties and suspect data, and report the choice.
Review first
- Covariance and Pearson’s r — Spearman’s ρ is Pearson’s r calculated on ranks, so you need r, its range and what it measures.
- Scatterplots — Direction, form and unusual points are read from the plot before any coefficient is chosen.
- Describing distributions — Medians, percentiles and skewed variables: ranks are the idea behind all three.
Fictional case A fictional coffee business founded by Ana Lim. It starts as a catering and barista-training service, opens its own cafés and an online shop for beans, and plans a canned cold brew.
The idea
Fictional case
At the end of 2027 Ana runs Pearson’s r on every pair of columns in the cafés’ log. Two results puzzle her. Footfall and transactions, which ought to move almost in step, give r = 0.68 across the 612 café-days; the covariance lesson found 0.98 once the log was checked. And at Harbourside the day’s high temperature and the number of iced drinks sold give r = 0.73, although the scatterplot shows iced drinks rising on almost every warmer day. In both cases r is answering a narrower question than the one she is asking.
From values to ranks
Pearson’s r measures how closely the points follow a straight line. Ana’s question is often simpler: when one variable is higher, is the other higher too? To answer that, throw away the distances between values and keep only their order. The rank of a value is its position when the values are sorted: the smallest gets rank 1, the next rank 2, and so on up to n.
The table shows eight Harbourside days from 2 to 9 June 2027, with the day’s high and the share of drinks that were iced. Wednesday 2 June was the coolest day, 67°F, so it has temperature rank 1; Sunday 6 June, at 77°F, has rank 8. The iced shares are ranked the same way, separately.
| Day | High (°F) | Iced share (%) | Rank of high | Rank of share | d |
|---|---|---|---|---|---|
| Wed 2 Jun | 67 | 34.6 | 1 | 1 | 0 |
| Thu 3 Jun | 68 | 38.3 | 2 | 2 | 0 |
| Fri 4 Jun | 70 | 44.6 | 4 | 3 | 1 |
| Sat 5 Jun | 76 | 65.1 | 7 | 7 | 0 |
| Sun 6 Jun | 77 | 71.8 | 8 | 8 | 0 |
| Mon 7 Jun | 71 | 57.3 | 5 | 5 | 0 |
| Tue 8 Jun | 72 | 63.5 | 6 | 6 | 0 |
| Wed 9 Jun | 69 | 52.7 | 3 | 4 | −1 |
d is the rank of the high minus the rank of the share.
The two rank columns agree except on two days: 9 June was the third-coolest day but had the fourth-smallest iced share, and 4 June the reverse. Spearman’s rank correlation, written or “Spearman’s ρ” (rho), is Pearson’s r calculated on the two columns of ranks. Here it is 0.976, against r = 0.915 on the values themselves. The ranks say the hotter the day, the larger the iced share, almost without exception; r is lower because the points bend away from a straight line.
Monotonic, not only linear
A monotonic relationship is one in which y never moves against x: as x rises, y rises (or stays level), or y falls throughout. A straight line is monotonic, but so is a curve that climbs steeply and then flattens. Spearman’s ρ is 1 whenever y rises every time x rises, curved or not; Pearson’s r is 1 only for a perfect straight line.
Harbourside’s iced drinks are a curve of the second kind. On days below 55°F the café sold about five iced drinks on average; through the 60s sales climbed steadily, from about 18 a day at 60–64°F to about 28 at 65–69°F; in the mid-70s they jumped, from about 42 a day at 72–74°F to about 68 at 75–77°F; above that they grew more slowly, to about 83 on days of 84°F or more. Across the café’s 306 days, r = 0.73 but Spearman’s ρ = 0.92. Nothing is wrong with r: the link really is far from straight. But if Ana’s question is “do warmer days go with more iced drinks?”, ρ answers it and r understates it. The third panel is a warning in the other direction: ranks don’t rescue a relationship that turns back on itself, which the nonlinear-and-restricted lesson takes up.
Kendall’s τ: counting agreeing pairs
A second rank measure looks at pairs of days. Take any two of the eight June days. If the hotter of the two also had the larger iced share, the pair is a concordant pair; if the hotter day had the smaller share, it is a discordant pair. Eight days make 8 × 7 ÷ 2 = 28 pairs. Only one is discordant: 4 June and 9 June, where the hotter day (70°F against 69°F) had the smaller share. The other 27 are concordant.
Kendall’s τ (tau) is the surplus of concordant over discordant pairs as a share of all pairs: . Like ρ it runs from −1 (every pair discordant) to +1 (every pair concordant), and 0 means agreement and disagreement balance. Without ties it also has a plain reading: pick two days at random, and the chance that they are ordered the same way on both variables exceeds the chance that they are ordered oppositely by τ. With ties the version software reports is Kendall’s τ-b, which the In depth section explains.
Why ranks resist a slip
On 14 September Millbrook’s door counter recorded 256 people; the log shows 2,566, an extra digit typed by hand. On a scatterplot that day sits far to the right of every other day, with an ordinary 130 transactions. Pearson’s r works with distances from the mean, so one point ten times too far out drags it down: with the slip, footfall and transactions at Millbrook give r = 0.52; corrected, r = 0.99.
In ranks the slip is merely the busiest day, rank 306 instead of its true 156. That changes one rank, by a bounded amount, and Spearman’s ρ moves only from 0.97 to 0.96. Kendall’s τ-b barely moves either, 0.86 against 0.85. This is the sense in which rank correlations are robust statistics: a single wild value can shift a rank no further than the end of the list. It is also a reason to compute r and ρ side by side: when they disagree sharply, look at the plot before believing either.
In depth
Ranking, and what to do with ties
Two values that are equal must share a rank. The standard rule gives each the average rank of the positions they occupy. If the third, fourth and fifth smallest values are all 2, each gets (3 + 4 + 5) ÷ 3 = 4, and the next value gets rank 6. The ranks still add up to n(n + 1) ÷ 2, as they would without ties.
Excel’s RANK.AVG(number, ref, order) does exactly this. A single-cell Spearman formula such as =CORREL(RANK.AVG(A2:A9,A2:A9,1),RANK.AVG(B2:B9,B2:B9,1)) works in Excel 365 and Excel 2021, which evaluate RANK.AVG for every value in the range; in older versions it must be entered as an array formula with Ctrl+Shift+Enter, or you can rank into helper columns and take CORREL of those. Its third argument matters: left out or 0, it ranks from largest to smallest (the largest value gets rank 1); any non-zero value, such as 1, ranks from smallest to largest. For a correlation either direction works, provided both variables are ranked the same way: ranking one up and the other down flips the sign. RANK.EQ, and the older RANK, give tied values the top rank of the group instead of the average, which shifts the ranks and changes ρ when there are ties: use RANK.AVG.
Rain is the extreme case in the cafés’ log. Rain fell on only 97 of the 306 days, so at Harbourside 209 days are tied at 0 inches and share the average rank (1 + 209) ÷ 2 = 105. Spearman’s ρ for rain and footfall at Harbourside is then largely a comparison of dry days with wet ones, refined by the order of the 97 wet days. It comes out at −0.23, the same as r (−0.23); τ-b is −0.17. With the cafés pooled, ρ is −0.12.
Spearman’s ρ and the d² shortcut
The definition is the one in the concept section: rank x, rank y, and take Pearson’s r of the ranks. When there are no ties, the ranks of each variable are exactly 1 to n, their means and standard deviations are known in advance, and the formula collapses to a shortcut in the differences between each observation’s two ranks:
For the June days, , so , the same as Pearson’s r of the ranks. The shortcut is exact only without ties. With ties it gives a different, wrong answer. (Tie-corrected versions of the formula exist, but taking r of the average ranks is simpler and always right.) The challenging example shows a week of rain in which the shortcut gives −0.32 and the true Spearman’s ρ is −0.45. Software always uses the definition; by hand, use the shortcut only when every value in each column is different.
Kendall’s τ-a and τ-b
Write and for the numbers of concordant and discordant pairs and for all pairs. Kendall’s original coefficient, τ-a, is . A pair tied on x or on y is neither concordant nor discordant, so with many ties τ-a cannot reach ±1 even for a perfect ordering. τ-b corrects the denominator for the ties:
where is the number of pairs tied on x and the number tied on y. Without ties and τ-b equals τ-a. SciPy’s kendalltau reports τ-b by default, and so does this course’s engine. Excel has no function for either: Kendall’s τ needs every pair compared, which is a job for statistical software or a pairwise table, not for a single worksheet formula.
Reading the sizes
Spearman’s ρ is on the same scale as r: both are correlations, so ρ = 0.96 and r = 0.94 can be compared directly. Kendall’s τ is on a different scale and is usually smaller in size for the same data. For temperature and iced share across both cafés, r = 0.94, Spearman’s ρ = 0.96 and τ-b = 0.83: three descriptions of one very strong association, not a weaker result from τ. Compare τ with τ, and ρ with r.
Verbal labels such as “strong” or “weak” are conventions that differ between textbooks, and a scale written for r doesn’t transfer to τ. Report the number and the measure; if you use a label, say whose scale it is.
Ordinal data
An ordinal variable has ordered categories with no fixed distance between them: a 1–5 rating, a size from small to large, a ranking of suppliers. Pearson’s r treats the gap from 1 to 2 as equal to the gap from 4 to 5, which the scale doesn’t promise. Rank correlations use only the order, which is all an ordinal scale has.
Cobble Lane Hotel (fictional) asked 12 guests to rate the cleanliness of their room and their stay overall, each from 1 to 5. Ratings on a five-point scale tie heavily: four guests gave cleanliness a 4, so they share the average rank 7.5. The table shows the three measures.
| Measure | Value | What it uses |
|---|---|---|
| Pearson’s r | 0.817 | The ratings as if they were measurements |
| Spearman’s ρ | 0.836 | Average ranks; Pearson’s r of the ranks |
| Kendall’s τ-b | 0.748 | 42 concordant and 2 discordant pairs of 66, corrected for ties |
All three agree that guests who rate cleanliness higher tend to rate their stay higher. With this many ties some analysts prefer τ-b, whose tie correction is built into its definition, and NIST’s Dataplot documentation recommends τ-b over τ-a when ties exist. Spearman’s ρ with average ranks is also widely used for ratings. Either is defensible; what isn’t is reporting r on five-point ratings without saying that you have treated them as measurements.
Significance, briefly
Rank correlations have tests too. Software usually tests Spearman’s ρ with the same t statistic it uses for r, applied to the ranks, and Kendall’s τ with a normal approximation; for small samples without ties exact tables exist. For rain and footfall at Harbourside both give p-values below 0.001. The testing-correlation lesson covers the logic, the t statistic and confidence intervals.
Choosing among r, ρ and τ
| Situation | Prefer | Why |
|---|---|---|
| Both variables numeric, plot roughly straight, no wild values | Pearson’s r | Uses all the information; links to regression (B06) and r² |
| A curve that keeps rising or keeps falling | Spearman’s ρ (or τ-b) | Measures the consistency of the order, which r understates |
| Ordinal data, such as 1–5 ratings | Spearman’s ρ or Kendall’s τ-b | The scale has order but no fixed distances |
| Many ties, small samples | Kendall’s τ-b | Its tie correction and pair-counting reading suit heavy ties |
| A suspected slip or extreme value | Check it first; report r and ρ side by side | Ranks limit the damage but don’t say whether the value is right |
| A curve that turns back (U shape) | None of them alone | All three can be near 0 for a strong link: plot it |
Ranks cost something. They discard how far apart values are, so for data that really are linear and well behaved r uses more information. They don’t fix a link that changes direction, a relationship that differs between groups (the groups-and-simpsons-paradox lesson), or two variables that both trend through the year. And ρ = 0.96 doesn’t say a slip isn’t there: it says the slip barely changes the order. Finding and correcting it is the outliers-and-influence lesson’s work.
Formulas
Spearman’s rank correlation (definition)
- Spearman’s rank correlation, also written Spearman’s ρ
- The rank of observation i’s x value among all the x values, ties given their average rank
- The rank of observation i’s y value among all the y values, ranked in the same direction
Assumes. Paired observations of two variables that can be put in order.
Excel 365 or 2021: =CORREL(RANK.AVG(A2:A9,A2:A9,1),RANK.AVG(B2:B9,B2:B9,1)) (older versions: Ctrl+Shift+Enter); or rank each column with RANK.AVG in helper columns and take CORREL of those.
Spearman’s ρ from rank differences (no ties only)
- Observation i’s rank on x minus its rank on y
- Number of paired observations
- Spearman’s rank correlation
Assumes. No tied values in either variable; with ties it gives a wrong answer.
With ties, use the definition: Pearson’s r of the average ranks.
Average rank of a group of tied values
- The position the lowest member of the tied group would take in the sorted list
- The position the highest member would take
Excel’s RANK.AVG; with order 1 the smallest value has position 1.
Kendall’s τ-b
- Number of concordant pairs: the observation higher on x is also higher on y
- Number of discordant pairs: the observation higher on x is lower on y
- Number of pairs of observations
- Number of pairs tied on x
- Number of pairs tied on y
- Number of observations
Assumes. Paired observations that can be put in order on each variable.
Without ties n₁ = n₂ = 0 and τ-b = τ-a = (n_c − n_d) ÷ n₀. Excel has no built-in function.
Worked examples
Fictional figures
Use the eight Harbourside days from 2 to 9 June 2027 in the concept section’s table: the day’s high and the share of drinks that were iced. No value is repeated in either column. Calculate Spearman’s ρ by the d² shortcut and check it against Pearson’s r of the ranks.
- Rank each column from smallest to largest, separately. Highs: 67°F (2 June) is rank 1 and 77°F (6 June) is rank 8. Shares: 34.6% (2 June) is rank 1 and 71.8% (6 June) rank 8.
- Subtract: d = rank of high − rank of share. Six days have d = 0; 4 June has d = 4 − 3 = 1 and 9 June has d = 3 − 4 = −1. The d values always add to 0, a quick check on the ranking.
- Square and add: . With n = 8 and no ties the shortcut applies: .
- Check by the definition: Pearson’s r of the two rank columns,
=CORREL(D2:D9,E2:E9)if the ranks are in D and E, also gives 0.976. Without ties the two routes must agree. - Compare with Pearson’s r of the values themselves: 0.915. The ranks agree almost perfectly while the values bend away from a line.
Answer. Spearman’s ρ = 0.976 by both routes; Pearson’s r of the values is 0.915.
What it means. Over these eight days a hotter day went with a larger iced share every time but once. Eight days are far too few to generalise from (the testing-correlation lesson shows how few), but the pattern matches the whole year’s: Spearman’s ρ for temperature and iced share across all 612 café-days is 0.96.
Fictional figures
Harbourside, Sunday 11 to Saturday 17 April 2027 (corrected log). Rain (inches) and footfall: Sun 0.15 and 151; Mon 0 and 100; Tue 0 and 101; Wed 0 and 96; Thu 0.38 and 54; Fri 0.02 and 81; Sat 0 and 170. Calculate Spearman’s ρ correctly, show what the d² shortcut would give, and calculate Kendall’s τ-b.
| Day | Rain (in) | Footfall | Rank of rain | Rank of footfall |
|---|---|---|---|---|
| Sun | 0.15 | 151 | 6 | 6 |
| Mon | 0.00 | 100 | 2.5 | 4 |
| Tue | 0.00 | 101 | 2.5 | 5 |
| Wed | 0.00 | 96 | 2.5 | 3 |
| Thu | 0.38 | 54 | 7 | 1 |
| Fri | 0.02 | 81 | 5 | 2 |
| Sat | 0.00 | 170 | 2.5 | 7 |
- Rank rain from smallest to largest. Four days had no rain; they occupy positions 1 to 4 and share the average rank (1 + 4) ÷ 2 = 2.5. Then 0.02 (Friday) is 5, 0.15 (Sunday) is 6 and 0.38 (Thursday) is 7. Footfall has no ties: 54 is rank 1 up to 170, rank 7.
- Spearman’s ρ by the definition: Pearson’s r of the two rank columns, which gives .
- The shortcut, wrongly applied: the squared rank differences add to 74, and . The tie at 2.5 breaks the assumption the shortcut rests on (ranks exactly 1 to 7), so its answer is off by more than 0.1.
- Kendall’s pairs: 7 days make 21 pairs. The four dry days form 4 × 3 ÷ 2 = 6 pairs tied on rain, which count as neither concordant nor discordant. Of the other 15, 4 are concordant (the wetter day was busier, mostly because Sunday was both wet and busy) and 11 discordant. Footfall has no ties.
- . τ-a would be , pulled towards 0 by the ties.
Answer. Spearman’s ρ = −0.453 (the d² shortcut would give −0.321, which is wrong); Kendall’s τ-b = −0.394.
What it means. Wetter days went with fewer customers more often than not, but one week can’t separate rain from the day of the week: the busy, wet Sunday works against the pattern, and the two busiest days were a dry Saturday and that Sunday. Across Harbourside’s 306 days ρ is −0.23. The lesson for method is general: with ties, compute ρ as r of the average ranks, never by the shortcut.
Fictional figures
Ana’s year-end summary needs one number for how closely transactions follow footfall at Millbrook. Her log, as typed, gives Pearson’s r = 0.519, Spearman’s ρ = 0.963 and Kendall’s τ-b = 0.853 across the café’s 306 days. What should she report?
- Notice the disagreement: r and ρ normally sit close together for a relationship as tight as this one. A gap of more than 0.4 means a few points dominate r.
- Plot and find the cause: one day, 14 September, shows 2,566 people and 130 transactions. Every other day has fewer than 410 people. Checked against the door counter’s own record, the true figure is 256: a typing slip.
- Correct the record, then recompute: r = 0.985, Spearman’s ρ = 0.969, τ-b = 0.860. Correcting one value moved r by 0.47 and ρ by 0.006.
- Choose: with the slip corrected, the plot is close to a straight line with no wild points, so Pearson’s r is the natural measure, and it links to the regression Ana will fit in B06. She reports r = 0.985 and notes that Spearman’s ρ, 0.969, agrees.
Answer. Report r = 0.985 on the corrected log (Spearman’s ρ = 0.969 as a check), and record the 14 September correction. Don’t report r = 0.519 from the uncorrected log, or ρ in its place.
What it means. Ranks protected ρ from the slip, but switching to ρ would have hidden an error that also distorts totals, averages and every other analysis using footfall. The useful habit is to compute r and ρ together as a screen: when they disagree, look for the reason before choosing. The outliers-and-influence lesson covers what to do when the extreme value is real rather than a slip.
Explore
Common mistakes
Using the d² shortcut on tied data
The formula 1 − 6Σd² ÷ (n(n² − 1)) assumes each column’s ranks are exactly 1 to n. With ties it gives a different number, sometimes far off: −0.32 instead of −0.45 for the wet April week. Compute Spearman’s ρ as Pearson’s r of the average ranks whenever any value repeats.
“τ = 0.83 is weaker than r = 0.94.”
Kendall’s τ is on its own scale and is usually smaller in size than ρ or r for the same data. Temperature and iced share give r = 0.94, ρ = 0.96 and τ-b = 0.83: one very strong association, three measures. Compare τ only with other τ values.
“Spearman’s ρ is 0.92, so the relationship is almost linear.”
ρ measures monotonicity, not straightness. Harbourside’s iced drinks are clearly curved against temperature (r = 0.73) yet ρ = 0.92. To judge whether a line describes the data, look at the scatterplot and compare r with ρ.
Ranking the two columns in opposite directions
RANK.AVG ranks from largest to smallest unless its third argument is non-zero. Ranking temperature with order 1 and iced share with the default reverses one set of ranks and flips the sign of ρ. Use the same order for both columns (order 1 is the usual choice).
“Ranks are robust, so I don’t need to check the data.”
Ranks limit how far one bad value can move the coefficient; they don’t correct it or tell you it exists. Millbrook’s slip barely moved ρ but still made footfall’s total and mean wrong. Use a large gap between r and ρ as a reason to look, then fix the record.
Using ρ to rescue a U shape
Rank correlations measure monotonic association. A relationship that falls and then rises can give ρ ≈ 0 as well as r ≈ 0 though y depends strongly on x. Ranks help with curves that keep going one way, not with curves that turn back.
Guided practice
Work through these with hints when you need them. Every hint and every worked solution is there to be used.
Loading four questions…
On your own
No hints this time. Answer, check, and read the feedback; the solution appears once you have answered or if you ask for it. Your first answers count toward mastery.
Loading six questions…
In practice
Fictional case
Ana’s year-end summary has a column for each pair of measures: Pearson’s r, Spearman’s ρ, and a note when they differ by more than 0.1. Temperature and iced share: r = 0.94, ρ = 0.96, “curved: an S shape, flat in cold weather, steep in mild weather, levelling off on hot days; ρ describes the consistency, r the straight-line fit”. Footfall and transactions: r = 0.98 after correcting 14 September. Rain and footfall: r = −0.14 and ρ = −0.12 pooled, “rain is zero on two days in three, so this mostly compares wet days with dry ones”.
The pairing earns its place. When r and ρ agree, the choice hardly matters and r is the conventional one to report. When they disagree, the gap itself is information: a curve (ρ above r), one or two extreme points (usually ρ above r), or occasionally a cluster of extreme points that happen to line up (r above ρ). In each case the next step is the scatterplot, and the number Ana reports depends on what the plot shows, not on which coefficient looks more impressive.
Rank correlations are the everyday tool wherever the data are orders rather than measurements. A hotel group compares cleanliness ratings with overall ratings across its properties; a battery-storage installer checks whether the supplier its engineers rank first for reliability is also the one with the fewest warranty claims; an HR team checks whether two interviewers rank the same candidates in a similar order. In each, Spearman’s ρ or Kendall’s τ-b answers “do these orderings agree?” without pretending that the gap between first and second equals the gap between fifth and sixth.
They are also a sensible second opinion on skewed money variables, such as sales per customer or order values, where a few very large values dominate r. Reporting both, with a sentence on why they differ, is more honest than choosing whichever is larger. And none of these coefficients says why two things move together: that warmer days go with more iced drinks is plain, but the correlation-and-causation lesson is where a link becomes a claim that one thing causes another.
Knowledge check
Six questions, one attempt each, no hints. Score 80% or more to complete the lesson; you can take it again at any time.
Loading six questions…
Summary
- A rank is a value’s position in the sorted list; tied values share the average of the positions they occupy (Excel’s RANK.AVG, with the same order for both columns).
- Spearman’s ρ (r_s) is Pearson’s r of the ranks. Without ties it equals 1 − 6Σd² ÷ (n(n² − 1)); with ties that shortcut is wrong.
- Kendall’s τ-b counts pairs: (concordant − discordant) ÷ √((n₀ − n₁)(n₀ − n₂)). It is usually smaller in size than ρ, so compare τ with τ.
- Rank correlations measure monotonic association: Harbourside’s curved iced-drink sales give r = 0.73 but ρ = 0.92. They are 0 for a U shape, just as r is.
- Ranks limit the effect of one wild value: Millbrook’s slip drops r from 0.99 to 0.52 but ρ only from 0.97 to 0.96. They don’t fix the data.
- Use ρ or τ-b for ordinal ratings and heavy ties; use r for straight, well-behaved numeric data; compute r and ρ together and investigate when they disagree.
Key formulas
- Spearman’s rank correlation (definition)
- Spearman’s ρ from rank differences (no ties only)
- Average rank of a group of tied values
- Kendall’s τ-b
Terms introduced
- Rank
- An observation’s position when the values of a variable are sorted, usually from the smallest (rank 1) to the largest (rank n).
- Average rank
- The rank given to each of a group of tied values: the mean of the positions the group occupies in the sorted list. Excel’s RANK.AVG.
- Spearman’s rank correlation
- Pearson’s correlation coefficient calculated on the ranks of two variables (ties given average ranks), written r_s or Spearman’s ρ. It measures the strength and direction of a monotonic association, from −1 to +1.
- Monotonic relationship
- A relationship in which one variable never moves against the other: as x increases, y increases or stays level throughout, or decreases or stays level throughout. A straight line is one kind; a curve that keeps rising is another.
- Concordant pair
- Two observations ordered the same way on both variables: the one that is higher on x is also higher on y.
- Discordant pair
- Two observations ordered in opposite ways on the two variables: the one that is higher on x is lower on y.
- Kendall’s τ-b
- A rank correlation from −1 to +1: the number of concordant pairs minus the number of discordant pairs, divided by a denominator that allows for pairs tied on either variable. Written τ-b; without ties it equals Kendall’s original τ-a.
Sources
- NIST/SEMATECH. Dataplot reference manual, “Rank correlation independence test” (Spearman’s ρ as the correlation of ranks, with average ranks for ties). itl.nist.gov/div898/software/dataplot/refman1/auxillar/rankc…
- NIST/SEMATECH. Dataplot reference manual, “Kendall’s tau” (concordant and discordant pairs; τ-a, τ-b and the treatment of ties). itl.nist.gov/div898/software/dataplot/refman2/auxillar/kende…
- SciPy documentation. “scipy.stats.kendalltau” (τ-b as the default; ties in x, in y and in both). docs.scipy.org/doc/scipy-1.12.0/reference/generated/scipy.st…
- Microsoft Support. “RANK.AVG function”. support.microsoft.com/en-US/excel/functions/rank-avg-functio…
- Microsoft Support. “CORREL function”. support.microsoft.com/en-US/excel/functions/correl-function
