Presentation is loading. Please wait.

Presentation is loading. Please wait.

Textbook Section 11.2. * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of.

Similar presentations


Presentation on theme: "Textbook Section 11.2. * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of."— Presentation transcript:

1 Textbook Section 11.2

2 * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of a single categorical variable over several populations or treatments? * This information is usually organized into a two-way table. * There are two tests we can use with these tables. * Chi Square Test for Homogeneity tests to see if the distribution of the categorical variable is the same for several populations * Chi Square Test for Independence tests to see if there is a relationship between the row and column variables of the table.

3 * Market researchers think that the background music in a restaurant affects what people order. * What is the conditional distribution of entrees ordered for each treatment? * No music: French: 0.357; Italian: 0.131; Other: 0.512 * French music: French: 0.520; Italian: 0.013; Other: 0.467 * Italian music: French: 0.357; Italian: 0.226; Other: 0.417 * Did music affect what people ordered? Type of Music EntréeNoneFrenchItalianTotal French30393099 Italian1111931 Other4335 113 Total847584243

4 * In this case the null hypothesis is * H 0 : There is no difference in the true distribution of entrees ordered at this restaurant when no music, French music or Italian music is played. * If the null hypothesis is true, the observed differences are simply due to chance. * The alternative hypothesis, on the other hand, * H a : There is a difference in the true distribution of entrees ordered at this restaurant when no music, French music, or Italian music is played. * Notice ANY difference would favor the alternative.

5 * We could conduct several two-sample tests of proportion for all of the different pairs possible… * That’s 36 tests! And it still doesn’t give us an overall test of music played vs. entrée ordered * The overall test needed uses the Chi-Square statistic…which means we need to calculate expected counts.

6 * For each cell in the table, the expected count can be calculated by (row total)×(column total)÷(table total) * All expected counts are > 5 Type of Music EntréeNoneFrenchItalianTotal French34.2230.5634.2299 Italian10.729.5710.7231 Other39.0634.8839.06113 Total847584243

7 * State hypotheses * Check conditions for a Χ 2 test for homogeneity * Random – stated in problem * Expected counts > 5 – ALWAYS draw expected counts table! * Calculations  Calculator directions p. ??? * Report df = (rows – 1)(columns – 1), χ 2, and P-value * Conclusion: Because the P-value of 0.001 is less than α = 0.05, we reject H 0. We have convincing evidence that there is a difference in entrees ordered if there is no music, French music or Italian music playing.

8 * Let’s compare the actual counts vs. expected counts.. * The largest differences appear to be in Italian entrees. * If we calculate those individual χ 2 contributions: * Italian entrée + French music = 7.672 * Italian entrée + Italian music = 6.404 * Together they make up approximately 14 of the total χ 2 of 18! * Therefore: Orders of Italian entrees are strongly affected by French and Italian music. Type of Music EntréeNoneFrenchItalian French34.2230.5634.22 Italian10.729.5710.72 Other39.0634.8839.06 Type of Music EntréeNoneFrenchItalian French303930 Italian11119 Other4335

9 1. What is the expected count for students who use Facebook at least once a week and live on the main campus? 2. Calculate the Χ 2 statistic. 3. Calculate the p-value Use FacebookMain CampusCommonwealth Several times a month or less5576 At least once a week215157 At least once a day640394 Total Facebook Users910627

10 * Another common situation is when a single population is classified based on two categorical variables. In this case, we are examining the potential relationship between the variables. * Test = Chi Square Test for Independence * Hypotheses: * H 0 : There is no association between the two variables * H a : There is an association between the two variables.

11 * A random sample of healthy adults were given the Spielberger Anger Scale Test which measures how prone a person is to sudden anger. Researchers then followed the subjects to determine if they developed Coronary Heart Disease and recorded the data: * H 0 : There is no association between anger levels and Coronary Heart Disease. * H a : There is an association between anger levels and Coronary Heart Disease. Low Anger Moderate Anger High Anger Total CHD5311027190 No CHD305746216068284 Total311047316338474

12 * If conditions are met, we will conduct a Chi-Square test of Independence. * Random – Stated random sample * Expected Counts Greater than 5? * Calculate: df = 2, P = 0.0003, χ 2 = 16.0767 * With a P-value of 0.0003 less than α = 0.05, we reject H 0. We have convincing evidence that there is an association between a person’s propensity to sudden anger and coronary health. With a χ 2 component of 11.564 which is 72% of the total χ 2 statistic, it appears that there is a relationship between high levels of anger and coronary heart disease. LAMAHA CHD69.73106.0714.19 No CHD3040.274624.92618.81

13 * Because tests with two-way tables are carried out with the same methods, it is sometimes difficult to tell them apart. * It’s important to look at how data was gathered. * Two or more populations with an explanatory and response variable  Homogeneity * One population or sample with two different categorical variables where explanatory/response is not clear – just testing a relationship  Independence


Download ppt "Textbook Section 11.2. * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of."

Similar presentations


Ads by Google