AI Glossary / Statistics and probability / Intermediate
Contingency coefficient
Definition
The contingency coefficient, usually meaning Pearson's contingency coefficient C, is a nonnegative measure of association between categorical variables calculated from a contingency table. It transforms the Pearson chi-square statistic using the sample size: C=sqrt[chi-square/(chi-square + n)]. It describes departure from independence in the table but does not identify a direction of association, establish causation, or share the same scale properties as Pearson's correlation coefficient.
What it means
A contingency table counts how often combinations of categories occur. If the variables were independent, the expected pattern would be determined by the row and column totals. The chi-square statistic summarizes differences between observed and expected counts, and C rescales that statistic into an association measure.
C is zero when the observed table matches the independence pattern exactly. For a fixed finite table dimension, its maximum is below one. This is an important limitation: a value below one can occur even with perfect categorical association. Comparisons across differently sized tables therefore require care.
How it works
Calculate expected counts under independence as row total times column total divided by the grand total n. Compute the ordinary Pearson statistic by summing (observed - expected) squared divided by expected across cells with valid expected counts.
Insert that statistic into C=sqrt[chi-square/(chi-square+n)]. State whether the conventional uncorrected Pearson statistic was used, because continuity corrections or alternative divergence statistics change the calculation. Do not substitute percentages for counts without a justified reconstruction of the sample basis.
For an r-by-c table with m=min(r,c), a general upper bound is sqrt[(m - 1)/m]. Attainability can depend on the margins. In a two-by-two table, the upper bound is sqrt(1/2), approximately 0.707, rather than one. Cramer's V uses a different normalization and is often considered when a scale reaching one is desired.
Interpret C alongside the table, row or column proportions, and sampling uncertainty. The coefficient is an effect-size summary, not a p-value. A hypothesis test based on chi-square additionally needs an appropriate sampling design and adequate approximation conditions. Sparse cells, clustered observations, and survey weights may require different inferential methods even when a descriptive coefficient can be computed.
Three practical examples
- A customer analyst summarizes association between preferred support channel and subscription category.
- A quality team examines whether defect type and production line have a different joint pattern from independence.
- An AI evaluation team explores association between a categorical error label and a document category, while inspecting the underlying cells to understand the pattern.
Think of it this way
Think of the coefficient as compressing the mismatch between a table and its independence pattern into one number. Compression makes comparison convenient but hides which cells drive the difference. Its scale is also shaped by the table's dimensions, so the number needs its table context.
Worked example
Consider an original two-by-two table of 100 users. In group A, 40 prefer chat and 10 prefer telephone. In group B, 10 prefer chat and 40 prefer telephone. Both row totals and both column totals are 50.
Under independence, every expected count is 50 times 50/100=25. Each cell differs from expectation by 15 in absolute value. The Pearson chi-square statistic is four times 15 squared/25 = 36.
The contingency coefficient is sqrt[36/(36+100)]=sqrt(36/136), approximately 0.5145. This is not Pearson r, not the percentage of users whose preference is explained, and not the probability that an association exists.
For comparison, a perfectly aligned table with 50 users in each diagonal cell and zero in the off-diagonal cells has chi-square 100. Its C is sqrt[100/(100+100)]=0.7071. Thus even this perfect two-category alignment does not give C=1.
If every count in the first table doubles, chi-square becomes 72 and n becomes 200; C remains sqrt(72/272)=0.5145. The descriptive association is unchanged, although inferential precision and test evidence can change with sample size.
Illustrative case study
In a fictional company, Birch Connect compares support preferences across customer plans. An analyst reports a contingency coefficient and a manager assumes that a value below 0.7 means the association cannot be very strong.
The analyst explains the coefficient's dimension-dependent limit and shows the actual table proportions. The team also checks whether several responses come from the same customer and whether the sample represents the customers relevant to the decision. It avoids applying a universal strength label without context.
The revised report uses the coefficient as one summary alongside the practical differences in preferences. This fictional case illustrates interpretation, not real findings or evidence that plan choice causes channel preference.
Common misconceptions and mistakes
Pearson's contingency coefficient is not Pearson's product-moment correlation. It has no positive-versus-negative direction and cannot generally reach one in a fixed finite table. A large value does not prove causation. A statistically significant chi-square test does not automatically imply a practically large association. Combining or splitting categories can change the coefficient. Identical C values can conceal different cell patterns and different operational consequences.
Business use
Businesses use the contingency coefficient to summarize relationships between categorical attributes, especially when reviewing legacy analyses or statistical reports. Its limitations make the underlying table essential. Explain which categories are involved and show percentages with their denominators. If comparing several studies or differently sized tables, consider a measure whose normalization better suits the comparison and keep uncertainty separate from association magnitude.
People also ask
Can C be negative?
No; it summarizes magnitude rather than direction.
Is C=0 proof of population independence?
No. It describes the observed table's exact independence pattern, and population conclusions require inference.
Why is the maximum below one?
Its transformation includes n in the denominator, and the chi-square-to-sample-size ratio is bounded by the table dimensions.
Check your understanding
What is the expected count in each cell of the worked example?
Answer: It is 25.
What coefficient follows from chi-square 36 and n=100?
Answer: Approximately 0.5145.
Does the perfect diagonal table contradict the formula because C is only 0.7071?
Answer: No; that is the two-by-two upper bound.
Related terms
- Contingency table
- Expected frequencies
- Independence
- Effect size
- Pearson chi-square
- Cramer's V
- phi coefficient
- categorical association
- expected frequency
- nominal variable
Learn next
Learn contingency tables and expected counts under independence, then compute chi-square and C by hand. Compare C with Cramer's V and the phi coefficient using the same table. Next study how sampling design, category definitions, and sparse counts affect interpretation and inference.
More in Statistics and probability
- Confounding - Confounding is a source of bias that can distort the interpretation of an observed association as a causal effect.
- Conjoint analysis - Conjoint analysis is a family of methods for studying how people evaluate alternatives described by several attributes.
- Constellation model - A constellation model is a probabilistic, part-based model for recognizing object categories in images.
- Continuity correction - A continuity correction adjusts a boundary when a continuous distribution approximates a discrete one.
- Continuous probability distribution - A continuous probability distribution describes uncertainty in a quantity whose probability is spread across a continuum, rather than concentrated on...
- Continuous random variable - A continuous random variable represents an uncertain numerical quantity through a distribution that assigns zero probability to each individual value.
Sources
David Howell, Statistical Methods for Psychology glossary, Contingency coefficient: https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html SciPy official documentation, contingency association: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.contingency.association.html SciPy official source implementation: https://github.com/scipy/scipy/blob/main/scipy/stats/contingency.py
Previous: Contextual searching Next: Contingency Matrix