Skip to content

Chi-Square Test of Independence

Run a Pearson chi-square test of independence on a 2×2 contingency table. Enter the four observed cell counts to get the chi-square statistic, degrees of freedom, and p-value for the association between two categorical variables.

Inputs

Row 1

Row 2

Results

Enter a value to see results.

Table total

\begin{aligned} \chi^2 &= \dfrac{N\,(ad - bc)^2}{(a+b)(c+d)(a+c)(b+d)} \\ &= \dfrac{(?)\left((30)(40) - (10)(20)\right)^2}{((30)+(10))((20)+(40))((30)+(20))((10)+(40))} \\ &= ? \end{aligned}
\begin{aligned} p &= 1 - F_{\chi^2}(\chi^2,\, df) \\ &= 1 - F_{\chi^2}(?,\, ?) \\ &= ? \end{aligned}

Embed this calculator

Preview

Paste this code into your page to show the calculator.

Share this calculation

Anyone who opens this link sees your values already filled in.

200+ calculators · 10 languages · 100% free

Was this calculator helpful?

No

How can we improve this calculator?