Chi-Square Table Test
Calculate expected counts and the Pearson chi-square statistic for a contingency table.
Processing stays in your browser. No Yates correction or exact test. Expected cells below five are flagged; sparse tables may need a different method. Association is not causation.
How to use the chi-square table test
Review observed count matrix json using the supplied worked example. Replace the example with your own data and choose Calculate. Inspect the result against the method below before copying or downloading it. Editing an input clears the previous result.
How the tool works
Expected count is row total × column total / grand total. Summed squared observed-minus-expected differences divided by expected yield Pearson’s statistic and a chi-square-tail p-value.
Worked example
View the example inputs
- Observed count matrix JSON
- [[20,10],[10,20]]
For [[20,10],[10,20]], every expected cell is 15 and chi-square is 6.6667 with 1 degree of freedom.
Good to know
No Yates correction or exact test. Expected cells below five are flagged; sparse tables may need a different method. Association is not causation.
Sources and implementation notes
Implemented by DevBricks Technologies. Method notes updated . References describe the underlying format, method or API. Local processing runs on your device. Any public provider queries are described above and start when you run the lookup.
Match the calculation to the question and data
Define what one observation represents and whether observations are independent, paired, grouped or ordered in time. Keep the source data and identify missing values before calculating. Choose the method because it fits the study design, not because it produces a preferred number. A sample can be correctly formatted and still fail the assumptions required to generalize its result to a wider population.
Inputs and settings explained
- Observed count matrix JSON
- Supply the JSON shape named by this label. Preserve property names and value types in the example, then replace the demonstration data. Objects, arrays and newline-delimited records are different formats; use the one requested rather than enclosing arbitrary text in braces.
See the demonstration value
[[20,10],[10,20]]
How to review the result
Inspect the sample size, units, effect direction and intermediate quantities alongside the final statistic. Check the result with a small example whose behavior is known. A correlation does not establish causation, a p-value does not measure effect size, and a narrow numerical result does not eliminate bias in data collection. Review sensitivity to unusual observations and document any exclusions. For model or process reports, distinguish a retrospective description of the supplied data from a validated prediction of future outcomes.
- Confirm the test or estimator matches the pairing, grouping and distribution assumptions.
- Check missing-value treatment and whether filtering changed the study population.
- Report the effect and uncertainty in context instead of relying on a single threshold.
Common questions about this workflow
Does a statistically significant result prove a useful effect?
No. Consider effect size, uncertainty, study design and the practical consequences of the finding. Repeated testing and selective reporting also affect interpretation. Use the specific assumptions and limitations explained for this calculation.
Can I use an example dataset as evidence about real users?
An example demonstrates how the calculation behaves. It does not establish a population fact. Use appropriately collected data and a suitable analysis plan when drawing conclusions beyond the demonstration.
Built by DevBricks Technologies. Found an unexpected result in Chi-Square Table Test? Report a reproducible example with the tool URL, settings and a small sample that contains no private information.