When Do You Reject the Null Hypothesis in Chi-Square?

You reject the null hypothesis in a chi-square test when your result is too large to be a plausible fluke if the two variables were unrelated.1Wikipedia. Chi-squared test – Wikipedia In practice, that means a p-value at or below your chosen cutoff, usually 0.05, or a chi-square value above the critical value from a table. Rejecting tells you only that a relationship probably exists, not how strong it is or which groups drive it.2GraphPad. When Do You Reject the Null Hypothesis in Chi-Square? And the decision is only as trustworthy as the counts behind it, so small tables need a different test.

What the Chi-Square Value Measures

The test starts by imagining there is no relationship. The null hypothesis is that ‘no relationship’ assumption: the proportions in each category are the same across groups.3BMJ. 8. The Chi squared tests Under it, you work out an expected count for every cell of your table, which is the number you’d see if the assumption held.4PubMed Central. The Chi-square test of independence The expected count is the row total times the column total, divided by the grand total.5Cleveland Clinic Journal of Medicine. Chi-square and Fisher’s exact tests For example, a row total of 28 and a column total of 92 out of 184 people gives an expected count of about 13.9.4PubMed Central. The Chi-square test of independence This accounts for the fact that some categories are simply more common overall, such as more people staying healthy whether vaccinated or not.4PubMed Central. The Chi-square test of independence

Before any of that, set up the table properly. Rows and columns must each be categories of one variable, such as vaccinated or not in the rows and sick or healthy in the columns, and each person or item appears in exactly one cell. Include row totals, column totals and a grand total first, because every expected count is built from them. The test is meant for independent observations, so counting the same person twice, as with before-and-after measurements on the same people, breaks the setup.

Use raw counts of people or items, not percentages. Percentages hide sample size, which the test depends on.

The chi-square statistic, which I’ll call the chi-square value from here on, adds up the gaps between observed and expected. For each cell, you subtract expected from observed, square it, and divide by the expected count.5Cleveland Clinic Journal of Medicine. Chi-square and Fisher’s exact tests Squaring stops positive and negative gaps from cancelling out, and dividing by the expected count puts every cell on a comparable scale.5Cleveland Clinic Journal of Medicine. Chi-square and Fisher’s exact tests Adding every cell’s result gives the chi-square value.3BMJ. 8. The Chi squared tests

Take one cell with 23 observed against 13.93 expected. The gap is about 9, squaring gives about 82, and dividing by 13.93 gives about 5.9 for that cell. Every cell gets its own contribution, and the cells with the biggest ones are where your data differ most from ‘no relationship.’ A chi-square value near zero means your table looks like ‘no relationship,’ and a big one means it doesn’t.

The P-Value Rule for Rejecting the Null

Most software users decide with the p-value. Compare it to the significance level, called alpha, which is usually set at 0.05.6Minitab. Interpret the key results for Chi-Square Test for Association If the p-value is less than or equal to alpha, you reject the null and conclude the variables are associated.6Minitab. Interpret the key results for Chi-Square Test for Association An alpha of 0.05 means accepting a 5% risk of declaring a link when none exists.6Minitab. Interpret the key results for Chi-Square Test for Association So a p-value of 0.03 leads to rejection at 0.05, while 0.07 does not. Some courses or fields use a stricter alpha of 0.01, which demands stronger evidence before rejecting.7Statistics LibreTexts. Tests for Independence

Pick alpha before running the test, so the result can’t tempt you to move the line. Use whatever your instructor or field specifies; 0.05 is the default.

The p-value is the chance of getting a chi-square value this large or larger if there really were no relationship.8DataCamp. When Do You Reject the Null Hypothesis in Chi-Square? A small p-value means your table would be surprising under the ‘no relationship’ assumption.9Nature Education. Genetics and Statistical Analysis8DataCamp. When Do You Reject the Null Hypothesis in Chi-Square?

Results near the line deserve a little care. A p-value of 0.049 and one of 0.051 lead to different decisions at alpha 0.05, yet the evidence they represent is almost identical. Because of this, many instructors want the exact p-value reported rather than only ‘significant’ or ‘not significant.’ If your p-value equals alpha exactly, the rule says reject, though that is rare when software prints several decimals.

