Why the Direction of the Tail Matters
A Pearson chi-square test compares observed counts with counts expected under a null hypothesis. The comparison is built from squared differences, so its statistic cannot be negative. A value near zero means the observed counts are close to what the null predicts; a sufficiently large value means they are far away. This is why evidence against the null is found in the right tail of the chi-square reference distribution.
The direction is easy to confuse with tests whose statistics can be positive or negative. For a chi-square test, a negative statistic is impossible, and a very small one is not an extreme departure from the null. The test asks whether the observed discrepancy is unusually large, not whether it is unusually small.
The Statistic and Its Reference Distribution
For a two-way table, let \(O_{ij}\) be the observed count in row \(i\), column \(j\), and let \(E_{ij}\) be the expected count in that cell under the null hypothesis. The Pearson chi-square statistic adds the squared, expected-count-scaled discrepancy from every cell:
Here, \(r\) is the number of rows and \(c\) is the number of columns. Each expected count is positive in the ordinary formula. Each numerator is a square, so every term is nonnegative and therefore \(X^2\geq 0\). If the observed counts equal the expected counts in every cell, then every term is zero and \(X^2=0\).
The reference distribution describes the values of the statistic that would be expected if the null hypothesis were true, subject to the assumptions that justify the chi-square approximation. For a two-way table, its degrees of freedom are \(df=(r-1)(c-1)\). The chi-square reference distribution is a family of distributions: its shape changes with \(df\), and every member has support only on values at or above zero.
The right-tail probability measures how often the null model produces discrepancies at least this large. A small p-value means that such a large statistic would be unusual under the null model. It does not mean that the probability the null hypothesis is true is small.
Why Squared Discrepancies Lead to a Right-Tail Test
The right-tail rule follows from what the statistic measures. A cell contributes \((O_{ij}-E_{ij})^2/E_{ij}\): the sign of the difference disappears, but its size remains. Counts above and below their expected values can both add to the statistic. The sum therefore measures overall departure, rather than a direction such as “more” or “less.”
A small \(X^2\) says that the collection of observed counts is close to the null expectations. A large \(X^2\) says that one or more differences, or a combination of differences across cells, is substantial relative to the expected counts. Only the latter is evidence against the null in this test.
This is an approximation under the null, not a claim that every finite-sample Pearson statistic has exactly a chi-square distribution. The conditions for using the approximation matter; they are considered separately in chi-square inference.
Worked Examples: Reading the Right Tail
Worked Example: A Statistic Near Zero
Suppose a hypothetical survey records two categorical variables for 100 people. Under the null hypothesis of independence, each cell in a \(2\times2\) table has expected count 25. The observed counts are:
| Category A | Category B | |
|---|---|---|
| Group 1 | 27 | 23 |
| Group 2 | 23 | 27 |
The expected counts are 25 in all four cells, and the degrees of freedom are \((2-1)(2-1)=1\). Calculate the statistic:
The right-tail probability for \(0.64\) with 1 degree of freedom is approximately \(0.4237\). The statistic is not unusually large under the null model, so this result does not provide strong evidence against independence. The fact that \(0.64\) is above zero does not itself make it evidence against the null: the question is whether it lies far enough into the right tail.
Worked Example: A Large Statistic in a 2-by-3 Table
Imagine a hypothetical table comparing two groups across three response categories. Suppose the null hypothesis predicts an expected count of 20 in every cell, while the observed counts are:
| Response 1 | Response 2 | Response 3 | |
|---|---|---|---|
| Group 1 | 30 | 20 | 10 |
| Group 2 | 10 | 20 | 30 |
The table has 2 rows and 3 columns, so \(df=(2-1)(3-1)=2\). The Pearson statistic is:
For 2 degrees of freedom, the right-tail probability is \(P(\chi^2_2\geq20)=e^{-20/2}\), approximately \(0.0000454\). A statistic this large would be very unusual under the null reference model. It therefore provides strong evidence against the null, provided the chi-square approximation is appropriate. It does not, by itself, identify which cells contribute most to the discrepancy.
Worked Example: The Same Statistic, Different Degrees of Freedom
Consider a hypothetical \(2\times3\) table with expected counts of 20 in every cell and observed counts:
| Response 1 | Response 2 | Response 3 | |
|---|---|---|---|
| Group 1 | 25 | 15 | 20 |
| Group 2 | 15 | 25 | 20 |
The observed counts give row totals of 60 and column totals of 40, so the expected count in each cell is indeed \(60(40)/120=20\). The degrees of freedom are 2. The statistic is:
With 2 degrees of freedom, the right-tail probability is \(e^{-5/2}\approx0.0821\). The same numerical statistic of 5 would have a different right-tail probability under a 1-degree-of-freedom reference distribution, approximately \(0.0253\). Thus, the statistic alone does not determine the p-value: the degrees of freedom, and hence the correct reference distribution, are also needed. For this table, use \(df=2\).
From Tail Probability to a Test Decision
A test may compare the p-value with a preselected significance level \(\alpha\), or compare the observed statistic with a right-tail critical value. For a right-tail test, the critical value \(c\) is chosen so that \(P(\chi^2_{df}\geq c)=\alpha\). A statistic greater than \(c\) falls in the rejection region; a statistic below \(c\) does not. Equivalently, the p-value is at most \(\alpha\) when the statistic is at or beyond the critical value.
As a numerical illustration, with \(df=1\) and \(\alpha=0.05\), the right-tail critical value is approximately 3.841. A statistic of 0.64 is below that value, whereas a statistic of 4 is above it. The decision is based on how far into the right tail the statistic lies, not on whether it differs from zero at all. Failing to reject the null is not proof that the null is true.
Common Mistake: Looking for an Extreme Lower Tail
A frequent error is to say that an unusually small chi-square statistic counts against the null because it is “far from the average.” That reasoning treats the distribution as if it extended in both directions. But a chi-square statistic cannot be negative, and values near zero represent close agreement between observed and expected counts, not a large discrepancy.
The correction is to use the right-tail area: ask how often the null model would produce \(X^2\) as large as, or larger than, the observed statistic. A large statistic can count against the null; a small statistic does not. Also, a statistic’s tail area is not a probability that the null hypothesis is true.
Check Your Understanding
Answer these questions using the definition and examples above.
- Why can a Pearson chi-square statistic never be negative?
- What does a statistic close to zero indicate about observed counts relative to their null expected counts?
- A table has 3 rows and 4 columns. What are its degrees of freedom, and which tail is used to calculate its p-value?
- In a right-tail test, what does the p-value represent under the null hypothesis?
- Why can two tables with the same observed \(X^2\) have different p-values?