Download Biology 164 Laboratory The Chi-square (χ 2) Goodness of Fit Test

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
Biology 164 Laboratory
The Chi-square (χ 2 ) Goodness of Fit Test
In an experiment where you can calculate the frequency of expected outcomes based on probability (for example, the
outcome of a dihybrid cross or expectations based on the Hardy-Weinberg law), you can use the Chi-Square (χ 2) Goodnessof-Fit Test to compare observed frequencies with those expected according to your hypothesis. Any real set of observed
frequencies generally will differ from those predicted by theoretical considerations of probabilities. Therefore, you want to
know if the deviations are small enough to have resulted from random sampling errors (chance) or if they indicate that you
may have chosen the wrong hypothesis. Scientists use the Chi-square (χ 2) Goodness of Fit Test to decide, given the size of
the sample used, how much the results of an experiment can differ from those expected according to a particular hypothesis
and still be attributed to chance variation rather than to a wrong hypothesis or error in the experiment.
The frequency of various phenotypes expected from genetic crosses are predictions derived from a particular hypothesis. For
example, suppose that your hypothesis is that a certain cross is a standard monohybrid cross with one pair of alleles that
controls two alternative forms of a phenotypic trait and one of the alleles is dominant. You would expect 3/4 of the progeny
to show the dominant trait and 1/4 to show the recessive trait (a 3 : 1 ratio). Since expected frequencies result from
presumably random events (independent assortment of chromosomes, fertilization, etc.), those exact frequencies would
appear only in infinitely large populations. In counting a reasonably sized sample of a population, though, chance variations
may give observed frequencies different from those expected.
The following experiment illustrates how to use the Chi-square Goodness of Fit Test to decide whether a hypothesis is
statistically acceptable.
A penny is tossed and allowed to fall freely to the floor 1000 times. A reasonable hypothesis would be that heads or
tails have an equal chance of appearing. Therefore, we would expect 500 heads and 500 tails (a 1:1 ratio). When
performing the experiment, though, we observe 552 heads and 448 tails (a ratio of 1.23:1).
Is the hypothesis of 1/2 heads and 1/2 tails (a 1 : 1 ratio) statistically acceptable for this particular penny or should the
hypothesis be rejected in favor of some other explanation? There should be no difference between the number of head and
the number of tails.
An equation for calculating a Chi-square value is:
χ 2 = ∑ (o - e)2 / e = ∑ d2 / e
“o” is the number observed within each category predicted by the hypothesis. “e” is the number expected within each
category. (o - e) = d = the deviation within each category of the results, i.e., the difference between the observed number and
the expected number for each category. The deviations are squared to avoid negative values. “∑” (sigma) is the sum of the
final figures calculated for all categories. When only two categories appear in the results, one is considered variable and the
other non-variable. Statistically, such an experiment has only "one degree of freedom". When the number of categories (N)
is greater than two, the degrees of freedom (D.F.) is one less than the number of categories (D.F. = N - 1).
After calculating χ 2 for a given D.F., read or interpolate the probability value (p) at the top of each column in a table of
χ 2 values (see below). The p-value gives the frequency for obtaining chance deviations from the expected figures as large as
those just observed if the same experiment was repeated many times. In other words, it gives you the probability that your
deviations from the expected values are caused by chance alone. Thus, the lower the p-value (or the higher the Chi-squared
value), the more likely that something other than chance caused the observed deviation from the predicted ratio.
D.F.
1
2
3
4
p = .95
0.004
0.103
0.352
0.711
.80
0.064
0.446
1.005
1.649
Table of χ 2 Values (in columns)
.50
.20
.10
.05
0.455
1.64
2.71
3.84
1.386
3.22
4.61
5.99
2.366
4.64
6.25
7.82
3.357
5.99
7.78
9.49
Accept
Reject
.01
6.64
9.21
11.34
13.28
.001 = p
10.83
13.82
16.27
18.47
When using the Chi-square test, scientists generally agree that, when the p-value is greater than .05 (or 1 in 20), they can
accept the hypothesis from which they derived the expected numbers. That is, the deviation represented by χ 2 resulted from
Chi-square Goodness of Fit Test
Page 1
chance alone. When the p-value is .05 or less, they reject the hypothesis since a statistically significant deviation has
occurred that is unlikely to be explained by chance alone.
The following table gives χ 2 calculations for the penny-tossing experiment on Page 1.
Category
Observed
Expected
Heads
Tails
Total
552
448
1000
1/2 x 1000 = 500
1/2 x 1000 = 500
1000
Deviation
(d)
+51
-51
0
d2
d2 / e
2652
2652
2652/500 = 5.3
2652/500 = 5.3
χ 2 = 10.6
Since the experiment included only two categories of results, D.F. = 1. Looking along the row for 1 degree of freedom in the
table of χ 2 values, p is about .001. With the p-value nearly 0.001, the observed deviations are too large to have been caused
by chance and the hypothesis of a 1:1 ratio must be rejected.
As a second example, suppose that you have made the following cross: AaBb x Aabb. A rational hypothesis might be that
the cross involves two independently assorting pairs of alleles, each of which controls two alternative forms of phenotypic
traits and one of each pair is dominant. Among the offspring you would expect four phenotypes:
3/8 A-B-, 3/8 A-bb, 1/8 aaB- and 1/8 aabb, or a 3:3:1:1 ratio (confirm this expectation for yourself).
Suppose that 64 offspring observed in an experimental cross show these phenotypes: 21 A-B-, 25 A-bb,10 aaB- and 8 aabb.
Are these observed results close enough to the expected 3:3:1:1 Mendelian ratio to allow acceptance of your hypothesis?
Computation of χ 2
Category
Observed
Expected
A-BA-bb
aaBaabb
Total
21
25
10
8
64
3/8 x 64 = 24
3/8 x 64 = 24
1/8 x 64 = 8
1/8 x 64 = 8
64
Deviation
(d)
- 3
+1
+2
0
0
d2
d2 / e
9
1
4
0
9/24 = 0.375
1/24 = 0.041
4/8 = 0.500
0/8 = 0.000
χ 2 = 0.916
In this example, D.F. = 3. The computed χ 2 value of 0.916 is less than the critical value of 7.82, so you would conclude that
the observations are consistent with your hypothesis. In other words, the deviations from the expected values are small
enough that you can feel confident that they occurred just by chance. They are not significant. Looking at the χ 2 table
above, you can see that the probability of obtaining a χ 2 value as large as you did is between 0.80 and 0.95
(0.80 < p < 0.95).
A summary of the procedure for applying the Chi-square test is:
1. State an hypothesis that gives a precise quantitative expectation.
2. Calculate χ 2 from the observed numbers.
3. Using the χ 2 value, estimate the p-value. If χ 2 is large (large deviations), p will be small.
If χ 2 is small, p will be large.
4. Reject or accept your hypothesis.
Chi-square Goodness of Fit Test
Page 2