Goodman-Kruskal Lambda Calculator

Association measures

Goodman-Kruskal lambda0.3231
Errors without the predictor130
Errors with the predictor88
Error reduction (%)32.31
How this was calculated
  1. Baseline errors: ignoring the predictor, the best guess is always the largest outcome class (110 of 240 cases), so 130 cases are mispredicted.
  2. With the predictor: inside each predictor category the largest cell is guessed instead, and the category maxima sum to 152, leaving 88 errors.
  3. Reduction: (152 - 110) / (240 - 110) = 0.3231 of the baseline errors are eliminated.
  4. Goodman-Kruskal lambda result: 0.3231 - a 32.31% proportional reduction in prediction error from knowing the predictor.

Here is a concrete way to ask whether a categorical predictor is worth anything: make me predict every case's outcome, first blind, then knowing the predictor, and count my mistakes both ways. Goodman and Kruskal's lambda is the proportional reduction in those mistakes - the fraction of blind prediction error that knowing the predictor eliminates.

Blind, the best strategy is to always guess the largest outcome class. In the first worked example that class holds 110 of 240 cases, so the blind strategy errs 130 times. Knowing the predictor, you guess the largest cell inside each predictor category instead; when those category maxima sum to 152, errors fall to 88. Lambda is (152 - 110) / (240 - 110) = 0.3231 - a 32.31 percent cut in prediction error.

This calculator takes the table total, the sum of the per-category maxima and the largest outcome marginal, and returns lambda with both error counts shown, so the prediction story behind the statistic is never hidden.

Worked examples

Lambda for a useful nominal predictor

(240 · 152 · 110)

Goodman-Kruskal lambda0.3231
Errors without the predictor130
Errors with the predictor88
Error reduction (%)32.31

Lambda for a larger table

(480 · 301 · 205)

Goodman-Kruskal lambda0.3491
Errors without the predictor275
Errors with the predictor179
Error reduction (%)34.91

Lambda for a weak predictor

(150 · 96 · 88)

Goodman-Kruskal lambda0.1290
Errors without the predictor62
Errors with the predictor54
Error reduction (%)12.90

Prediction with and without the predictor

Lambda belongs to the proportional-reduction-in-error family, whose members share a plain-English contract: the statistic is the fraction of your original errors that the predictor saves you. That contract makes lambda unusually interpretable for a nominal association measure - 0.3231 is not an abstract index value but a statement that one prediction error in three disappears when the predictor is known.

The asymmetry is part of the contract. Predicting the outcome from the predictor is a different task from predicting the predictor from the outcome, with different largest classes and different maxima, so lambda has a direction and the two directions generally differ. A careful report states which variable is being predicted; a lambda quoted without its direction is only half reported.

QuantityExample 1Meaning
Total cases240The whole table
Largest outcome total110The blind strategy's home class
Blind errors130Total minus largest outcome total
Sum of category maxima152Correct guesses available with the predictor
Informed errors88Total minus the category maxima sum
Lambda0.3231Share of blind errors eliminated

Lambda's blind spot

Lambda has a documented weakness, and knowing it is part of using the statistic honestly. If the same outcome category is the largest inside every predictor category, the informed strategy never changes a single guess, errors do not fall, and lambda is exactly zero - even if the table's proportions shift substantially across categories and other measures detect clear association. Lambda sees only modal prediction, and association that never moves the mode is invisible to it.

The defence is to report lambda in company. Gamma or Kendall's tau for ordinal data, Cramer's V for a symmetric nominal summary, and the table itself for everything - each covers the others' blind spots. The weak third example, lambda of 0.1290 from 150 cases whose category maxima sum to only 96 against a largest outcome of 88, shows a predictor that barely improves modal guessing; whether it still shifts proportions is a question lambda cannot answer and its companions can.

  • Lambda is directional: state which variable is the outcome being predicted.
  • A lambda of zero does not prove independence - check whether one outcome dominates every category before concluding anything.
  • The inputs must come from the full table of counts; percentages without the total cannot produce lambda.
  • The second example reaches 0.3491 across 480 cases, cutting errors from 275 to 179.
  • Modal prediction is a crude strategy by design - lambda prices exactly that crudeness, no more.

Worked examples

Example 1: Total cases in the table 240; Sum of largest cell per predictor category 152; Largest outcome marginal total 110. Goodman-Kruskal lambda = 0.3231. Supporting values: Errors without the predictor 130; Errors with the predictor 88; Error reduction (%) 32.31. Baseline errors: ignoring the predictor, the best guess is always the largest outcome class (110 of 240 cases), so 130 cases are mispredicted. With the predictor: inside each predictor category the largest cell is guessed instead, and the category maxima sum to 152, leaving 88 errors. Reduction: (152 - 110) / (240 - 110) = 0.3231 of the baseline errors are eliminated. Goodman-Kruskal lambda result: 0.3231 - a 32.31% proportional reduction in prediction error from knowing the predictor.

