Chi-square test: Germination data Dan Flynn

Chi-square test: Germination data
Dan Flynn
This lab examines whether the germination rates of lettuce seeds differed across the herb
treatments. The Chi-square test is one of the standard methods for answering such questions. It
compares the number of seeds that germinated under each treatment versus the expected number
that would have germinated if all the treatments had the same effect. This test will let you answer
the question: did germination rates differ across the treatments?
In your Excel workbook, open up your shoot and root length data. You have already formatted
the data correctly for SPSS when you prepared it for the ANOVA work. Add a column called
"Germinated", and enter 1 for "germinated" and 0 for "didn't germinate."
There's a shortcut to complete this procedure, using a formula that returns 0 if both Shoot and
Root are zero, and 1 otherwise. The syntax in Excel is a little hard to read, but looks like this:
=IF (D2 = 0, IF(E2 = 0, 0, 1), 1). This formula performs two "IF" tests: If Shoot is zero, then do
the second test; if Root is also zero, return a 0; otherwise, return a 1. Select the rest of the cells in
that column and use Edit > Fill > Down or drag the bottom right corner of the cell to apply this
formula to all the rows with data.
Now you can open this worksheet in SPSS. To see whether the germination frequency differs
across the treatment groups, use a Chi-square test (χ2 test). This test is useful for asking whether
the observed frequencies differ from what you would expect by chance. The formula is
(O − E) 2
E
where O is the observed frequency in a given cell and E is the expected frequency. The resulting
statistic is the chi-squared, and gives us a p-value for whether the differences are significantly
different from chance alone.
χ2 = ∑
1
χ2 in SPSS
Barnard College – Biological Sciences
Running a Chi-square test in SPSS
To run a Chi-squared test in SPSS, go to Analyze > Descriptive Statistics > Crosstabs.
The crosstabs dialog window has many options for analyzing categorical data, including Chisquare tests. Put the "Germinated" variable in rows and the treatment name variable (i.e., the
name of the herb) in the column box.
2
χ2 in SPSS
Barnard College – Biological Sciences
Then click "Statistics", and select Chi-square. Back in the main dialog box, select "Observed" for
counts. You can optionally select "Expected" to see how the Chi-square test works, but the
output is a little cluttered.
3
χ2 in SPSS
Barnard College – Biological Sciences
Reading the Output
The output shows a table with the number germinated versus the treatment. The test itself shows
the p-value of the Chi-square test; focus only on the first row. The p-value shows there is no
difference. The best way to report this is as such: "There is no significant difference in lettuce
seed germination across the treatment groups (χ2 = 2.29, p = 0.683).
Interpreting the Output
While in this case there was no significant effect of treatment group on lettuce seed germination,
if there had been (i.e., a p value < 0.05) the next question to ask would be "which herb or herbs
mattered the most?" To answer that question we can look at the actual values of the differences
between the observed and expected values. These are then standardized by the expected value to
make them comparable. The standardized residuals are thus calculated as:
SR =
O− E
E
By convention, standardized residuals equal to ±2 or greater are considered important effects.
We can calculate these values by hand easily, but we can also let SPSS do the hard work for us
as follows:
4
χ2 in SPSS
Barnard College – Biological Sciences
After running a Chi-square test and finding a significant main effect, run the test again. But this
time in the test dialog box, check the "Standardized" box in the Residuals pane of the "Cells…"
option.
The results now show a row for the standardized residuals. In this example, there was no
significant effect, so the values are all fairly closer to zero, meaning no cell in the table differs in
an important way from the expectation. But if there had been a significant main effect, the table
would list some standardized residuals that were greater than +2.
5
χ2 in SPSS
Barnard College – Biological Sciences
Graphing Your Results
You can graph the results several ways. One way would be to make a bar chart of percent
germination, or you can make stacked bar charts of the number of germinated versus nongerminated for each treatment group. For the latter, go to Chart Builder, and select the stacked
bar chart icon. Drag "Name" into the x-axis, and "Germinated" in to the "Stack set color" box.
Leave the y-axis as "Count".
6
χ2 in SPSS
Barnard College – Biological Sciences
You can then modify the resulting chart so the labels in the legend are more informative than "0"
and "1. You can also change the y-axis label to "Number of seeds".
7