liveBook · Manning

Cramer's V

As explained in Statistics Slam Dunk

Cramer's V is an effect-size measure of the strength of association between categorical variables in a contingency table.

Cramer's V measures the strength of association between categorical variables in a contingency table. It complements a chi-square test for independence: chi-square indicates whether an association is statistically significant, while Cramer's V indicates how large it is. section 9.0 section 9.7

Interpret Cramer's V as a value between 0 and 1:

  • 0 indicates absolutely no association between the variables. section 9.7
  • 1 indicates a strong association. section 9.7
  • Values at or below 0.2 are generally considered small, around 0.5 medium, and at or above 0.8 large. section 20.3

NBA rest and wins

Ask whether the number of days off before an NBA regular-season game is associated with wins and losses. After preparing the contingency table as chisq_table and running the chi-square test, calculate the effect size in R: cramer.v(chisq_table) ## [1] 0.2359978 cramerV(chisq_table) ## Cramer V ## 0.236 Both functions return essentially the same result. The association between rest and wins or losses is statistically meaningful in the accompanying chi-square analysis, but its Cramer's V of about 0.24 indicates a small effect. The effect size supplements rather than replaces significance testing. section 9.7 section 9.8

library(tidyverse)
library(sqldf)
library(gtools)
library(gplots)
library(vcd)
library(questionr)
library(rcompanion)

Use questionr or rcompanion for Cramer's V; the surrounding workflow also supports contingency-table visualization with gplots and vcd. section 9.1

How Statistics Slam Dunk covers it

How deep it goes
Defines a 0–1 scale, demonstrates two R functions, and stops short of replacing significance testing.
Examples
Uses NBA days off, wins and losses, a contingency table, and questionr and rcompanion outputs of approximately 0.236.
What it assumes
Assumes categorical variables and a contingency table, while distinguishing chi-square significance from effect-size magnitude.
What you can do after
Apply it via questionr or rcompanion to quantify association after constructing a contingency table.
How it connects
Connects categorical data with contingency tables and chi-square tests for independence, while contrasting Cohen’s d for continuous data.

Also explained in

Compare how 2 books explain Cramer's V →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.