The concordant-discordant ratio compares the number of observation pairs that two variables rank in the same order (concordant) with the number they rank in opposite order (discordant). It treats data as ordinal, so only the order of values matters, not their size. The two counts are the building blocks of Kendall's tau, a measure of association between two ordinal variables.
This page is for analysts, data scientists and decision makers who need to judge whether two rankings agree. It covers what the ratio is, how pairs are counted, how ties are handled, and how it differs from related measures.
What is the concordant-discordant ratio?
Take any two observations and look at how two variables, X and Y, order them. If both variables put the same observation first, the pair is concordant. If they disagree, the pair is discordant. The ratio is the count of concordant pairs set against the count of discordant pairs: a ratio above one means agreement dominates, and a ratio below one means disagreement dominates. The Wikipedia article on the Kendall rank correlation coefficient describes concordance and discordance in exactly these terms.
Why does it matter?
Many business measures are rankings, not quantities: customer satisfaction bands, risk grades, model scores against analyst ratings. Pair counts let you test whether two such rankings move together without assuming the gaps between ranks are equal. Because only order is used, a few extreme values cannot distort the result.
How are the pairs counted and used?
With n observations there are n(n-1)/2 pairs. Each pair is concordant, discordant or tied. The SciPy kendalltau documentation gives Kendall's tau-b as (P - Q) divided by the square root of (P + Q + T) times (P + Q + U), where P is the number of concordant pairs, Q the number of discordant pairs, T the pairs tied only in x and U the pairs tied only in y. A pair tied in both x and y is left out of both T and U.
| Count | Meaning | Effect on association |
|---|
| Concordant pairs (P) | Both variables order the pair the same way | Push tau towards +1 |
| Discordant pairs (Q) | The variables order the pair in opposite ways | Push tau towards -1 |
| Ties | The pair is equal on one or both variables | Handled by the tau variant you choose |
The Wikipedia article on the Kendall rank correlation coefficient explains that values near +1 indicate strong positive association, values near -1 strong negative association, and values near zero little or no association.
How does it differ from Kendall's tau and Pearson correlation?
| Measure | What it uses | Typical use |
|---|
| Concordant-discordant ratio | Counts of concordant against discordant pairs | A quick read on whether rankings agree |
| Kendall's tau | The difference between the two counts, scaled to the range -1 to +1 | A formal measure of ordinal association |
| Pearson correlation | The actual values, assuming a linear relationship | Continuous data with linear patterns |
The ratio and tau carry the same information about agreement. Tau scales it to a bounded range, which makes results easier to compare across datasets. Tau-a does not adjust for ties, so it cannot reach plus or minus one when ties exist, as the Wikipedia article notes. Tau-b and tau-c differ in how they scale the result, according to SciPy.
How does it relate to AI agents?
When an AI agent ranks leads, claims or alerts, the question is whether its ranking agrees with the order a human expert would give. Counting concordant and discordant pairs between the two lists is a simple, assumption-light check. Pair counts depend on trustworthy source data and clear policy about what counts as a correct order, which is where a governed decision layer such as ElixirData, XenonStack's Context OS, sits.
What should you do first?
- Identify the two rankings you want to compare and confirm both are ordinal.
- Decide how ties will be treated and choose tau-a, tau-b or tau-c to match.
- Count concordant and discordant pairs, or compute tau with a standard library.
- Report the direction and strength of agreement with the sample size beside it.
- Re-run the comparison when the model or the rating scale changes.
To map one decision your agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
What is a concordant pair?
A concordant pair is two observations that both variables order the same way. If one observation ranks higher on X and also higher on Y, the pair is concordant.
What is a discordant pair?
A discordant pair is two observations that the two variables order in opposite ways. One ranks higher on X but lower on Y.
How is the concordant-discordant ratio related to Kendall's tau?
Kendall's tau is built from the same counts. It uses the difference between concordant and discordant pairs, scaled to a range of -1 to +1, with tau-b also adjusting for ties.
How are ties handled?
Tau-a makes no adjustment for ties. Tau-b and tau-c adjust for them in different ways. In SciPy, a pair tied in both variables is excluded from the tie counts.