How to use
- Choose goodness-of-fit if one sample is compared with an expected ratio, or independence if you have a contingency table.
- Enter observed counts, keep alpha at the default if you want a standard 5% threshold, and load an example if you want a quick starting point.
- Press Run test or leave auto update on. Then review expected counts, χ², p-value, and the warnings together before interpreting the result.
Wave 1 statistics expansion
Goodness-of-fit and independence in one page
This page keeps the first release focused: two chi-square modes, optional Yates correction for 2×2 tables, expected-count warnings, and browser-side result copying.
Goodness-of-fit inputs
Enter one row per category: observed count plus the expected weight used to build the expected distribution.
| Category | Observed | Expected weight | Actions |
|---|
Paste rows (optional)
Paste label, observed, expected weight or observed, expected weight. One row per line.
Independence inputs
Set the table size, adjust row and column labels, then fill the observed counts.
What the page computes
- Expected counts are derived from the chosen mode and totals.
- The chi-square statistic sums the observed-versus-expected gap across all cells.
- The p-value uses the chi-square distribution with the matching degrees of freedom.
Detailed breakdown
Run a test to populate the detailed table.
Goodness-of-fit charts
Charts appear for goodness-of-fit mode so you can quickly compare observed counts with the expected pattern and identify the largest contributions.
Observed vs expected
Contribution by category
How to interpret the result
- Start with the expected-count warnings. If many expected counts are very small, the chi-square p-value is less stable.
- Use χ² and the contribution table together. A single category or cell can dominate the total.
- For independence tables, use Cramer's V as a scale-free effect-size summary instead of looking only at significance.
- If your data come from a genetics ratio such as 3:1 or 9:3:3:1, the Mendelian page stays better tuned for that workflow.
FAQ
When should I use goodness-of-fit versus independence?
Use goodness-of-fit when one sample is compared with a known ratio or expected distribution. Use independence when you have a contingency table and want to test whether rows and columns are associated.
What does the warning about small expected counts mean?
Chi-square tests rely on an approximation that can weaken when expected counts are very small. This page flags expected counts below 5 and below 1 so you know when the p-value should be treated more cautiously.
Does this calculator include Fisher's exact test?
No. This page focuses on chi-square workflows only. For very small 2×2 tables, consider an exact test in specialist software.
How is Cramer's V shown?
Cramer's V appears for independence tables only. It rescales chi-square by sample size and the smaller table dimension, which makes it easier to compare association strength across tables.
Does the share URL include my counts?
No. The share URL stores only lightweight page settings such as mode, alpha, Yates correction, and table size. Entered counts stay in your browser.
What to compare next
If you are still deciding how much data to collect, start with the sample-size calculator before using this page. If you need a specialized genetics workflow with ratio presets and domain-specific examples, switch to the Mendelian page. If you want mean-based hypothesis tests instead, move to the t-test page. For general context on p-values and distributions, the pages below are the most direct next steps.
Related calculators
Comments (optional)
To reduce load, comments are fetched only when needed.