Chi-Square Test - cloudfront.net

Download Report

Transcript Chi-Square Test - cloudfront.net

Chi-Square Test
Chi-Square (χ2) Test
Used to determine if there is a significant
difference between the expected and
observed data
Null hypothesis: There is NO statistically
significant difference between expected &
observed data
Any differences are due to CHANCE alone
Chi-Square (χ2) Formula
How to use the Chi-Square Test
1. Determine null hypothesis
All frequencies are equal –OR– Specific frequencies given already
2. Use formula to calculate χ2 value:
n = # of categories, e = expected, o = observed
3. Find critical value using table (Use p=0.05).
degrees of freedom (df) = n – 1
4. If χ2 < Critical Value, then ACCEPT null hypothesis. Differences in
data are due to chance alone.
If χ2 > Critical Value, REJECT the null hypothesis: Differences in data are NOT due to chance alone!
Sample Problem
You buy a package of M&Ms from the factory store
and find the following: 20 brown, 20 blue, 20 orange,
20 green, and 20 yellow M&Ms.
According to the M&M website, each package of
candy should have 13% brown, 24% blue, 20%
orange, 16% green, 13% red, and 14% yellow
M&Ms.
You realize you are missing Red M&M’s in your
package! Is this acceptable, or did something happen
in the factory during the packaging process?
Use the Chi-Square Test to answer this question.
Consider this story....
Two tigers at a zoo are bred together and they
have four cubs.
Two of the four cubs are albino tigers. Based on that, Kristin
hypothesizes that both of the parents must be carrying a
recessive gene for albinism. The cross would look like:
Don't hate
me because
I'm beautiful
Aa x Aa
At least they have
a future in the
circus.....
Who fell into
the bleach?
If Kristin's hypothesis is accurate the
punnett square would look like..
This AP Bio student is unconvinced.
If your hypothesis is
correct, then only ONE of
the four kittens should be
an albino.
You are so dumb...you
are really really dumb....
But isn't 1/4 pretty close to 2/4 ...maybe
the difference is just due to chance....
Once I flipped a coin four
times I got heads 3
times. Sometimes it just
happens that
way. Maybe you just got
lucky and got an extra
white kitten..
The only way to solve this problem and the
argument is to do a statistical analysis.
We call this type of analysis a
CHI SQUARE
The purpose is to determine
whether the results are
statistically significant.
What are the odds that your
tigers are Aa x Aa?
Or could other factors be at
work here?
I am so going to
win this argument!
Here's how to do a chi square.
Summed for all classes
means that you are looking at
all the traits you observed - in
this case, orange and white.
To apply the formula, plug in
your "observed" and "expected"
numbers....this will give you
I do not
like math!
= 1.33
1.33? Is that good or
bad? Who is
right? Who is
wrong?
What time is it?
To determine if this number is good or not,
you must look at a chi square chart.
"Degrees of freedom" is one less than the original number of
classes you looked at, which was 2 (orange & white)
So we will look at the first row (DoF = 1)
1.33 is between the 20% and 30% columns
Basically this means that the difference you observed
between orange and white cubs can be expected to occur
more than 20% of the time, just due to chance.
Scientists use 5% as the cut-off percent to reject a
hypothesis. Results are always better with a large sample
size.
Well obviously, I
was right. You can
run and tell that..
If you find that you have a "poor fit",
that means that you probably need
to reject the hypothesis. In the tiger
cub case, we did not have a poor
fit.
Poor fit.
Emily thinks she gets it now. So she looks at
another case. She breeds two black mice
together and finds that over the course of 3 years,
the parents produce 330 brown mice, and 810
black mice. She hypothesizes that the parents
are Bb (heterozygous). How can she prove this
with a chi square?
Online Chi Square Calculator
at http://www.graphpad.com/quickcalcs/chisquared1.cfm
-- just plug in the observed and expected values