Using and Understanding the Chi-squared Test
hypothesis testable prediction (what you expect to observe)
hypothesis testable prediction (what you expect to observe) make observations
hypothesis testable prediction (what you expect to observe) make observations Do your observations match what you expected to observe?
hypothesis testable prediction (what you expect to observe) make observations Do your observations match what you expected to observe? NoYes reject hypothesis do not reject hypothesis
about genotypes of parent corn plants testable prediction about expected phenotypic ratios in offspring (corn kernels) this week:
hypothesis about genotypes of parent corn plants testable prediction about expected phenotypic ratios in offspring (corn kernels) this week: 3 purple : 1 yellow
hypothesis about genotypes of parent corn plants testable prediction about expected phenotypic ratios in offspring (corn kernels) this week: 3 purple : 1 yellow ¾ purple ¼ yellow
hypothesis about genotypes of parent corn plants testable prediction about expected phenotypic ratios in offspring (corn kernels) this week: 3 purple : 1 yellow ¾ purple ¼ yellow of 868 kernels, expect
hypothesis about genotypes of parent corn plants testable prediction about expected phenotypic ratios in offspring (corn kernels) this week: 3 purple : 1 yellow ¾ purple ¼ yellow of 868 kernels, expect 868 x ¾ = 651 purple
hypothesis about genotypes of parent corn plants testable prediction about expected phenotypic ratios in offspring (corn kernels) this week: 3 purple : 1 yellow ¾ purple ¼ yellow of 868 kernels, expect 868 x ¾ = 651 purple 868 x ¼ = 217 yellow
3 purple : 1 yellow ¾ purple ¼ yellow of 868 kernels, expect 868 x ¾ = 651 purple 868 x ¼ = 217 yellow expected:
3 purple : 1 yellow ¾ purple ¼ yellow of 868 kernels, expect 868 x ¾ = 651 purple 868 x ¼ = 217 yellow expected: actually observed: of 868 kernels counted, 656 purple, and 212 yellow
3 purple : 1 yellow ¾ purple ¼ yellow of 868 kernels, expect 868 x ¾ = 651 purple 868 x ¼ = 217 yellow expected: actually observed: of 868 kernels counted, 656 purple, and 212 yellow phenotypeobserved number expected number purple yellow total868
phenotypeobserved number expected number purple yellow total868 Observed and expected don’t match. What to do?
phenotypeobserved number expected number purple yellow total868 Observed and expected don’t match. What to do? The observed doesn’t match the expected closely enough! Reject the hypothesis! The observed and the expected are close enough! Don’t reject the hypothesis!
phenotypeobserved number expected number purple yellow total868 Observed and expected don’t match. What to do? The observed doesn’t match the expected closely enough! Reject the hypothesis! The observed and the expected are close enough! Don’t reject the hypothesis! How close is “close enough”?
The chi-squared test to the rescue!
So, your observed and expected numbers are different. …but maybe that difference is just due to chance, and there’s no need to reject your hypothesis. Maybe that difference is because your hypothesis should be rejected…
The chi-squared test to the rescue! So, your observed and expected numbers are different. …but maybe that difference is just due to chance, and there’s no need to reject your hypothesis. Maybe that difference is because your hypothesis should be rejected… What is the probability that the difference between observed and expected is due to chance?
The chi-squared test to the rescue! So, your observed and expected numbers are different. …but maybe that difference is just due to chance, and there’s no need to reject your hypothesis. Maybe that difference is because your hypothesis should be rejected… What is the probability that the difference between observed and expected is due to chance? high probability = close enough! The difference is not significant, so don’t reject your hypothesis. low probability = not close enough! The difference is significant, so reject your hypothesis.
How to perform a chi-squared test
(Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple Yellow TOTAL χ 2 =
How to perform a chi-squared test (Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple 656 Yellow 212 TOTAL 868 χ 2 =
How to perform a chi-squared test (Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple x ¾ = 651 Yellow x ¼ = 217 TOTAL 868 χ 2 =
How to perform a chi-squared test (Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple x ¾ = = 5 Yellow x ¼ = –217 = - 5 TOTAL 868 χ 2 =
How to perform a chi-squared test (Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple x ¾ = = = 25 Yellow x ¼ = –217 = - 5 (-5) 2 = 25 TOTAL 868 χ 2 =
How to perform a chi-squared test (Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple x ¾ = = = 25 25/651 = Yellow x ¼ = –217 = - 5 (-5) 2 = 25 25/217 = TOTAL 868 χ 2 =
How to perform a chi-squared test (Recall that your hypothesis generates a predicted phenotypic ratio of 3 purple : 1 yellow) Phenotype (class) Observed number (o) Expected number (e) (o - e)(o - e) 2 e Purple x ¾ = = = 25 25/651 = Yellow x ¼ = –217 = - 5 (-5) 2 = 25 25/217 = TOTAL 868 χ 2 = = 0.153
so, χ2 = …but what does this tell us about our hypothesis?
so, χ2 = …but what does this tell us about our hypothesis? Remember, what we want to find out is: What is the probability that the difference between observed and expected is due to chance?
so, χ2 = …but what does this tell us about our hypothesis? Remember, what we want to find out is: What is the probability that the difference between observed and expected is due to chance? So, we need to use our chi-squared value to look up a p (probability) value....how do we look it up?
…in a chi-squared table! Degrees of Freedom Probability (P) Non significantSignificant
…in a chi-squared table! Degrees of Freedom Probability (P) Non significantSignificant number of degrees of freedom = number of different phenotypes minus 1
…in a chi-squared table! Degrees of Freedom Probability (P) Non significantSignificant number of degrees of freedom = number of different phenotypes minus = 1 degree of freedom
Degrees of Freedom Probability (P) non-significantsignificant
Degrees of Freedom Probability (P) non-significantsignificant
Degrees of Freedom Probability (P) non-significantsignificant
Degrees of Freedom Probability (P) non-significantsignificant 0.5 < p < 0.8 If X 2 = 0.153, then
Degrees of Freedom Probability (P) non-significantsignificant
Degrees of Freedom Probability (P) non-significantsignificant If X 2 = 0.153, then 0.5 < p < 0.8 high probability that difference between observed and expected is due to chance: do not reject hypothesis.
Degrees of Freedom Probability (P) non-significantsignificant If X 2 = 7.5, then 0.01 < p < low probability that difference between observed and expected is due to chance: reject hypothesis.