cramers_v
Measure the association strength after a chi-square test of independence by converting the chi-square statistic into a normalized effect size from 0 to 1 that is comparable across tables of any shapes.
Instructions
Effect size for a chi-squared test of independence (Cramer, 1946), normalized to [0, 1] regardless of table shape so it's comparable across tables of different sizes, unlike the raw chi-squared statistic. Call after chi_square_independence, passing its statistic and the same table's n/rows/cols. Returns a float in [0, 1]; rough guidance for a 2x2 table: ~0.1 small, ~0.3 medium, ~0.5 large -- the threshold shifts for larger tables.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chi2_statistic": "<chi2_statistic>",
"n": "<n>",
"rows": "<rows>",
"cols": "<cols>"
},
"name": "cramers_v"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | total number of observations in the table | |
| cols | Yes | number of columns in the table | |
| rows | Yes | number of rows in the table | |
| chi2_statistic | Yes | the chi-squared statistic from chi_square_independence on the same table |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |