Chi Squared - Dr Harris Biology

Chi Squared
Statistical test used to see if the results of
an experiment support a theory or to
check that categorical data is
independent of each other.
Chi Squared – in genetics.
The Null Hypothesis is always :
There is no significant difference between
the observed an expected results.
There will always be a slight difference from
what you expect but the test allows us to
determine whether this difference is due to
chance or whether the theory is wrong.
Phenotype Ratio
observed
Expected
|O -E|
(O — E)2 (O — E)2/ E
Normal
wing
3
120
111
-9
81
0.675
Vestigal
Wing
1
40
49
9
81
2.025
2.7
The Critical Value
You compare the Chi Square value to the critical value which is found in
the following table.
Df
Degrees of
freedom :
the number of
classes
(phenotypes )
minus 1
Probability
0.5
0.10
0.05
0.02
0.01
0.001
1
0.455
2.706
3.841
5.412
6.635
10.827
2
1.386
4.605
5.991
7.824
9.210
13.815
3
2.366
6.251
7.815
9.837
11.345
16.268
4
3.357
7.779
9.488
11.668
13.277
18.465
5
4.351
9.236
11.070
13.388
15.086
20.517
Accept Null Hypothesis if the Chi Square value is lower than the critical
Value
Reject Null Hypothesis if the chi square value is greater than the Critical
Value.
The results
In this example he Chi Square value is less than the Critical Value,
this means we can accept the null hypothesis that there is no
significant differences between the observed and expected and
any difference was due to chance. This means that the theory
that wing length in fruit flies is controlled by monohybrid
inheritance.
If the Chi square was greater than the critical value then there
would have been a significant difference between the Observed
and expected meaning something other than monohybrid
inheritance was occurig......possibly sex linkage/ epistasis or
codominance.
Chi Squared test for
independance
For a contingency table that has r rows
and c columns, the chi square test can be
thought of as a test of independence. In a test of
independence the null hypothesis is
Null hypothesis:
The two categorical variables are independent.
Incidence of Malaria in three tropical regions
Null Hypothesis:
There is no relationship between the type of malaria and its
geographical location
Malaria A
Malaria B
Malaria C
Totals
Asia
Africa
South
America
Totals
31
14
45
90
2
5
53
60
53
45
2
100
86
64
100
250
Calculating expected values
Sample A
Sample B
Sample C
Column
Totals
Category I
Category II
Category III
a
b
c
a+b+c
d
e
f
d+e+f
g
h
i
g+h+i
c+f+i
a+b+c+d
+e+f+g+h
+i=N
a+d+g
b+e+h
Row Totals
Now we need to calculate the expected values for each cell in the
table and we can do that using the the row total times the column total
divided by the grand total (N).
For example, for cell a the expected value would be (a+b+c)(a+d+g)/N.
Chi Squared
Observed
A
31
B
14
C
45
D
2
E
5
F
53
G
53
H
45
i
2
Expected |O -E|
30.96
0.04
(O — E)2
(O — E)2/ E
0.0016
0.0000516
Chi squared=
Chi Squared
Observed
Expected |O -E|
(O — E)2
(O — E)2/ E
A
31
30.96
0.04
0.0016
0.0000516
B
14
23.04
9.04
81.72
3.546
C
45
36.00
9.00
81.00
2.25
D
2
20.64
18.64
347.45
16.83
E
5
15.36
10.36
107.33
6.99
F
53
24.00
29.00
841.00
35.04
G
53
34.40
18.60
345.96
10.06
H
45
25.60
19.40
376.36
14.70
i
2
40.00
38.00
1444.00
36.10
Chi squared =
125.516
Interpreting the result:
Chi Square = 125.516
Degrees of Freedom = (c - 1)(r - 1) = 2(2) = 4
Df
Probability
0.5
0.10
0.05
0.02
0.01
0.001
1
0.455
2.706
3.841
5.412
6.635
10.827
2
1.386
4.605
5.991
7.824
9.210
13.815
3
2.366
6.251
7.815
9.837
11.345
16.268
4
3.357
7.779
9.488
11.668
13.277
18.465
5
4.351
9.236
11.070
13.388
15.086
20.517
Reject Null H because 125.516 is greater than 9.488 (for alpha = 0.05)
The Null hypothesis states that there is no relationship between location
and type of malaria.
Our data tell us there is a relationship between type of malaria and
location, but that's all it says.
Interpreting the result:
Chi Square = 125.516
Degrees of Freedom = (c - 1)(r - 1) = 2(2) = 4
Df
Probability
0.5
0.10
0.05
0.02
0.01
0.001
1
0.455
2.706
3.841
5.412
6.635
10.827
2
1.386
4.605
5.991
7.824
9.210
13.815
3
2.366
6.251
7.815
9.837
11.345
16.268
4
3.357
7.779
9.488
11.668
13.277
18.465
5
4.351
9.236
11.070
13.388
15.086
20.517