When you write the conclusion, say ‘reject the null’ or ‘fail to reject the null,’ never ‘accept the null.’ Failing to reject means the evidence wasn’t strong enough, not that the variables are proven unrelated. Report the chi-square value, df and p-value together, for example chi-square(2) = 3.17, p = 0.205.

The Critical Value Rule and Degrees of Freedom

Degrees of freedom, or df, come from the size of your table. They equal the number of rows minus 1 times the number of columns minus 1.10Mike’s Biostatistics Book. When Do You Reject the Null Hypothesis in Chi-Square? A 2×2 table has df = 1,10Mike’s Biostatistics Book. When Do You Reject the Null Hypothesis in Chi-Square? a 3×2 table has df = 2,11Kent State University Library Guides. SPSS Tutorials: Chi-Square Test of Independence and a 4×4 table has df = 9.8DataCamp. When Do You Reject the Null Hypothesis in Chi-Square?

Count only the categories of your two variables, not the ‘Total’ row and column many tables include. A common slip is counting a 3×2 table as having 6 cells and using that as df; the rows-minus-1 times columns-minus-1 formula is what counts.

The critical value is the cutoff line, read from a chi-square table using your df and your alpha.12JMP. Chi-Square Test of Independence If your chi-square value is greater than the critical value, you reject the null.13NIST ITL. Critical Values of the Chi-Square Distribution For instance, a chi-square of 31.75 beats a critical value of 9.21 at the 1% level, so the null is rejected.7Statistics LibreTexts. Tests for Independence The critical value and p-value approaches always lead to the same decision for the same alpha. Commonly used cutoffs at alpha 0.05 are 3.84 for df = 1, 5.99 for df = 2 and 7.81 for df = 3.

To use the table, find the row for your df, then the column for your alpha, such as 0.05. The number where they meet is your critical value.

Larger tables need a bigger chi-square value to reject because more cells means more small gaps get added up even when there is no real relationship. So the critical value rises as df rises. A chi-square of 6 can reject with df = 1 but not with df = 4.

Reading Chi-Square Output From Software

In SPSS output, the key line in the Chi-Square Tests table is the Pearson Chi-Square.11Kent State University Library Guides. SPSS Tutorials: Chi-Square Test of Independence In one example it shows a value of 3.171, df = 2 and p = 0.205.11Kent State University Library Guides. SPSS Tutorials: Chi-Square Test of Independence Because 0.205 is above 0.05, the null is not rejected.11Kent State University Library Guides. SPSS Tutorials: Chi-Square Test of Independence The footnote under the table reports whether any cells had an expected count below 5.11Kent State University Library Guides. SPSS Tutorials: Chi-Square Test of Independence Read that footnote before the p-value: if it flags cells under 5, the p-value may not be trustworthy.

R output labels the statistic ‘X-squared,’ here 142.86 with df = 9.8DataCamp. When Do You Reject the Null Hypothesis in Chi-Square? Its p-value below 2.2e-16 is far under 0.05, so the null is rejected.

SPSS also lists continuity correction, likelihood ratio and Fisher’s exact rows. For a standard test with adequate counts, use the Pearson line. Use the Fisher’s exact row when the footnote flags small cells. The ‘Asymptotic Significance’ column is the p-value.

In the Pearson row, locate three numbers: the chi-square value, the df, and the significance column, then compare the last to your alpha. Check that the df matches what you’d calculate from your table size; if it doesn’t, the variables may have been entered with extra or missing categories. The ‘N of Valid Cases’ line shows how many people were actually analyzed, which can be fewer than your dataset if some had missing answers.

What Rejecting the Null Does and Doesn’t Mean

A common mistake is reading p = 0.01 as ‘a 1% chance there’s no relationship.’14PubMed Central. Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations The p-value assumes the null is true and asks how surprising the data are.15PubMed Central. P value and the theory of hypothesis testing: an explanation for new researchers So it cannot tell you the probability that the null itself is true.14PubMed Central. Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations

Rejecting also says nothing about direction. Chi-square tests are always one-sided in shape, with all large values in one tail, so you can only test whether a relationship exists, not whether it goes in a particular direction.16The Analysis Factor. One-tailed and Two-tailed Tests – The Analysis Factor The chi-square value only says the table differs from ‘no relationship,’ not which group has more or fewer than expected. To describe the pattern, compare percentages within rows or columns after rejecting. Someone who wants to know whether vaccinated people got sick less often needs that comparison.

