Goodman-Kruskal Tau Calculator
Inputs
- Inputs: 200 observations, the sum of row maxima 150, and the largest column (outcome) total 80.
- Guessing the modal outcome category for everyone makes E1 = N - largest column total = 120 errors.
- Guessing each row's modal category makes E2 = N - sum of row maxima = 50 errors; random-assignment baselines cancel in the tau ratio.
- Tau = (E1 - E2)/E1 = 0.5833, a 58.33% proportional reduction in prediction error.
Two nominal variables - say, region and product choice, or diagnosis and treatment centre - cannot be correlated in the Pearson sense, but their association can still be measured by a gambler's question: how much better do you predict the outcome once you know the category of the predictor? Goodman and Kruskal built two famous answers. Tau, the subject of this page, uses a proportional-guessing baseline that fixes the famous blind spot of its sibling lambda. Enter the table's total, the sum of each row's largest cell and the largest column total, and the calculator returns tau and the two error counts behind it.
Worked examples
Strong nominal association
(200 · 150 · 80)
| Goodman-Kruskal tau | 0.5833 |
| Prediction errors without the predictor | 120 |
| Prediction errors using the predictor | 50 |
| Error reduction | 58.33% |
Moderate association
(120 · 74 · 45)
| Goodman-Kruskal tau | 0.3867 |
| Prediction errors without the predictor | 75 |
| Prediction errors using the predictor | 46 |
| Error reduction | 38.67% |
Dominant modal column
(500 · 310 · 260)
| Goodman-Kruskal tau | 0.2083 |
| Prediction errors without the predictor | 240 |
| Prediction errors using the predictor | 190 |
| Error reduction | 20.83% |
Proportional reduction in error
The PRE framework grades an association measure by the errors it saves. Predict the outcome blind and you make some number of errors, E1. Predict it with the predictor's help and you make E2. The measure is the fraction of blind errors eliminated, (E1 - E2)/E1, a number between 0 and 1 with a plain-language reading: the percentage by which knowledge of the predictor cuts your prediction errors.
Everything in the framework is a choice of prediction rule. Tau's rule is proportional random assignment: predict each outcome category with the probability the table itself suggests. Under that rule the expected error counts have the clean closed form this calculator uses - N minus the largest column total without the predictor, N minus the sum of row maxima with it - because the modal terms survive the expectation and the rest cancels.
- PRE: (E1 - E2)/E1, errors without vs with the predictor
- Tau's baseline is proportional random assignment
- Needs only N, the row maxima sum, the largest column total
- Tau is directional: outcome and predictor are not interchangeable
Tau vs lambda: the baseline matters
Lambda predicts by always naming the modal category. That rule has a celebrated failure: when the outcome's mode sits in the same column for every row, lambda reads exactly zero even if the rest of the table is strongly patterned - association hiding behind a dominant category becomes invisible. Tau's proportional baseline has no such blind spot, because it prices the whole distribution of each row, not just its peak.
The third worked example lives in lambda's danger zone: a dominant column total of 260 out of 500 means blind modal guessing is already good, and the headroom for any predictor is small. Tau still registers the improvement honestly - errors fall from 240 to 190, tau of 0.2083 - where a modal rule would have credited the predictor with far less of the structure that is present.
Worked examples
Example 1: Total observations N 200; Sum of the row maxima 150; Largest column (outcome) total 80. Goodman-Kruskal tau = 0.5833. Supporting values: Prediction errors without the predictor 120; Prediction errors using the predictor 50; Error reduction 58.33%. Inputs: 200 observations, the sum of row maxima 150, and the largest column (outcome) total 80. Guessing the modal outcome category for everyone makes E1 = N - largest column total = 120 errors. Guessing each row's modal category makes E2 = N - sum of row maxima = 50 errors; random-assignment baselines cancel in the tau ratio. Tau = (E1 - E2)/E1 = 0.5833, a 58.33% proportional reduction in prediction error.
Example 2: Total observations N 120; Sum of the row maxima 74; Largest column (outcome) total 45. Goodman-Kruskal tau = 0.3867. Supporting values: Prediction errors without the predictor 75; Prediction errors using the predictor 46; Error reduction 38.67%. Inputs: 120 observations, the sum of row maxima 74, and the largest column (outcome) total 45. Guessing the modal outcome category for everyone makes E1 = N - largest column total = 75 errors. Guessing each row's modal category makes E2 = N - sum of row maxima = 46 errors; random-assignment baselines cancel in the tau ratio. Tau = (E1 - E2)/E1 = 0.3867, a 38.67% proportional reduction in prediction error.
Example 3: Total observations N 500; Sum of the row maxima 310; Largest column (outcome) total 260. Goodman-Kruskal tau = 0.2083. Supporting values: Prediction errors without the predictor 240; Prediction errors using the predictor 190; Error reduction 20.83%. Inputs: 500 observations, the sum of row maxima 310, and the largest column (outcome) total 260. Guessing the modal outcome category for everyone makes E1 = N - largest column total = 240 errors. Guessing each row's modal category makes E2 = N - sum of row maxima = 190 errors; random-assignment baselines cancel in the tau ratio. Tau = (E1 - E2)/E1 = 0.2083, a 20.83% proportional reduction in prediction error.
Working from table summaries
Tau's arithmetic needs only three summaries of the cross-tabulation, which makes it computable from published tables that report marginals and row profiles - a common situation when reanalysing someone else's contingency table. The first worked example runs on N of 200, row maxima summing to 150 and a largest column of 80: blind errors 120, informed errors 50, tau of 0.5833. The second example, N of 120 with row maxima of 74 and a largest column of 45, gives errors of 75 and 46 and a tau of 0.3867.
The summaries also expose the table's shape at a glance. Row maxima summing close to N means each row is dominated by one outcome - strong association waiting to be measured. A largest column close to N means the outcome barely varies, and no predictor can earn a large tau against so dominant a margin.
Asymmetry: tau is directional
Tau predicts the column variable from the row variable, and swapping them changes the answer - the row maxima and column totals trade places and a different tau comes out. This is a feature the symmetric measures cannot offer: many real questions are directional. Does region predict product choice is a different question from does product choice predict region, and tau prices them separately.
The practical consequence is a reporting duty: state which variable is the outcome. A tau quoted without its direction is half a result, and comparing taus across studies that chose opposite directions is a quiet source of confusion in the literature on nominal association.
Limits with sparse tables
Tau is a descriptive measure of the table in hand; it carries no sampling theory of its own, and on sparse tables the row maxima are noisy summaries - a row of three observations contributes a maximum that says more about small numbers than about association. With thin data, pair tau with a chi-square test of independence for the inferential question and let tau answer the effect-size question.
Used that way - significance from the test, magnitude and direction from tau - the PRE family remains the most interpretable account of nominal association available. The three examples span its working range, from the strong 0.5833 down to the margin-capped 0.2083, and each is fully reconstructible from the three inputs, which is the standard this site holds its statistics pages to.
Tau's proportional baseline has one more virtue worth drawing out: it prices information the way a decision-maker actually uses it. A clinician predicting a diagnosis, a retailer predicting a choice, rarely commits to a single modal guess for every case; they shade their predictions across categories in proportion to experience. Tau's error counts model that shaded guessing, which is why its values tend to exceed lambda's on the same table and why the gap between the two measures is itself diagnostic - a large gap says the association lives in the non-modal structure of the table, exactly where lambda cannot see.
The worked examples also calibrate expectations for real tables. A tau of 0.5833, the first example, is a strong nominal association by the standards of survey and clinical data; values in the 0.3867 region of the second example are the respectable middle of published work; and the third example's 0.2083 shows how a dominant margin taxes even genuine structure. A tau reported beside its two error counts - as this calculator returns it - lets a reader judge which of those worlds a result inhabits without taking the author's word for it.
A note on sampling completes the picture. Tau computed on a sample table estimates the population's PRE, and like every ratio of counts it inherits noise from its smallest cells; a row built on a handful of observations contributes a maximum that may be pure accident. The chi-square companion test guards the existence question, but the magnitude question deserves its own humility: report tau with the table's N in view, as the examples do - 200, 120 and 500 - and treat a large tau on a small table as a hypothesis about the population rather than a measurement of it.
Software note: packages differ in which direction of tau they print by default, and some print only the symmetric-looking summaries of their crosstab routines. Before quoting a tau from any package, run the package on a small table whose row and column taus you have computed by hand - the exercise takes minutes and permanently fixes which number the package means by the word.
FAQs
What tau does the first worked example give?
0.5833: errors fall from 120 without the predictor to 50 with it, a 58.33% reduction.
How many errors are made without the predictor there?
120 - the total of 200 minus the largest column total of 80.
How many with it?
50: the total minus the row maxima sum of 150.
What tau does the second example give?
0.3867, from errors of 75 without the predictor and 46 with it.
What tau does the third example give?
0.2083. A dominant column of 260 out of 500 caps the headroom, and errors fall only from 240 to 190.
What is the error reduction in the third example?
20.83% - tau expressed as the proportional reduction in prediction error it is defined to be.