Download Chi Squared Analysis

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
The Chi Squared Test
Chi-Squared Test
• Used to compare data in the field with data in an
experiment
– Is the difference between what you observed and
what you expected due to random chance or some
other factor?
– Ex. If you toss a coin 10 times, you expect 5 heads and
5 tails, but that might not be what you observe to
happen.
– There is variability in the real world
• Chi-squared enables us to
– distinguish the natural variability between what is observed and
what is expected
– the possibility of something else significantly playing a role
Hypothesis Testing
• Hypothesis- a causal relationship exists between an
underlying factor (variable) and an observable
phenomenon.
– Ex. Do English ivy leaves grow bigger in the shade?
• Relationship- sunlight amount is the variable causing bigger
leaves.
• Hypothesis testing- Are the effects real? Is there
something in this data?
– trying to reject a null hypothesis
• A statement explaining that there is no causal relationship
– Ex. Leaf widths are the same in sunny and shady environments
– Alternative to the null hypothesis- the causal relationship
exists
• Ex. Leaves grow larger in the shade to capture more sunlight
• In most cases, experiments do not prove the alternate to the null
hypothesis but reject the null hypothesis
Critical Value
• How much variation should be tolerated before
rejecting the null hypothesis?
– If the observed deviate from the predictions, how
much do we allow to chance?
– In biology we usually have a 5% critical value
• Known as a probability value, or p-value
– Ex. Data is collected on leaf width in shade and sun
• A statistical analysis is used
– A p-value is generated- if it is less than 5%, we should reject the
null
» The leaves of shady plants are significantly larger than leaves
in the sun
Chi-Squared Test
• Used in introductory biology to
– Test observed outcomes of genetic test compare with
Mendel’s predicted outcomes
– See how gene frequencies match up to Hardy-Weinberg
equilibrium
• Usually trying to prove that any variation away from Mendel or
Hardy-Weinberg was due to chance
– You want to fail to reject the null, p-value is greater than .05
» Proving Mendel and Hardy-Weinberg correct
– Can also be used to reject the null (p ≤.05)
• Pill bugs choosing one environment over another
– Want to show that one environment is desired significantly
– In medicine- comparing a drug to a placebo
• Null- effects are the same
– Chi-squared p-value greater than .05- drug and placebo are equally
effective
– Chi-squared p-value less than or equal to .05- there is a significant
different
» Null is rejected
Calculating Chi-Squared
•O: observed
•E: expected
•Example- Mendel’s monohybrid cross
•Round is dominant over wrinkled
•F2 generation should show a 3:1 ratio
•Data- 5,474 round, 1,850 wrinkled
•This is the observed
•Expected data- 5,493 round, 1,831 wrinkled
•5474 +1850= 7324
•7324 x .75= 5493
•7324 x .25= 1831
•Is the difference between the observed and the
expected significant?
Calculating Chi-Squared
Degrees of Freedom- one less than the number of results
•Two results here, round or wrinkled, so the degrees of freedom is one
Calculating Chi-Squared
• Once you have determined the value of chisquared, use a Chi-squared table to calculate
the p-value:
Calculating Chi-Squared
• Results:
– Our p-value is well above .05
• do not reject the null hypothesis
– The observed vs. the expected values are not significantly
different
» The differences are due to chance
• Summary of Steps:
1. Calculate the observed and the expected.
2. Plug into the Chi-squared formula
•
Get a number answer for χ2 by adding up the last column
3. Calculate degrees of freedom
4. Use a chi-squared table to calculate the p-value
•
If p≤.05, then reject the null hypothesis
Your Turn
• Stream snails were marked and recaptured
• Question asked: Do snails tend to move
upstream or downstream after initial capture?
– If no preference, half would go upstream, half
would go down stream
– Completed in two stream beds:
• Sandy stream: 43 of 50 snails were recovered upstream
• Rocky stream: 22 of 38 snails were recovered upstream
• Do a Chi-squared analysis for each bed type.
Answer
Answer
Rocky bed- do not reject
the null hypothesis
Sandy bed- definitely
reject the null hypothesis