Cramér’s V#
A measure of association between two categorical variables, derived from chi-squared.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Cramér’s V measures the strength of association between two categorical variables. Built on the chi-square statistic, it normalises the result to lie between 0 and 1: 0 means the variables are completely independent, 1 means one fully determines the other.
The formula#
where \(\chi^2\) is the chi-square statistic, \(n\) the total sample size, and \(k\) the smaller of the number of rows and columns in the contingency table. Dividing by \(k - 1\) is what keeps \(V\) bounded regardless of table size.
Reading the number#
A rough guide: 0.0-0.1 very weak, 0.1-0.3 weak, 0.3-0.5 moderate, and above 0.5 strong — though exact thresholds vary by field. Surveying 1,000 people on gender (male/female) and drink preference (coffee/tea), a computed V = 0.25 signals a weak-to-moderate link between the two.
Where it’s used#
In data science it does three jobs: detecting categorical drift by comparing distributions over time, flagging redundant features (two categoricals so strongly associated that one can be dropped), and testing feature-target association in classification.
Theme: Model Evaluation & Uncertainty · All terminology
Hint
Mind map — connected ideas
Categorical Drift · Cardinality in Categorical Data · Data Drift · PSI (Population Stability Index) · Drift Detection · Categorical Explosions
Hint
More in Model Evaluation & Uncertainty
Average Absolute Error (AAE) · Baseline Heuristics · Bootstrap · Bootstrap Confidence Intervals (CIs) · Coverage · DeLong’s Test · KS Statistic (Kolmogorov–Smirnov Statistic) · Likelihood Ratio (LR) · Mann–Whitney U Test (also called the Wilcoxon rank-sum test) · MASE (Mean Absolute Scaled Error) · Mean Absolute Error (MAE) · Mean Absolute Percentage Error (MAPE) · Mean Squared Error (MSE) · Relative accuracy
See also
Source article Adapted (context, re-expressed) in our own words from: Cramér’s V (insightful-data-lab.com).