Skip to content

Main content

Kendall Tau-b Rank Correlation Calculator

Calculate tie-adjusted Kendall tau-b and disjoint concordant, discordant, and tied pair counts, without a p-value approximation.

Loading tool…

Description

Calculate tie-adjusted Kendall tau-b and disjoint concordant, discordant, and tied pair counts, without a p-value approximation.

Kendall tau compares whether pairs of observations have the same relative ordering in two series. Tau-b adjusts for ties in either series; pairs tied in both are counted separately rather than treated as agreement.1

Calculate tie-adjusted Kendall tau-b and disjoint concordant, discordant, and tied pair counts, without a p-value approximation.

When to use this tool

Use this tool to calculate kendall tau under the units, normalization, and boundary conventions below.

How to use the tool and how it works

  1. Supply first, second in the field shapes below.
  2. Run the calculation. Correct format, shape, range, or undefined-statistic errors before interpreting a result.
  3. Read concordant, discordant, tauB, tiedInBoth, tiedInFirstOnly, tiedInSecondOnly. Use the conventions below.

Inspect every unordered paired observation. Count concordant, discordant, tied-in-first-only, tied-in-second-only and tied-in-both cases separately, then calculate tau-b=(C−D)/sqrt((C+D+Tfirst)(C+D+Tsecond)).2

Input fieldMeaning and unitsAccepted input
firstFirst paired seriesRequired. Array of Finite number.; minimum items 2; maximum items 512.
secondSecond paired seriesRequired. Array of Finite number.; minimum items 2; maximum items 512.
Output fieldInterpretationReturned shape
concordantConcordant pairsRequired. Safe integer; minimum 0.
discordantDiscordant pairsRequired. Safe integer; minimum 0.
tauBKendall tau-bRequired. Finite number; minimum -1; maximum 1.
tiedInBothPairs tied in both seriesRequired. Safe integer; minimum 0.
tiedInFirstOnlyPairs tied only in the first seriesRequired. Safe integer; minimum 0.
tiedInSecondOnlyPairs tied only in the second seriesRequired. Safe integer; minimum 0.
json
{
  "input": {
    "first": [
      1,
      2,
      3,
      4,
      5
    ],
    "second": [
      1,
      3,
      2,
      4,
      5
    ]
  },
  "output": {
    "concordant": 9,
    "discordant": 1,
    "tauB": 0.8,
    "tiedInBoth": 0,
    "tiedInFirstOnly": 0,
    "tiedInSecondOnly": 0
  }
}

Limitations and assumptions

  • Both lists must have equal length. A zero denominator is an undefined-correlation error. Joint ties are excluded from the single-series tie terms, and the tool returns no p-value or significance approximation.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

Choose the statistic according to the question and data conventions. Inspect the supplied series or matrix and the stated assumptions before comparing outputs from implementations with different defaults.

References

  1. SciPy: Kendall tau-b and tie conventions — SciPy

  2. Tool behavior and example: Kendall Tau-b Rank Correlation Calculator — tool.io

Similar or alternative tools

  • spearman rank correlation

    Calculate Spearman correlation using one-based average ranks and the existing Pearson calculation's numeric precision, returning both rank vectors without a p-value.

  • pearson correlation

    Calculate Pearson's linear correlation coefficient for two paired numeric series.