Presentation is loading. Please wait.

Presentation is loading. Please wait.

Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve What is a χ 2 (Chi-square) test used for? Statistical test used to compare observed data with.

Similar presentations


Presentation on theme: "Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve What is a χ 2 (Chi-square) test used for? Statistical test used to compare observed data with."— Presentation transcript:

1 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve What is a χ 2 (Chi-square) test used for? Statistical test used to compare observed data with expected data according to a hypothesis. Let’s look at the next slide to find out… What does that mean?

2 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Ex. Say you have a coin and you want to determine if it is fair (50/50 chance of gets heads/tails). You decide to flip the coin 100 times. If the coin is fair what do you expect/predict to observe? 50 heads and 50 tails Now come up with a hypothesis (two possibilities)

3 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Hypotheses 1. The coin is fair and there will be no real difference between what we will observe and what we expect. 2. The coin is not fair and the observed results will be significantly different from the expected results. The first hypothesis that states no difference between the observed and expected has a special name… NULL HYPOTHESIS

4 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve NULL HYPOTHESIS This is the hypothesis that states there will be no difference between the observed and the expected data or that there is no difference between the two groups you are observing. Ex. You wonder if world class musicians have quicker reaction times than world class athletes. What would the null hypothesis be? That there is no difference between these two groups. Let’s get back to flipping coins…

5 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve You flip the coin 100 times and you getting the following results: HeadsTails Observed Expected Is the coin fair or not? It’s not easy to say. It looks like it might, but maybe not… This is where statistics, in particular the χ 2 test, comes in.

6 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve The formula for calculating χ 2 is: Where O is the observed value and E is the expected. What happens to the value of χ 2 as your observed data gets closer to the expected? Χ 2 approaches 0 Let’s determine χ 2 for the coin flipping study…

7 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve HeadsTails Observed Expected Χ 2 = (41-50) 2 /50 + (59-50) 2 /50 Χ 2 = (-9) 2 /50 + (9) 2 /50 Χ 2 = 81/ /50 Χ 2 = 3.24 So what does this number mean…?

8 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Statisticians have devised a table to do this: Converting Χ 2 to a P(probability)-value Great, but how do you use this?

9 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Converting Χ 2 to a P(probability)-value First we need to determine Degrees of Freedom (DoF): DoF = # of groups minus 1 We have two groups, heads group and tails group. Therefore our DoF = 1.

10 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Converting Χ 2 to a P(probability)-value Then scan across and find your X 2 value (3.24) P-value = ~0.07 Lastly go up and estimate the p-value… What does this value tell us?

11 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve The P-value The p-value tells us the probability that the NULL hypothesis (observed and expected not different) is correct. P-value = ~0.07

12 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve HeadsTails Observed Expected P-value = ~0.07 Therefore, there is a 7% chance that the null hypothesis (there is no real difference between observed and expected) is correct.

13 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve HeadsTails Observed Expected P-value = ~0.07 You might say then that the other hypothesis must be correct as there is a 93% likelihood that there is a different between observed and expected…

14 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve 50 P-value = ~0.07 However, statisticians have a p-value = 0.05 cutoff. In order for the hypothesis to be supported, p must be less than 0.05 (5% chance that null is correct). Therefore the null hypothesis cannot be rejected.

15 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Example 1

16 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Example 1 Answer observedexpected(obs-exp)^2/exp X2X2 DOF = #groups – 1 = 4 – 1 = 3 P = ~0.4 or 40% Therefore, there is a 40% chance that the null hypothesis is supported (that there is no difference between the groups) and therefore, according to this data, the card machine is fair.

17 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Example 2 A genetics engineer was attempting to cross a tiger and a cheetah. She predicted a phenotypic outcome of the traits she was observing to be in the following ratio 4 stripes only: 3 spots only: 9 both stripes and spots. When the cross was performed and she counted the individuals she found 50 with stripes only, 41 with spots only and 85 with both. According to the Chi-square test, did she get the predicted outcome?

18 Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve Example 2 Answer Expected ratioObserved #Expected #O-E(O-E) 2 (O-E) 2 /E 4 stripes spots stripes/spots total176 total 0 total Sum(X 2 ) = 4.74 DOF = #groups – 1 = 3 – 1 = 2 P = ~0.18 or 18% Therefore, there is a 18% chance that the null hypothesis is supported (that there is no difference between the groups) and therefore, according to this data, the null can be accepted and the observed is not significantly different than the expected.


Download ppt "Χ 2 (Chi-square) Test Chapter 13 – How Populations Evolve What is a χ 2 (Chi-square) test used for? Statistical test used to compare observed data with."

Similar presentations


Ads by Google