Stat Chi2 Independence
stat_chi2_independenceTests independence between two categorical variables from independent observations via chi-square, reports Cramér's V effect size, and flags cells with expected counts below 5.
Instructions
Chi-square test of independence between two categorical variables.
WHEN TO USE: two categorical variables from independent observations.
WHEN NOT TO USE
The same participants measured twice on a categorical variable →
stat_chi2_mcnemar.Any expected cell count < 5 → Fisher's exact test (the tool flags this).
Report Cramér's V as the effect size.
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": {
"name": "<name>",
"x": "<x>",
"y": "<y>"
},
"name": "stat_chi2_independence"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| name | Yes | ||
| correction | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |