In a chi-square test, the null hypothesis, written H0, is the default claim that nothing is going on: no link between your categories, or no departure from the pattern you expected.1Technology Networks. What Is a Null Hypothesis in a Chi Square Test? The test never tries to prove that claim. It asks whether your counts drift too far from it to keep believing it. The idea works like a courtroom, where the null hypothesis plays the defendant presumed innocent until the evidence says otherwise.2Wikipedia. Statistical hypothesis test
How the Null and Alternative Hypotheses Work Together
Every hypothesis test sets up a pair of statements that contradict each other: a null and an alternative.3National University. LibGuides: Statistics Resources: Null & Alternative Hypotheses The null says there is no difference between groups or no relationship, a presumption of the status quo.3National University. LibGuides: Statistics Resources: Null & Alternative Hypotheses The alternative, written Ha or H1, is the claim you expect the data to support, your answer to the research question.3National University. LibGuides: Statistics Resources: Null & Alternative Hypotheses
The burden falls on the data to produce enough evidence to reject the null in favor of the alternative.2Wikipedia. Statistical hypothesis test That’s why you test the null even though the alternative is usually what you care about.
Researchers test the “boring” claim because it is easier to say exactly what “no relationship” predicts than what a vague effect predicts. That precise prediction gives you expected counts to compare against. And rejecting a specific claim is a clearer decision than confirming a fuzzy one.
Students often slip by putting the research claim in H0. The null always contains a word like “no,” “same,” “independent” or “equal.” A quick check: if your statement describes a difference, it belongs in the alternative.
When you write the pair, make each a full sentence that names the variables and the population. Make them mutually exclusive, so exactly one can be true. Avoid words like “prove” in either statement.
Writing the Null Hypothesis for Each Type of Chi-Square Test
In a test of independence, the null says two categorical variables are not related in the population.4Scribbr. Chi-Square Test of Independence | Formula, Guide & Examples That means the proportions of one variable are the same at every level of the other.4Scribbr. Chi-Square Test of Independence | Formula, Guide & Examples For example, a theater might state H0 as “movie type and snack purchases are independent.”5JMP. Chi-Square Test of Independence The alternative would then be that snack choice does depend on movie type.
A goodness-of-fit test compares one categorical variable against a distribution you specify in advance.6PubMed Central. Pearson’s goodness-of-fit tests for sparse distributions Its null says the population follows that distribution, and the alternative says it doesn’t.7Scribbr. Chi-Square Goodness of Fit Test | Formula, Guide & Examples
A homogeneity test compares several separate populations or subgroups on one categorical variable.8Lumen Learning. What Is a Null Hypothesis in a Chi Square Test? Its null says the share giving each response is the same in every population, for all response categories.8Lumen Learning. What Is a Null Hypothesis in a Chi Square Test? In symbols, H0 is p1 = p2 =… = pn, and the alternative is that at least one proportion differs.9R Interested. What Is a Null Hypothesis in a Chi Square Test? Rejecting H0 tells you something differs, not which group, and finding the group is a separate follow-up step.
To tell which test you’re running, start with how many variables you measured. One variable compared with a pattern you already have in mind means goodness-of-fit. Two variables recorded on every person or item in a single sample, such as movie type and snack choice for each customer, means independence. One variable recorded in separately drawn samples, such as vaccine preference in three towns, means homogeneity. Independence and homogeneity use the same table arithmetic and give the same chi-square value, so the difference shows up only in how you word the null and what your sampling design lets you say.
Fill-in-the-blank wording helps. For independence: “In the population, [variable X] and [variable Y] are not related.” For goodness-of-fit: “The population proportions of [variable X] match the expected proportions,” followed by a list of those proportions so a reader can check them. For homogeneity: “The proportion of [response] is the same in [group A], [group B] and [group C].”
What the Null Hypothesis Predicts, Expected Counts
A chi-square test works by comparing observed counts with expected counts, the counts you would see if the null were true.4Scribbr. Chi-Square Test of Independence | Formula, Guide & Examples For a goodness-of-fit test, each expected count is the total sample size times the proportion the null predicts for that category.10PubMed Central. What Is a Null Hypothesis in a Chi Square Test? For a test of independence, expected counts are the ones where one variable’s proportions are identical across the other variable’s levels.4Scribbr. Chi-Square Test of Independence | Formula, Guide & Examples The bigger the gap between observed and expected counts, the larger the chi-square value and the weaker the case for the null.
Take a genetics cross of 800 plants where the null says the offspring follow a 3:1 ratio. Multiplying 800 by 3/4 and by 1/4 gives expected counts of 600 of one type and 200 of the other. Suppose you observed 580 and 220. You set those beside 600 and 200 category by category, square each gap, and divide by the expected count: (580−600)²/600 and (220−200)²/200. Adding those pieces gives the chi-square value.
Expected counts needn’t be whole numbers. They are averages under the null, not real plants or people, and observed counts are the ones that are always whole. Keep the decimals, since rounding can distort the result.
In a two-way table, you build each expected count by multiplying that cell’s row total by its column total and dividing by the grand total. Doing this for every cell produces the “no relationship” table the null describes.
How to Decide Whether to Reject the Null Hypothesis
You compare the test’s p-value with a significance level, usually 0.05.11Minitab Support. Interpret the key results for Chi-Square Goodness-of-Fit Test The p-value is the probability of seeing counts at least as far from the expected ones as yours, if the null were true. A 0.05 level accepts a 5% risk of rejecting a null that is actually true.11Minitab Support. Interpret the key results for Chi-Square Goodness-of-Fit Test If the p-value is 0.05 or less, you reject the null and conclude the data differ from what it predicts.11Minitab Support. Interpret the key results for Chi-Square Goodness-of-Fit Test If the p-value is above 0.05, you “fail to reject” the null.11Minitab Support. Interpret the key results for Chi-Square Goodness-of-Fit Test
Alternatively, find a critical value, the chi-square number your result has to beat, from a table or software.12Scribbr. Chi-Square (Χ²) Tests | Types, Formula & Examples If your calculated chi-square is larger than the critical value, reject the null; if smaller, fail to reject it.13University of Nebraska-Lincoln. What Is a Null Hypothesis in a Chi Square Test? In the 3:1 plant example, a chi-square of 2.67 is below the critical value of 3.841, so the null is kept and the counts are consistent with Mendel’s ratio.14AgroSynapsis. Chi-square (χ²) Test: When Statistics Meets Mendelian Genetics
For a table lookup you need two things: the significance level and the degrees of freedom. For goodness-of-fit, degrees of freedom are the number of categories minus one, which is why a 3:1 test with two categories uses one. For a two-way table, they are (rows − 1) × (columns − 1). You read where those two meet in the table and compare that number with your calculated chi-square.
The two rules are the same test viewed two ways. Software usually reports the p-value, while many textbooks and exams use critical-value tables. Pick one method, say which you used, and keep the same significance level throughout. In a report, say “reject H0” or “fail to reject H0,” never “accept H0.” Give the chi-square value, degrees of freedom and p-value, then restate the result in plain terms about your variables.
What Rejecting or Keeping the Null Hypothesis Really Means
Failing to reject the null hypothesis does not mean it is true.15PubMed. Failing to reject the null hypothesis does not mean that the null hypothesis is true A difference might exist but the test may be too weak to detect it.11Minitab Support. Interpret the key results for Chi-Square Goodness-of-Fit Test A poorly designed or sloppy study makes it even easier to miss a real effect.16PubMed. Principles: when there should be no difference–how to fail to reject the null hypothesis So “no significant difference” means “not enough evidence,” not “no difference.”
Rejecting the null has limits too. A significant result supports an association but does not establish causation.17Research-Methodology. Chi-Square Test It also doesn’t tell you how strong the association is or which categories drive it.17Research-Methodology. Chi-Square Test In one eye-care example, a significant result (p = 0.045) came with an association strength measure of only 0.054, meaning a negligible link.18Medical hypothesis, discovery & innovation in optometry. Chi-square test applications
So ask whether the difference is big enough to matter in real life. Report an effect-size measure such as Cramer’s V alongside the p-value, and use knowledge of your subject to judge importance.
To find what drove a significant result, compare each cell’s observed count with its expected count. Residuals, which measure each cell’s contribution to the overall result, make this easier. The cells with the largest residuals point to the categories behind the finding, which is where your interpretation should focus.
When the Chi-Square Test Can’t Fairly Judge the Null
Expected counts should be 5 or more in at least 80% of cells, and none below 1.19PubMed Central. The Chi-square test of independence A rough target is a sample size of at least 5 times the number of cells.19PubMed Central. The Chi-square test of independence Even with every expected count at least 5, tables with many sparse cells can still give misleading results.20Journal of the American Statistical Association. A Warning on the Use of Chi-Squared Statistics With Frequency Tables With Small Expected Cell Counts
The reason is that chi-square relies on an approximation that works well only when expected counts are reasonably large. With small ones, the reported p-value can be off, so the decision to reject or keep the null becomes unreliable.
Check before you run it. Calculate every expected count first, since the rule concerns expected counts rather than observed ones. Then count how many cells fall below 5, see whether any fall below 1, and compare with the 80% requirement. A table can have large observed counts in some cells and still fail.
When expected counts are small, Fisher’s exact test is recommended, because it calculates the exact probability of your data under the null rather than relying on an approximation.21Translational Neurosurgery. Categorical variable analyses: Chi-square, Fisher’s exact, and Mantel–Haenszel In a 2×2 table, any expected count below 5 is already a reason to consider Fisher’s exact test. The G-test shares chi-square’s null hypothesis and gives nearly identical results in large samples, though the two can diverge in small ones.22MetricGate. Chi-Square vs Likelihood Ratio Test
Switching tests isn’t the only fix. You can combine sparse categories, such as merging two rare age bands, as long as the combined category still makes sense for your question. Decide this before seeing the results, so you don’t group categories just to get a significant answer. Collecting more data raises expected counts and may let you use chi-square as planned.