Example 2: Total cases in the table 480; Sum of largest cell per predictor category 301; Largest outcome marginal total 205. Goodman-Kruskal lambda = 0.3491. Supporting values: Errors without the predictor 275; Errors with the predictor 179; Error reduction (%) 34.91. Baseline errors: ignoring the predictor, the best guess is always the largest outcome class (205 of 480 cases), so 275 cases are mispredicted. With the predictor: inside each predictor category the largest cell is guessed instead, and the category maxima sum to 301, leaving 179 errors. Reduction: (301 - 205) / (480 - 205) = 0.3491 of the baseline errors are eliminated. Goodman-Kruskal lambda result: 0.3491 - a 34.91% proportional reduction in prediction error from knowing the predictor.

Example 3: Total cases in the table 150; Sum of largest cell per predictor category 96; Largest outcome marginal total 88. Goodman-Kruskal lambda = 0.1290. Supporting values: Errors without the predictor 62; Errors with the predictor 54; Error reduction (%) 12.90. Baseline errors: ignoring the predictor, the best guess is always the largest outcome class (88 of 150 cases), so 62 cases are mispredicted. With the predictor: inside each predictor category the largest cell is guessed instead, and the category maxima sum to 96, leaving 54 errors. Reduction: (96 - 88) / (150 - 88) = 0.1290 of the baseline errors are eliminated. Goodman-Kruskal lambda result: 0.1290 - a 12.90% proportional reduction in prediction error from knowing the predictor.

Lambda vs gamma and Cramer's V

The three statistics divide the association world by data type and question. Gamma exploits ordering, comparing concordant and discordant pairs, and suits ordinal variables; it is symmetric and mode-blind in the opposite way - it can be large where lambda is zero. Cramer's V is the symmetric nominal summary built from chi-square, bounded and directionless, answering 'how much association' without a prediction story.

Lambda's niche is the prediction framing, which is why it survives in applied fields - market research, programme evaluation, policy analysis - where the audience's real question is 'how much better can we guess?' When that is the question, lambda's 0.3231 with its error counts (130 down to 88) communicates in a way a chi-square-derived index cannot, and the blind spot is the price of the clarity.

Table discipline: the sum of category maxima adds the single largest cell within each predictor category - not the largest row or column totals. Mixing those up is the commonest hand-calculation error with lambda.

Lambda in practice

Worked reporting looks like the first example's full sentence: across 240 cases, blind prediction errs 130 times, predictor-informed prediction errs 88 times, and lambda is 0.3231 - a 32.31 percent reduction. Every number in that sentence is auditable from the table, and the calculator's insistence on showing both error counts is what makes the audit possible.

For planning, lambda also sets expectations honestly. Nominal predictors in social and commercial data rarely buy more than a third of the blind error; a lambda of 0.3491, the second example's value, is a strong nominal predictor by field standards, whatever its distance from the theoretical maximum of 1.

Reading the three examples

The first two examples are close cousins - 0.3231 and 0.3491 - but the second earns its value over 480 cases with errors falling from 275 to 179, a sturdier estimate of a similar effect. Size and strength are separate virtues, and lambda reports only the second; the error counts carry the first.

The third example is the cautionary one: 0.1290, an error reduction of just 12.90 percent, from a table where the largest outcome class (88 of 150) already dominates blind prediction. When one class is that heavy, most predictors can only nibble at the error - the arithmetic of the blind spot, visible before any subtlety about association even begins.

Applied fields often quote a symmetric lambda - the average of the two directional values - when neither variable has a natural claim to be the outcome. The average is a legitimate summary as long as it is labelled as one, because it conceals exactly the asymmetry that is lambda's most distinctive information: a predictor can be genuinely useful for guessing the outcome while the outcome is nearly useless for guessing the predictor, as anyone who has predicted rain from wet ground and wet ground from rain already knows. When the direction matters to the decision, report the direction's own value; reach for the symmetric form only when the question is truly directionless. Which is why the complete report of a lambda result is short but specific: the direction predicted, the two error counts, the table total and lambda itself. Anything less asks the reader to trust a proportion whose ingredients they cannot inspect.

FAQs

What lambda does the first example give?

0.3231 - category maxima summing to 152 against a largest outcome total of 110, across 240 cases.

How many errors does the blind strategy make there?

130: always guessing the largest outcome class (110 of 240) misses every case outside it.

How many errors remain with the predictor?

88 - guessing the largest cell inside each predictor category cuts the blind strategy's 130 errors down to 88.

What error reduction percentage is that?

32.31 percent of the blind prediction error eliminated by knowing the predictor - lambda expressed in its native, plain-English form.

Why can lambda be zero when variables are associated?

If the same outcome category is largest inside every predictor category, informed guessing never changes a prediction, so errors cannot fall - even while proportions shift. Lambda sees only modal prediction.

What lambda does the weak example give?

0.1290, an error reduction of 12.90 percent - a predictor that barely improves on always guessing the dominant class.

Sources

Related calculators

Goodman-Kruskal Gamma Calculator
Goodman and Kruskal's gamma rank-association measure from the concordant and discordant pair counts of a cross-classification, ties excluded.
Somers' D Calculator
Somers' D asymmetric rank association from concordant, discordant and outcome-tied pair counts, with Goodman-Kruskal gamma alongside for comparison.
Cramer's V Calculator
Cramer's V effect size for a contingency table from the chi-square statistic, the sample size and the table dimensions, with Cohen's degrees-of-freedom-adjusted benchmarks for the strength of association.