Compute Pearson’s chi-square statistic for an observed contingency table and compare it with a 5% critical value.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Each expected cell is row total × column total ÷ grand total, and the statistic sums (observed − expected)² ÷ expected across all cells. Degrees of freedom are (rows − 1)(columns − 1); stored 5% critical values cover one through ten degrees, with a Wilson–Hilferty approximation above ten.
10 20,20 10
Chi square: 6.6667 Degrees of freedom: 1 Critical value05: 3.841 Significant: yes Sample size: 60
Survey tables test response by region, experiments compare outcome counts across treatments, and quality tables compare defect type by production line.