Contingency table association

Calculate expected counts, the Pearson chi-square statistic and Cramér V from a frequency table.

The example value has been entered. Check it immediately or change the value.

Input is processed in the browser. Refreshing returns a sample value.

Result

Instructions and example

Eᵢⱼ=rowᵢ·columnⱼ/N; χ²=Σ(O−E)²/E; V=√(χ²/(N·min(r−1,c−1)))

For 10,20 / 20,10 all expected counts are 15, χ²≈6.66666666667 and V≈0.333333333333.

Use 2–10 rows and 2–10 columns, with integer total at most 1,000,000. Empty margins are rejected; no Yates correction, p-value or causal inference. Floating-point results display at most 12 significant digits.

Frequently asked questions

Why flag expected counts below 5?

Sparse tables can weaken chi-square approximations. The flag is descriptive and does not certify test suitability.

Does transposing the contingency table change V?

No. Transposition preserves χ² and Cramér V; category order does not change their magnitude.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors