Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chi-square test or c2 test

Similar presentations


Presentation on theme: "Chi-square test or c2 test"— Presentation transcript:

1 Chi-square test or c2 test

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

3 c2 distribution – df=3 df=5 df=10

4 c2 distribution Different df have different curves Skewed right
As df increases, curve shifts toward right & becomes more like a normal curve

5 c2 assumptions SRS – reasonably random sample
All expected counts are at least 5. ***Be sure to list expected counts!!

6 c2 formula

7 c2 Goodness of fit test Uses univariate data
Want to see how well the observed counts “fit” what we expect the counts to be Based on degrees of freedom df = number of categories - 1 Use c2cdf function on the calculator to find p-values

8 Hypotheses – written in words
H0: the observed counts equal the expected counts Ha: the observed counts are not equal to the expected counts Be sure to write in context!

9 Does your zodiac sign determine how successful you will be
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 23 Libra 18 Leo 20 Taurus 20 Scorpio 21 Virgo 19 Gemini 18 Sagittarius 19 Aquarius 24 Cancer 23 Capricorn 22 Pisces 29 How many would you expect in each sign if there were no difference between them? I would expect CEOs to be equally born under all signs. So 256/12 = How many degrees of freedom? Since there are 12 signs – df = 12 – 1 = 11

10 Identify: Chi-Square GOF
H0: The number of CEO’s born under each sign is the same. Ha: The number of CEO’s born under each sign is the different. Conditions: Have a random sample of CEO’s All expected counts are greater than 5. (I expect CEO’s to be born in each sign.) Calculations: P-value = c2cdf(5.094, 10^99, 11) = a = .05 Conclusion: Since p-value > a, I fail to reject H0. There is not sufficient evidence to suggest that the CEOs are born under some signs than others.

11 The community hospital is studying its distribution of patients
The community hospital is studying its distribution of patients. A random sample of 317 patients presently in the hospital gave the following information: Type of Patient Old Rate of Occurrence of These Type of Patients Present Number of This Type of Patient in Sample Maternity Ward 20% 65 Cardiac Ward 32% 100 Burn Ward 10% 29 Children’s ward 15% 48 All other wards 23% 75 Using a 5% level of significance, test the claim that the distribution of patients in these wards has not changed.

12 Identify: Chi-Square GOF
H0: The distribution of these patients has not changed. Ha: The distribution of these patients has changed. Conditions: Have a random sample of patients All expected counts are greater than 5. Calculations: (from calculator) X 2 = 0.35 P-value = a = .05 Conclusion: Since p-value > a, I fail to reject H0. There is not sufficient evidence to suggest that the distribution of these patients has changed. Expected Counts Maternity 63.4 Cardiac 101.44 Burn 31.7 Children’s 47.55 All others 72.91


Download ppt "Chi-square test or c2 test"

Similar presentations


Ads by Google