Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chi-square test Chi-square test or  2 test Notes: Page 217, and your own notebook paper 1.Goodness of Fit 2.Independence 3.Homogeneity.

Similar presentations


Presentation on theme: "Chi-square test Chi-square test or  2 test Notes: Page 217, and your own notebook paper 1.Goodness of Fit 2.Independence 3.Homogeneity."— Presentation transcript:

1 Chi-square test Chi-square test or  2 test Notes: Page 217, and your own notebook paper 1.Goodness of Fit 2.Independence 3.Homogeneity

2 Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate) –Independence (bivariate) –Homogeneity (univariate with two samples)

3  2 distribution – df=3 df=5 df=10

4  2 distributions Different df have different curves Skewed right normal curveAs df increases, curve shifts toward right & becomes more like a normal curve

5  2 assumptions SRSSRS – reasonably random sample countsHave counts of categorical data & we expect each category to happen at least once Sample sizeSample size – to ensure that the sample size is large enough we should expect at least five in each category. ***Be sure to list expected counts!! Combine these together: All expected counts are at least 5.

6  2 formula

7  2 Goodness of fit test Uses univariate data Want to see how well the observed counts “fit” what we expect the counts to be  2 cdf function p-valuesUse  2 cdf function on the calculator to find p-values Based on df df = number of categories - 1

8 Hypotheses – written in words H 0 : proportions are equal H a : at least one proportion is not the same Be sure to write in context!

9 Does your zodiac sign determine how successful you will be? Fortune magazine collected the zodiac signs of 256 heads of the largest 400 companies. Is there sufficient evidence to claim that successful people are more likely to be born under some signs than others? Aries 23Libra18Leo20 Taurus20Scorpio21Virgo19 Gemini18Sagittarius19Aquarius24 Cancer23Capricorn22Pisces29 How many would you expect in each sign if there were no difference between them? How many degrees of freedom? I would expect CEOs to be equally born under all signs. So 256/12 = 21.333333 df = #categories - 1 Since there are 12 signs, df = 12 – 1 = 11

10 Does your zodiac sign determine how successful you will be? Fortune magazine collected the zodiac signs of 256 heads of the largest 400 companies. Is there sufficient evidence to claim that successful people are more likely to be born under some signs than others? Aries 23Libra18Leo20 Taurus20Scorpio21Virgo19 Gemini18Sagittarius19Aquarius24 Cancer23Capricorn22Pisces29 Calculator: Enter the data into L1

11 Assumptions: Have a random sample of CEO’s All expected counts are greater than 5. (I expect 21.33 CEO’s to be born in each sign.) H 0 : The proportions of CEO’s born under each sign are the same. H a : At least one of the proportions of CEO’s born under each sign is different. P-value =  2 cdf(5.094, 10^99, 11) =.9265  =.05 Since p-value > , I fail to reject H 0. There is not sufficient evidence to suggest that the CEOs are born under some signs more than others. Newer Calculators: L1: Enter observed data L2: Enter expected values (256/12) = 21.333333 STAT,CALC, X 2 GOF-Test… Newer Calculators: L1: Enter observed data L2: Enter expected values (256/12) = 21.333333 STAT,CALC, X 2 GOF-Test…

12 Assumptions: Have a random sample of CEO’s All expected counts are greater than 5. (I expect 21.33 CEO’s to be born in each sign.) H 0 : The proportions of CEO’s born under each sign are the same. H a : At least one of the proportions of CEO’s born under each sign is different. P-value =  2 cdf(5.094, 10^99, 11) =.9265  =.05 Since p-value > , I fail to reject H 0. There is not sufficient evidence to suggest that the CEOs are born under some signs more than others. OR, if you have an older calculator: L2: (L1 - 21.3333) 2 / 21.333 STAT,CALC, 1-VarStats L2 …gives Σx=5.094 OR, if you have an older calculator: L2: (L1 - 21.3333) 2 / 21.333 STAT,CALC, 1-VarStats L2 …gives Σx=5.094 Calculator for p-value: 2ndVARS, 8:X 2 cdf Calculator for p-value: 2ndVARS, 8:X 2 cdf

13 A company says its premium mixture of nuts contains 10% Brazil nuts, 20% cashews, 20% almonds, 10% hazelnuts and 40% peanuts. You buy a large can and separate the nuts. Upon weighing them, you find there are 112 g Brazil nuts, 183 g of cashews, 207 g of almonds, 71 g or hazelnuts, and 446 g of peanuts. You wonder whether your mix is significantly different from what the company advertises? Why is the chi-square goodness-of-fit test NOT appropriate here? What might you do instead of weighing the nuts in order to use chi-square? counts Because we do NOT have counts of the type of nuts. count We could count the number of each type of nut and then perform a  2 test.

14 Offspring of certain fruit flies may have yellow or ebony bodies and normal wings or short wings. Genetic theory predicts that these traits will appear in the ratio 9:3:3:1 (yellow & normal, yellow & short, ebony & normal, ebony & short) A researcher checks 100 such flies and finds the distribution of traits to be 59, 20, 11, and 10, respectively. What are the expected counts? df? Are the results consistent with the theoretical distribution predicted by the genetic model? (see next page) Expected counts: Y & N = 56.25 Y & S = 18.75 E & N = 18.75 E & S = 6.25 We expect 9/16 of the 100 flies to have yellow and normal wings. (Y & N) So, we expect 56.25 (Y & N) Since there are 4 categories, df = 4 – 1 = 3

15 Assumptions: Have a random sample of fruit flies All expected counts are greater than 5. Expected counts: Y & N = 56.25, Y & S = 18.75, E & N = 18.75, E & S = 6.25 H 0 : The proportions of fruit flies are the same as the theoretical model. H a : At least one of the proportions of fruit flies is not the same as the theoretical model. P-value =  2 cdf(5.671, 10^99, 3) =.129  =.05 Since p-value > , I fail to reject H 0. There is not sufficient evidence to suggest that the distribution of fruit flies is not the same as the theoretical model. L1: Observed data L2: Expected values L3: (L1 – L2) 2 / L2 Then, use STAT,CALC,1-VarStats of L3 to see Σx=5.671 L1: Observed data L2: Expected values L3: (L1 – L2) 2 / L2 Then, use STAT,CALC,1-VarStats of L3 to see Σx=5.671 2 nd VARS

16 Homework: Page 222, 223


Download ppt "Chi-square test Chi-square test or  2 test Notes: Page 217, and your own notebook paper 1.Goodness of Fit 2.Independence 3.Homogeneity."

Similar presentations


Ads by Google