Cramér’s V

Definition:
Cramér’s V is a statistical measure of association strength between two categorical variables.
It is based on the Chi-square test statistic, but it normalizes the value so that the result always lies between 0 and 1.

  • 0 → No association (completely independent variables).
  • 1 → Perfect association (one variable fully explains the other).

Formula:

$V = \sqrt{\frac{\chi^2}{n \cdot (k – 1)}}$

Where:

  • $\chi^2$ = Chi-square statistic
  • $n$ = total sample size
  • $k$ = the smaller of (number of rows, number of columns)

Interpretation (rule of thumb):

  • 0.00 – 0.10 → Very weak association
  • 0.10 – 0.30 → Weak association
  • 0.30 – 0.50 → Moderate association
  • > 0.50 → Strong association

(Note: thresholds can vary depending on the field.)


Example:
Imagine you survey 1,000 people about:

  • Gender (Male/Female)
  • Preference (Coffee/Tea)

After building a contingency table and calculating Chi-square, you compute Cramér’s V = 0.25.
This means there is a weak-to-moderate association between gender and drink preference.


Use in Data Science / ML:

  • To detect categorical drift: compare category distributions over time.
  • To check redundancy between features (e.g., if two categorical variables are too strongly associated, one may be dropped).
  • To test feature-target association in classification tasks.

Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.