Chi-Square Test
Goodness-of-fit and independence tests: expected counts, χ² contributions, p-value, decision.
Example: two rows × two columns. Each row = one category of variable A.
① Answer
② Steps
③ Why it works
The chi-square test compares observed counts O with the counts expected under H₀. Each cell contributes (O−E)²/E — big mismatches inflate the sum. If H₀ were true, that sum would follow a χ² distribution, so a sum far in the right tail (tiny p-value) rejects H₀. Expected counts should be ≥ 5 in (nearly) every cell for the approximation to hold.