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
- Supply first, second in the field shapes below.
- Run the calculation. Correct format, shape, range, or undefined-statistic errors before interpreting a result.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| first | First paired series | Required. Array of Finite number.; minimum items 2; maximum items 512. |
| second | Second paired series | Required. Array of Finite number.; minimum items 2; maximum items 512. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| concordant | Concordant pairs | Required. Safe integer; minimum 0. |
| discordant | Discordant pairs | Required. Safe integer; minimum 0. |
| tauB | Kendall tau-b | Required. Finite number; minimum -1; maximum 1. |
| tiedInBoth | Pairs tied in both series | Required. Safe integer; minimum 0. |
| tiedInFirstOnly | Pairs tied only in the first series | Required. Safe integer; minimum 0. |
| tiedInSecondOnly | Pairs tied only in the second series | Required. Safe integer; minimum 0. |
{
"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
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.