AI Glossary / Statistics and probability / Intermediate
Cramér's phi ( F c )
Definition
Cramér's phi, commonly written phi_c and more widely known as Cramér's V, measures association between two categorical variables in a contingency table. It scales the Pearson chi-square statistic using sample size and table dimensions. It summarizes association strength without assigning a positive or negative direction to category labels.
What it means
Suppose customers choose among three support channels and belong to two service tiers. A contingency table counts customers in each tier-channel combination. Cramér's V summarizes how much the channel proportions differ across tiers.
The supplied glossary calls this Cramér's phi and describes it as an extension of phi beyond a 2-by-2 table. This entry uses the standard V formula for that meaning. It is not Pearson's contingency coefficient or Tschuprow's T, which use different normalizations.
A single number cannot show which categories account for the relationship. Always read it alongside the table and relevant conditional percentages rather than treating it as a complete explanation.
How it works
For an r-by-c table with total count n, calculate expected counts under independence as row total times column total divided by n. Pearson's chi-square statistic sums (observed - expected) squared divided by expected over cells with valid positive expectations.
The conventional uncorrected coefficient is V = sqrt[chi-square/(n × min(r - 1,c - 1))]. At least two nonempty categories are needed in each dimension. Empty margins should be handled explicitly rather than dividing by zero.
V lies between zero and one. In a 2-by-2 table it equals the absolute value of the usual signed phi coefficient. Relabeling or reordering categories does not change V. Its sample estimate can have upward bias, especially with limited data and many categories; bias-corrected estimators are distinct variants and should be identified.
Three practical examples
- An AI help center examines whether preferred support channel is associated with subscription tier, then inspects the actual category percentages.
- A model-audit team summarizes association between predicted categories and a recorded group variable without implying that the association alone establishes unfairness.
- A data-quality analyst checks whether missingness categories differ across collection sites, using the table to identify where investigation is needed.
Think of it this way
Think of a seating chart showing how guests from different clubs distribute themselves among tables. Cramér's V summarizes whether club and table choice are associated. It does not explain why guests chose those seats, nor does it say that moving a guest to another club would change their choice.
Worked example
Consider an original 2-by-3 table for two customer tiers and three support channels. Tier A counts are [20,10,0]; Tier B counts are [0,10,20]. Each row totals 30, each column totals 20, and the overall total is 60.
Every expected count under independence is 30 × 20/60 = 10. The four cells with observed counts 20 or 0 each contribute (10 squared)/10 = 10 to chi-square. The two cells with observed count 10 contribute zero. Thus chi-square = 40.
Here min(r - 1,c - 1) = min(1,2) = 1, so V = sqrt(40/60), approximately 0.8165.
The table reveals more than the coefficient: the first channel appears only in Tier A, the third only in Tier B, and the middle channel is equally represented. If every count doubles, chi-square doubles to 80 and n doubles to 120, leaving V unchanged.
The coefficient is descriptive here. A significance calculation would additionally depend on the sampling design and appropriate test assumptions. The invented counts do not establish why customers differ or whether tier membership causes their channel choice.
Illustrative case study
Fictional case: Cedar Service compares an AI classifier's output categories across two branches. Its report initially presents only a large association coefficient, prompting managers to assume that one branch has a model problem.
The analyst adds the contingency table and finds that the branches process different request types. She then examines labeled evaluation records, category definitions, and error rates within relevant request types.
The association remains useful as a signal to investigate, but it is not treated as an accuracy measure or causal diagnosis. Cedar documents which version of the coefficient was used and whether the table includes one record per independent request or repeated records from the same customers.
Common misconceptions and mistakes
- Cramér's V does not have a negative sign; nominal categories have no intrinsic increasing direction.
- A large V is not a small p-value. Association magnitude and evidence against independence are different quantities.
- Universal labels such as small, medium, and large can mislead across table sizes and applications.
- V is not classification accuracy and does not replace a confusion matrix or category-specific error measures.
- An observed zero cell is not automatically a problem; a zero expected count requires attention to empty margins or structural restrictions.
- Structural zeros, survey weights, clustering, and repeated observations can require methods beyond an ordinary independent-count interpretation.
Business use
Businesses can use this coefficient to compare categorical patterns, identify possible data shifts, or summarize exploratory tables. Retain the counts and denominators so readers can understand what drives the association.
State whether the value uses ordinary Pearson chi-square, a continuity correction, or a bias correction. Software options can change results, especially in small tables. Comparisons should use a consistent definition and compatible category structures.
When a value informs a decision, connect it to practical consequences. A noticeable association may reflect harmless differences in customer mix, while a smaller association can still matter when it affects an important outcome. Use domain evidence and targeted analysis to investigate the pattern.
People also ask
Is Cramér's phi the same as Cramér's V here?
Yes; the supplied glossary's extended phi meaning is interpreted as phi_c, commonly called V.
Does reversing row order reverse the sign?
No; the coefficient is nonnegative and unchanged by relabeling.
Does zero sample V prove population independence?
No. It describes the observed table; population inference requires consideration of sampling uncertainty.
Check your understanding
Answer: 1.
What does the normalization use?
Answer: Sample size and the smaller of r - 1 and c - 1. 2.
Why does doubling every cell leave V unchanged?
Answer: Chi-square and sample size scale by the same factor. 3.
Why keep the contingency table?
Answer: The coefficient alone does not identify the categories producing the association.
Related terms
- Contingency table
- Effect size
- Cramér's V
- phi coefficient
- Pearson chi-square
- nominal association
- independence test
Learn next
Learn contingency tables and expected counts, then compare V, signed phi, and other association measures. Study sampling uncertainty and small-sample bias before interpreting differences between coefficients from separate datasets.
More in Statistics and probability
- Covariance function - A covariance function specifies the covariance between a random process's values at two inputs.
- Covariance matrix - A covariance matrix is a square table describing the variances and pairwise covariances of a random vector's components.
- Cox model - The Cox model usually means Cox proportional hazards regression, a method relating predictors to the time until an event while accommodating appropriate...
- Credence (statistics) - Credence is a degree of belief that a proposition is true.
- Criterion variable - A criterion variable is the variable a statistical model or prediction study aims to predict.
- Critical value - A critical value is a boundary used in a statistical decision rule, commonly separating rejection and nonrejection regions for a hypothesis test.
Sources
David Howell, Statistical Methods for Psychology glossary, Cramér's phi: https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html
SciPy developers, contingency association documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.contingency.association.html
Primary author and software descriptions were read. The input notation is interpreted as phi_c/Cramér's V. The table, arithmetic, and fictional case are original.
Previous: Cox model Next: Crash blossom