Rejecting shows the two variables move together in your data. It says nothing about which one, if either, causes the other, and a third factor could drive both. Word conclusions as ‘associated with,’ not ’caused by.’

Statistical significance isn’t the same as importance. With a huge sample, tiny meaningless differences can still reject the null.

Not rejecting is not proof of no relationship either. A non-significant result can occur because the sample was too small to detect a real pattern. A sentence like ‘there is no relationship’ overstates what a p-value of 0.205 shows; a fairer wording is that the study did not find evidence of an association.

When the Chi-Square Result Can’t Be Trusted

The chi-square p-value is an approximation that works well only with large samples.17The Analysis Factor. Chi-Square test: Do you need 5 observations per cell? The common rule is to use the test only when every expected count is 5 or more.18researchgold.org. Chi-Square Test vs Fisher’s Exact Test: When to Use Which Even then, in large tables with many cells and uneven counts, the result can mislead.19Journal of the American Statistical Association. A Warning on the Use of Chi-Squared Statistics With Frequency Tables With Small Expected Cell Counts

The rule applies to expected counts, not what you observed. A cell with 2 observed can still have an expected count above 5. Software usually reports the number of cells under 5 in a footnote.

Small expected counts cause trouble because the p-value comes from a smooth curve, while real counts jump in whole numbers, and with small expected counts the mismatch becomes large. One cell with a tiny expected count can inflate its contribution to the chi-square value and produce a rejection that isn’t earned.

Fisher’s exact test calculates the exact probability of your data under the ‘no relationship’ assumption.20Translational Neurosurgery. Categorical variable analyses: Chi-square, Fisher’s exact, and Mantel–Haenszel It is recommended for small samples or when chi-square assumptions aren’t met.20Translational Neurosurgery. Categorical variable analyses: Chi-square, Fisher’s exact, and Mantel–Haenszel Yates’s correction is often applied to 2×2 tables but tends to be overly cautious, rejecting less often than it should.21PubMed. Yates’s correction for continuity and the analysis of 2 x 2 contingency tables The ordinary Pearson chi-square generally keeps the false-alarm rate where it should be.21PubMed. Yates’s correction for continuity and the analysis of 2 x 2 contingency tables

If a cell is too small in a 2×2 table, switch to Fisher’s exact test. For larger tables, consider combining sparse categories if it makes sense. Either way, report which test you used and why.

How Strong Is the Relationship After You Reject

The p-value shows whether an association is significant but not how strong it is.2GraphPad. When Do You Reject the Null Hypothesis in Chi-Square? Phi and Cramér’s V, an effect size for tables, measure strength on a scale that doesn’t depend on sample size.2GraphPad. When Do You Reject the Null Hypothesis in Chi-Square? You run the chi-square test first, then calculate the effect size from it.22nari’s research log. Chi-Square Test in Stata: Cramer’s V Effect Size and tabchi Adjusted Residuals

Cramér’s V runs from 0, no association, to 1, perfect association. Values around 0.1 are often called small, 0.3 medium and 0.5 large. A significant result with V near 0.05 may matter little in practice.

Phi is used for a 2×2 table, while Cramér’s V extends the same idea to tables with more rows or columns. For a 2×2 table the two give the same number, so many programs report just one.

Finding Which Groups Drive the Result

In a large table, a significant result alone doesn’t show which categories are behind it.23Cornell Statistical Consulting Unit. Using Adjusted Standardized Residuals for Interpreting Contingency Tables Cell residuals, especially adjusted ones, are the usual follow-up.24PubMed Central. Fisher’s exact approach for post hoc analysis of a chi-squared test Testing every 2×2 piece of the table separately is cumbersome and gives a poor overall picture.23Cornell Statistical Consulting Unit. Using Adjusted Standardized Residuals for Interpreting Contingency Tables

Each cell gets a residual showing how far it sits above or below its expected count. Values beyond about plus or minus 2 suggest that cell stands out. Positive means more than expected, negative means fewer.

In SPSS, residuals are an option in the Crosstabs ‘Cells’ menu, where you tick the adjusted standardized box. In R, the chisq.test result stores them, and the ‘stdres’ component gives the standardized residuals.