1
00:00:07,550 --> 00:00:18,010
After flipping a coin 100 times, you tally
up 42 heads and 58 tails. You expected a 50/50
2
00:00:18,010 --> 00:00:22,430
distribution. Does this mean the coin is unfair?
3
00:00:22,430 --> 00:00:29,810
This video is part of the Probability and
Statistics video series. Many events and phenomena
4
00:00:29,810 --> 00:00:38,110
are probabilistic. Engineers, designers, and
architects often use probability distributions
5
00:00:38,110 --> 00:00:41,780
to predict system behavior.
6
00:00:41,780 --> 00:00:49,120
Hi, my name is Lourdes Aleman, and I am a
research scientist in the HHMI Education Group
7
00:00:49,120 --> 00:00:56,740
in the biology department at MIT. I also work
in the MIT Office of Educational Innovation
8
00:00:56,750 --> 00:01:04,879
and Technology. I helped develop the Star
Genetics software featured in this video.
9
00:01:04,879 --> 00:01:11,500
Before watching this video, you should know
what a probability distribution is and be
10
00:01:11,500 --> 00:01:22,000
familiar with basic genetics vocabulary including
genotype, phenotype, homozygous, and heterozygous.
11
00:01:22,000 --> 00:01:28,770
You should also know how to use Punnett squares
to predict the expected results of Mendelian
12
00:01:28,770 --> 00:01:31,340
crosses.
13
00:01:31,340 --> 00:01:37,600
After watching this video, you will be able
to apply Chi square hypothesis testing to
14
00:01:37,600 --> 00:01:44,600
experimental data obtained from genetic experiments.
15
00:01:47,240 --> 00:01:54,110
Going back to question of whether or not our
coin is fair, it turns out there is a statistical
16
00:01:54,110 --> 00:02:02,590
tool that can help us. Statistical tests can
be used to determine if sample data can be
17
00:02:02,590 --> 00:02:07,950
assumed to come from a population that has
a certain distribution.
18
00:02:07,950 --> 00:02:17,350
Today, we will use a statistical test called
the Chi Square Test for Goodness of Fit.
19
00:02:19,030 --> 00:02:28,370
The Chi Square test is used to analyze categorical
data. In other words, the test compares a
20
00:02:28,370 --> 00:02:35,370
sample of data collected about an event to
expected values.
21
00:02:35,380 --> 00:02:47,000
In our coin-flipping example, our categories
are heads and tails. An event is one coin flip.
22
00:02:47,000 --> 00:02:50,960
Our sample is 100 events.
23
00:02:51,940 --> 00:02:56,819
We expect
that the coin should have a 50/50 chance of
24
00:02:56,819 --> 00:03:05,479
being heads or tails in any given event. The
question we are trying to answer is – does
25
00:03:05,480 --> 00:03:12,480
our sample come from the 50/50 population
distribution we expect?
26
00:03:13,950 --> 00:03:22,160
What we have just done is state our null hypothesis
about the coin flipping experiment. The Chi
27
00:03:22,160 --> 00:03:27,100
square statistic tests this null hypothesis.
28
00:03:27,100 --> 00:03:34,840
We also need to state an alternative hypothesis.
The alternative hypothesis is simply that
29
00:03:34,840 --> 00:03:41,840
the data do not come from the specified 50/50
population distribution.
30
00:03:43,200 --> 00:03:50,620
Before we can test our hypothesis, we need
to calculate a Chi square statistic.
31
00:03:51,600 --> 00:04:00,380
This statistic measures the discrepancy between
observed counts and expected counts.
32
00:04:01,200 --> 00:04:09,780
Each term in our summation finds the deviation,
or error, between observed and expected values
33
00:04:09,790 --> 00:04:20,269
for each category. This deviation is squared
to obtain positive values. Otherwise, everything
34
00:04:20,269 --> 00:04:28,269
would sum to zero because both our observed
and expected outcomes sum to the same value.
35
00:04:29,820 --> 00:04:36,720
Each term in the summation is divided by the
expected value of the outcome as a way of
36
00:04:36,729 --> 00:04:40,729
normalizing each difference.
37
00:04:40,729 --> 00:04:49,229
The Chi square statistic lives in a distribution.
This is the Chi square distribution for any
38
00:04:49,229 --> 00:04:58,840
sample that has two categories of data, or,
in other words, one degree of freedom.
39
00:04:58,840 --> 00:05:07,220
If the outcome of an event can only fall into
one of two categories, we only need to know
40
00:05:07,229 --> 00:05:14,499
how many events fell into one category in
order to determine how many fell into the
41
00:05:14,499 --> 00:05:17,139
other category.
42
00:05:18,460 --> 00:05:25,480
The Chi square distribution is actually a
set of distributions, each for a different
43
00:05:25,490 --> 00:05:29,909
number of degrees of freedom.
44
00:05:29,909 --> 00:05:39,249
If we look at these distributions, the x-axis
is chi-squared values and the y-axis is relative
45
00:05:39,249 --> 00:05:49,169
frequency. You might also notice that these
distributions are positively skewed. This
46
00:05:49,169 --> 00:05:52,430
makes sense for a couple of reasons:
47
00:05:52,430 --> 00:06:00,589
The Chi squared statistic is always positive.
Larger and larger Chi squared values indicate
48
00:06:00,589 --> 00:06:08,319
larger discrepancies between observed and
expected values. While possible, these large
49
00:06:08,319 --> 00:06:17,939
discrepancies are less probable if the null
hypothesis is true. If we calculate the Chi
50
00:06:17,949 --> 00:06:26,400
square test statistic for the coin flipping
experiment, we get 2.56.
51
00:06:26,400 --> 00:06:34,240
How do we interpret this number? First, we
need to look at the appropriate Chi-squared distribution.
52
00:06:36,460 --> 00:06:43,460
In the coin flipping experiment, there are
two possible outcomes: heads or tails.
53
00:06:44,860 --> 00:06:51,940
If we know how many heads were flipped, we can
calculate the number of tails flipped.
54
00:06:52,060 --> 00:06:55,479
So, we only have one degree of freedom.
55
00:06:57,160 --> 00:07:02,480
Let’s refer to the Chi square distributions
for one degree of freedom.
56
00:07:03,979 --> 00:07:12,379
We can compare our test statistic to the distribution
to see if we have support for our null hypothesis
57
00:07:12,379 --> 00:07:16,789
or if we need to reject it.
58
00:07:16,789 --> 00:07:23,789
What will our criterion for support or rejection
of our null hypothesis be?
59
00:07:24,260 --> 00:07:33,219
While this is a fairly arbitrary choice, in many fields, a
result is said to not differ significantly
60
00:07:33,219 --> 00:07:40,050
from expectations if it has a 1 in 20 chance
of happening.
61
00:07:40,050 --> 00:07:46,309
In other words, if the difference between
the observed result and the expected result
62
00:07:46,309 --> 00:07:56,129
is small enough, we would expect to see it
1 in 20 times, which is a probability of 0.05.
63
00:07:57,920 --> 00:08:03,200
This probability is called the level of significance.
64
00:08:03,210 --> 00:08:08,919
If a Chi square value has a probability of
occurring that is greater than our level of
65
00:08:08,919 --> 00:08:18,479
significance, it lends support to our null
hypothesis. If a Chi square value has a probability
66
00:08:18,490 --> 00:08:25,490
of occurring that is less than our level of
significance, we should reject the null hypothesis.
67
00:08:27,140 --> 00:08:35,120
Using the Chi square distribution for 1 degree
of freedom, a chi square value of 2.56 has
68
00:08:35,130 --> 00:08:42,130
a greater than the 5% probability of occurring
that we had set as our minimum.
69
00:08:42,969 --> 00:08:49,190
This means that we fail to reject our null
hypothesis. In other words, what we observe
70
00:08:49,190 --> 00:08:56,000
is close enough to what we expect that we
have confidence that our coin is fair.
71
00:09:00,620 --> 00:09:06,660
Now, suppose you are planning an experiment
where you will cross mutant flies that are
72
00:09:06,660 --> 00:09:14,680
heterozygous for a wingless phenotype to each
other. The wingless phenotype is dominant
73
00:09:14,690 --> 00:09:24,730
relative to the wild-type winged phenotype.
Let’s use the notation Gg for the genotype
74
00:09:24,730 --> 00:09:27,839
of the parent mutant flies.
75
00:09:27,839 --> 00:09:34,839
In this case, the wild type, winged flies,
are homozygous recessive.
76
00:09:34,980 --> 00:09:41,980
What percentage of flies resulting from a
cross of two heterozygous wingless mutants
77
00:09:42,220 --> 00:09:50,779
would you expect to be wild type versus mutant?
Pause the video here and use a Punnett square
78
00:09:50,779 --> 00:09:53,599
to justify your answer.
79
00:09:59,980 --> 00:10:08,620
Performing this cross using a Punnett square,
you would expect a 3:1 ratio of mutant to
80
00:10:08,620 --> 00:10:10,850
wild-type flies.
81
00:10:10,850 --> 00:10:20,560
You perform the cross with the parental mutant
flies. The cross produces 50 progeny. 32 are
82
00:10:20,560 --> 00:10:24,170
mutant and 18 are wild type.
83
00:10:24,170 --> 00:10:34,890
So, only 64% of our flies are mutant, even
though you expected 75% of them to be mutant.
84
00:10:35,720 --> 00:10:42,449
Although it is not what you expected, it doesn’t
seem that far off either.
85
00:10:42,449 --> 00:10:49,170
You decide to continue mating your parental
mutant flies until you have 1000 progeny.
86
00:10:49,170 --> 00:10:55,399
Surely, with this large a sample size, the
ratio of mutant to wild type flies will be
87
00:10:55,399 --> 00:10:57,879
closer to what you expect.
88
00:10:58,580 --> 00:11:08,260
Voila. Oh, wait a minute. Even with a 1000
progeny, our experiments still produce 68%
89
00:11:08,269 --> 00:11:12,600
mutant and 32% wildtype flies.
90
00:11:12,600 --> 00:11:18,310
Now you are really starting to wonder if you
can call this result “close enough” to
91
00:11:18,310 --> 00:11:29,850
the expected outcome. We can use the Chi-square
test to evaluate the hypothesis that the observed
92
00:11:29,850 --> 00:11:36,850
ratio of 68:32 is the same as the expected
ratio of 3:1.
93
00:11:37,269 --> 00:11:43,410
Pause the video here, calculate the Chi square
test statistic, and determine the degrees
94
00:11:43,410 --> 00:11:46,410
of freedom in your data.
95
00:11:51,769 --> 00:11:58,769
You should have obtained 29.2 for your Chi
square value.
96
00:11:59,860 --> 00:12:06,160
Because there are only two phenotypic outcomes
for your cross, there is only one degree of
97
00:12:06,170 --> 00:12:13,170
freedom. Any fly that isn’t a mutant is
wild type and vice versa.
98
00:12:13,899 --> 00:12:22,319
The Chi square distribution can also be presented
in tabular form. If you look at this table,
99
00:12:22,329 --> 00:12:31,529
our experiment with one degree of freedom
and a Chi square value of 29.2 corresponds
100
00:12:31,529 --> 00:12:42,660
to a probability that is much smaller than
0.05. Do you have support for the null hypothesis
101
00:12:42,660 --> 00:12:49,660
or should you reject it? Pause the video here
and take a moment to think about it.
102
00:12:56,460 --> 00:13:03,720
Because the ratio of progeny that you obtained
in your experiment has a probability of happening
103
00:13:03,730 --> 00:13:10,730
that is less than our level of significance,
you should reject our null hypothesis.
104
00:13:12,139 --> 00:13:17,800
This indicates that our discrepant results
are due to something more than just random
105
00:13:17,800 --> 00:13:25,940
chance. A multitude of other factors could
be contributing to our results. For example,
106
00:13:25,949 --> 00:13:32,610
there may be interactions with other genes
that you are not aware of. Or, environmental
107
00:13:32,610 --> 00:13:40,860
factors could be playing a role. All we know
is that our null hypothesis of a 3:1 ratio
108
00:13:40,860 --> 00:13:47,110
of mutant to wildtype flies is incorrect.
109
00:13:47,110 --> 00:13:53,680
As a next step, you decide to go back and
review your notes to see if you can formulate
110
00:13:53,680 --> 00:13:57,519
another plausible hypothesis.
111
00:13:57,519 --> 00:14:05,759
Reviewing your Punnett square, you expected
to obtain this genotypic ratio in the F1 progeny.
112
00:14:05,769 --> 00:14:15,669
If you were to select a GG mutant from the
F1 progeny and cross it with a gg wild-type
113
00:14:15,670 --> 00:14:21,649
fly, you would expect that all of the progeny
would be mutants.
114
00:14:21,649 --> 00:14:29,269
After attempting this cross with a variety
of flies from the F1 progeny that have a mutant
115
00:14:29,269 --> 00:14:36,249
phenotype, it becomes clear that you cannot
find a mutant fly that when crossed with a
116
00:14:36,249 --> 00:14:46,009
wild-type fly, produces all mutant progeny.
Somehow, you keep selecting heterozygous mutants.
117
00:14:47,540 --> 00:14:55,840
You begin to suspect that the F1 population
does not contain the expected number of GG
118
00:14:55,850 --> 00:14:57,459
flies!
119
00:14:57,459 --> 00:15:03,800
Checking your lab notebook, you see a note
about an observation that you barely paid
120
00:15:03,800 --> 00:15:10,499
attention to at the time. When you mated the
two parental mutant flies, there were a number
121
00:15:10,499 --> 00:15:18,479
of dead embryos in your vial. A new hypothesis
is forming in your mind.
122
00:15:18,480 --> 00:15:24,389
Can you come up with a hypothesis that may
explain the observations you have made through
123
00:15:24,389 --> 00:15:33,469
these experiments? Pause the video here. Discuss
and justify your hypothesis with a classmate.
124
00:15:39,480 --> 00:15:47,120
While there are many possible hypotheses,
one possible hypothesis is that the dead embryos
125
00:15:47,120 --> 00:15:56,820
in your vial were the missing GG mutants.
It may be that the wingless trait when homozygous,
126
00:15:56,829 --> 00:15:58,759
results in lethality.
127
00:15:58,759 --> 00:16:10,039
This would result in a phenotypic ratio of
2:1 mutant to wild-type flies in the F1 progeny.
128
00:16:12,780 --> 00:16:21,800
Again, you can use the Chi square test for
goodness of fit to test your new null hypothesis.
129
00:16:22,550 --> 00:16:31,309
Going back to your data of 1000 progeny, use
the test to evaluate the null hypothesis.
130
00:16:32,420 --> 00:16:34,560
Pause the video.
131
00:16:40,980 --> 00:16:47,980
You should have obtained a Chi square value
of 0.36. For one degree of freedom, you fail
132
00:16:48,249 --> 00:16:52,220
to reject your null hypothesis.
133
00:16:52,220 --> 00:16:58,129
While you have support for your null hypothesis,
more experiments are needed to confirm the
134
00:16:58,129 --> 00:17:06,989
idea that the GG genotype is lethal as you
suspect. The results from our Chi squared
135
00:17:06,990 --> 00:17:12,650
test have led us to a reasonable next experiment
to perform.
136
00:17:16,580 --> 00:17:24,160
In this video, you saw how the Chi-square
statistic can help us determine if our experimental
137
00:17:24,170 --> 00:17:33,390
genetic data came from the expected population
distribution. Comparing observed values to
138
00:17:33,390 --> 00:17:42,320
expected values helped us determine if deviations
in our data could be explained by random chance
139
00:17:42,320 --> 00:17:47,470
or if our hypothesis needed revision.
140
00:17:47,470 --> 00:17:54,090
The Chi-Square Test for Goodness of Fit is
just one statistical test of many that allows
141
00:17:54,090 --> 00:18:00,860
us to determine how confident we are that
a sample of data comes from a population with
142
00:18:00,860 --> 00:18:08,420
a certain distribution. It is important to
understand what these tests mean and how to
143
00:18:08,420 --> 00:18:16,060
interpret their results, so that you know
their limitations and can make informed decisions.