Instructions For Chi-Square Test
Instructions For Chi-Square Test
χ2 = ∑ ((o – e)2/e)
where
o = observed number of individuals (that is, the data you collected),
e = expected number of individuals (that is, the data you expect based on your null hypothesis), and
∑ = the sum of values.
The completed table below illustrates the following example: Fifty stickleback fish were
collected from a lake. Of those, 45 had pelvic spines and 5 did not. If you had assumed that
the fish with and without pelvic spines would be equally abundant, then you would
have expected that on average 25 fish would have spines and 25 fish would not. Can
the observed difference in distribution be explained by chance? The chi-square test
can answer that question.
Here, the null hypothesis is a 50:50 ratio of fish with and without spines. Let’s
calculate the χ2 value. The χ2 value will be small if the distribution is close to expected and
large if the distribution is significantly different from expected.
χ 2 = ∑ ((o – e)2/e)
Perform the same calculations using the data you collected in the virtual lab and enter your χ2
values in the lab window.
Calculate the df for the data you collected in the virtual lab and enter your values in the lab window.
Step 3: Use the Critical Values Table to Determine the Probability (p) Value
The table below shows the probability (or p-value) of obtaining a χ 2 value as large as the listed
value if the null hypothesis is correct. The table shows that for df = 1, there is a 5% probability (p-
value = 0.05) of obtaining a χ2 value of 3.841 or larger. In statistics, a probability of 5% is
considered so rare that it is unlikely that the null hypothesis is correct. A 5% probability is called a
statistically significant result. For example, if the χ 2 value obtained is 4.5, then the null hypothesis
can be rejected. If the χ2 value is 3.1, then the null hypothesis cannot be rejected. In science, you
also see p-values of 0.01 being discussed. Some studies use a more stringent 1% as the criterion for
rejecting the null hypothesis. A 1% probability is called a highly significant result.
For our data, locate the χ 2 value with df = 1 and p = 0.05. This is the critical χ 2 value: 3.841. The χ2
value that you calculated from the collected data was 32, which is much larger than 3.841. Notice
that going from left to right in the table, the χ2 value increases and the p-value decreases. The result
of 32 is much greater than even the 6.635 that you would expect only 1% of the time because of
chance. Therefore, our confidence in rejecting the null hypothesis is very high.
Find the farthest right column in which the χ 2 value from the data collected in the virtual lab exceeds
the listed number in the table and enter the p-value at the top of that column in the lab window. If the
χ2 value is greater than the extreme right-hand column, enter 0.01 in the lab window.
p
0.995 0.975 0.9 0.5 0.1 0.05 0.025 0.01
df
1 0.000 0.000 0.016 0.455 2.706 3.841 5.024 6.635
2 0.010 0.051 0.211 1.386 4.605 5.991 7.378 9.210
3 0.072 0.216 0.584 2.366 6.251 7.815 9.348 11.345
4 0.207 0.484 1.064 3.357 7.779 9.488 11.143 13.277
5 0.412 0.831 1.610 4.351 9.236 11.070 12.832 15.086
6 0.676 1.237 2.204 5.348 10.645 12.592 14.449 16.812
7 0.989 1.690 2.833 6.346 12.017 14.067 16.013 18.475
If the null hypothesis cannot be rejected, there is no statistical difference between the observed
and expected data. On the other hand, if the null hypothesis is rejected, there is a statistically
significant difference between the observed and expected data.
For example, a p-value of 0.01 tells you that if the null hypothesis is true, there is a 1% chance of
observing a difference between the observed and expected data that is as large or larger than the one
you detected.