Chi Square Test for
Significance
X 2 This is the symbol
for Chi Square
The formula we will be using to calculate Chi Square:
Ob
ser
ve
d
X 2
Ʃ (O – E) 2
o f
E Expe
s u m ct ed
The
Before we can calculate Chi Square,
let’s get comfortable with calculating
observed and expected.
There are 37 tall giraffes and 43 short giraffes.
Here we are given the observed, and
Observed Expected
we need to calculate the expected.
Tall 37 40
In order to do that, we need to figure
Short 43 40 out what the parents’ genotypes are.
The data is approximately a 1:1
phenotypic ratio. So, we now need to add the total
number of individuals, 37 + 43 = 80
The parental cross that would
create that ratio is a Aa x aa 80 x 0.5 = 40
A a
a Aa aa 50% Tall
a Aa aa 50% short
Even though we aren’t testing a hypothesis right now,
let’s see how we can use this data to use the formula.
2
X Ʃ (37 – 40)2
40
(43 – 40)2
40
(-3)2 (3)2
40 40
X 2
0.46
0.23 0.23
But what is the purpose of a
Significance (Chi-square) test and
what do we do with it?
Example:
The gene for tall height in giraffes is inherited as an autosomal
dominant trait.
What if our data looked
like this?
Null hypothesis:
Any variation in observed vs Could we really say that the
expected is due to chance variation
We need abetween
statisticalthe observed
method &
to be
and there is no significant expected
able is minimal
to reject the nulland due to
hypothesis
difference between our andchance
that isand
what that
thethe tall/short
goodness of fit
observed and our expected. traits really are
test is only
used influenced
for. by
autosomal alleles?
To figure out which column to use, you
need to calculate the degrees of
freedom first. Here, our df = 2-1
You take the number of events/ df = 1 Critic
a l Valu
phenotypes that you added together and e
subtract 1.
Next, determine the
significance value, or p value. Where the p value and the degrees of
(0.05 is generally used) freedom intersect, that is the Critical Value.
Null hypothesis: But what do we do with the
Height in giraffes is
inherited as an Cr i ti c a l Value Chi Square values and the
autosomal trait and critical value?
any variation in
observed vs expected
We compare them!
is due to chance andIf X2 is less than 3.84 we FAIL TO If X2 is greater than 3.84 we
there is no significant REJECT the Null Hypothesis 3.84 REJECT the Null Hypothesis
difference between
our observed and
our expected.
A student who is in charge of taking care of her chickens at home, takes what she learns in her
genetics unit and begins to breed her chickens while keeping track of their phenotypes. She
crosses pure-breeding black Andalusian chickens with pure-breeding white Andalusion
chickens. She notices that all of the F1 have a grey-ish phenotype. She allows the F1 generation
to mate and produce an F2 generation. She suspects that feather color is inherited as
incomplete dominance. She decides to perform a chi-square goodness of fit test to see.
B B Obs. Exp.
P x b Bb Bb Black 16 25%
20
b Bb Bb Grey 43 40
50%
White 21 20
25%
F1 x B b
B BB Bb Total: 80
b Bb bb
F2
X 2
Ʃ (16 – 20)2
20
(43 – 40)2
40
(21 – 20)2
20
Degrees of Freedom: 0.8 0.225 0.05
X 2
3-1 = 2 1.08
If the Chi square Critical If the Chi square
value is LESS value is
than the critical
Value GREATER than
value, you FAIL
TO REJECT the
Null Hypothesis.
< 5.99 < the critical value,
you REJECT the
Null Hypothesis. Critic
a l Valu
e
Conclusion: the null hypothesis cannot be rejected – the
feather color in Andalusian chickens is inherited as an
incompletely dominant.
B= Dark Brown fur E= Floppy Ears
b= spotted fur e= Pointed Ears
Scientists studying two different traits in dogs suspect they may be inherited on different
autosomal chromosomes. Heterozygous floppy eared, Dark brown fur dog is testcrossed to a
homozygous recessive dog. Complete a Chi Square Goodness of Fit test.
Null Hypothesis: Fur color and Ear shape are inherited on different autosomal chromosomes.
BbEe x bbee
Phenotype Obs. Exp. Be bE
BE be
Brown fur, floppy ears 24 be BbEe Bbee bbEe bbee
Brown fur, pointed ears 5
Spotted, floppy ears 4 be BbEe Bbee bbEe bbee
Spotted, pointed ears 23 be BbEe Bbee bbEe bbee
be BbEe Bbee bbEe bbee
Let’s calculate the expected based on Mendel’s law of independent assortment.
14
14
14 Brown Brown Spotted Spotted
Fur Fur Fur Fur
14 Floppy Pointed Floppy Pointed
Total: 56 Ears Ears Ears Ears
25% 25% 25% 25%
Degrees of Freedom:
4-1 = 3
If the Chi square Critical If the Chi square
value is LESS value is
than the critical Value GREATER than Critic
a l Valu
value, you FAIL
TO REJECT the
Null Hypothesis.
< 7.82 < the critical value,
you REJECT the
Null Hypothesis.
e
X 2
Ʃ (24 – 14)2
14
(5 – 14)2
14
(4 – 14)2
14
(23 – 14)2
14
7.14 5.79 7.14 5.79
X 2
25.86