Hypothesis testing lets us decide whether observed data is consistent with an assumed model. Our preferred workhorse is the Pearson chi-square (χ²) test, which measures how well a set of observed frequencies matches an expected set.
Core formula
χ2=∑E(O−E)2
Related variants
χc2=∑Ei(Oi−Ei)2
χ2=σp2σs2(n−1)
χ2=∑Eij(Oij−Eij)2
We choose the variant by purpose: goodness-of-fit, variance test, or contingency-table test.