Business Statistics A First Course 6 th Edition
Business Statistics: A First Course 6 th Edition Chapter 11 Chi-Square Tests Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -1
Learning Objectives In this chapter, you learn: § How and when to use the chi-square test for contingency tables n n n The 2 test for the difference between two proportions The 2 test for differences in more than two proportions The 2 test for independence Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -2
Contingency Tables DCOVA Contingency Tables n n n Useful in situations comparing multiple population proportions Used to classify sample observations according to two or more characteristics Also called a cross-classification table. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -3
Contingency Table Example DCOVA Left-Handed vs. Gender Dominant Hand: Left vs. Right Gender: Male vs. Female § 2 categories for each variable, so this is called a 2 x 2 table § Suppose we examine a sample of 300 children Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -4
Contingency Table Example (continued) DCOVA Sample results organized in a contingency table: sample size = n = 300: 120 Females, 12 were left handed 180 Males, 24 were left handed Hand Preference Gender Left Right Female 12 108 120 Male 24 156 180 36 264 300 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -5
2 Test for the Difference Between Two Proportions DCOVA H 0: π1 = π2 (Proportion of females who are left handed is equal to the proportion of males who are left handed) H 1: π1 ≠ π2 (The two proportions are not the same – hand preference is not independent of gender) n n If H 0 is true, then the proportion of left-handed females should be the same as the proportion of left-handed males The two proportions above should be the same as the proportion of left-handed people overall Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -6
The Chi-Square Test Statistic DCOVA The Chi-square test statistic is: n where: fo = observed frequency in a particular cell fe = expected frequency in a particular cell if H 0 is true (Assumed: each cell in the contingency table has expected frequency of at least 5) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -7
Decision Rule DCOVA The test statistic approximately follows a chisquared distribution with one degree of freedom Decision Rule: If , reject H 0, otherwise, do not reject H 0 0 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Do not reject H 0 Reject H 0 2 2α Chap 11 -8
Computing the Average Proportion DCOVA The average proportion is: 120 Females, 12 were left handed Here: 180 Males, 24 were left handed i. e. , based on all 300 children the proportion of left handers is 0. 12, that is, 12% Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -9
Finding Expected Frequencies DCOVA n n To obtain the expected frequency for left handed females, multiply the average proportion left handed (p) by the total number of females To obtain the expected frequency for left handed males, multiply the average proportion left handed (p) by the total number of males If the two proportions are equal, then P(Left Handed | Female) = P(Left Handed | Male) =. 12 i. e. , we would expect (. 12)(120) = 14. 4 females to be left handed (. 12)(180) = 21. 6 males to be left handed Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -10
Observed vs. Expected Frequencies DCOVA Hand Preference Gender Left Right Female Observed = 12 Expected = 14. 4 Observed = 108 Expected = 105. 6 120 Male Observed = 24 Expected = 21. 6 Observed = 156 Expected = 158. 4 180 36 264 300 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -11
The Chi-Square Test Statistic DCOVA Hand Preference Gender Left Right Female Observed = 12 Expected = 14. 4 Observed = 108 Expected = 105. 6 120 Male Observed = 24 Expected = 21. 6 Observed = 156 Expected = 158. 4 180 36 264 300 The test statistic is: Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -12
Decision Rule DCOVA Decision Rule: If > 3. 841, reject H 0, otherwise, do not reject H 0 Here, 0. 05 0 Do not reject H 0 Reject H 0 20. 05 = 3. 841 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall 2 =0. 7576 < = 3. 841, so we do not reject H 0 and conclude that there is not sufficient evidence that the two proportions are different at = 0. 05 Chap 11 -13
Chi-Square Test In Excel DCOVA Chi-Square Test Observed Frequencies Gender Female Male Total Hand Preference Left Right 12 108 24 156 36 264 Expected Frequencies Hand Preference Gender Left Right Female 14. 4 105. 6 Male 21. 6 158. 4 Total 36 264 Total 120 180 300 Calculations f 0 - fe -2. 4 Total 120 180 300 (f 0 - fe)^2/fe 0. 40 0. 27 2. 4 -2. 4 0. 05 0. 04 Data Level of Significance Number of Rows Number of Columnns Degrees of Freedom 0. 05 2 2 1 =(B 19 -1)*(B 20 -1) Results Critical Value 3. 8415 =CHIINV(B 18, B 21) Chi-Square Test Statistic 0. 7576 =SUM(F 13: G 14) p-Value 0. 3841 =CHIDIST(B 25, B 21) Do not reject the null hypothesis =IF(B 26<B 18, "Reject the null hypothesis", "Do not reject the null hypothesis") Expected Frequency assumption is met. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall =IF(OR(B 13<5, C 13<5, B 14<5, C 14<5), " is violated. ", " is met. ") Chap 11 -14
Chi-Square Test In Minitab DCOVA Tabulated statistics: Gender, Hand (Expected counts are below observed) (Chi-Square cell contribution below expected counts) Rows: Gender Columns: Hand Left Female 12 14. 4 Right All 108 120 105. 6 120. 0 0. 40000 0. 05455 Male 24 21. 6 156 * 180 158. 4 180. 0 0. 26667 0. 03636 All 36 36. 0 * 264 * 300 264. 0 300. 0 * * Pearson Chi-Square = 0. 758, DF = 1, P-Value = 0. 384 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -15
2 Test for Differences Among More Than Two Proportions DCOVA n Extend the 2 test to the case with more than two independent populations: H 0: π 1 = π 2 = … = π c H 1: Not all of the πj are equal (j = 1, 2, …, c) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -16
The Chi-Square Test Statistic DCOVA The Chi-square test statistic is: n Where: fo = observed frequency in a particular cell of the 2 x c table fe = expected frequency in a particular cell if H 0 is true (Assumed: each cell in the contingency table has expected frequency of at least 1) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -17
Computing the Overall Proportion DCOVA The overall proportion is: n Expected cell frequencies for the c categories are calculated as in the 2 x 2 case, and the decision rule is the same: Decision Rule: If , reject H 0, otherwise, do not reject H 0 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Where is from the chisquared distribution with c – 1 degrees of freedom Chap 11 -18
Example of 2 Test for Differences Among More Than Two Proportions DCOVA A University is thinking of switching to a trimester academic calendar. A random sample of 100 administrators, 50 students, and 50 faculty members were surveyed Opinion Administrators Students Faculty Favor 63 20 37 Oppose 37 30 13 100 50 50 Totals Using a 1% level of significance, which groups have a different attitude? Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -19
Chi-Square Test Results DCOVA H 0: π 1 = π 2 = π 3 H 1: Not all of the πj are equal (j = 1, 2, 3) Chi-Square Test: Administrators, Students, Faculty Admin Favor Expected Oppose Total Students Faculty 63 20 37 60 30 30 37 30 13 40 20 20 100 50 50 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Total 120 Observed 80 200 Chap 11 -20
Excel Output For The Example DCOVA Chi-Square Test Favor Oppose Total Observed Frequencies Role Admin Students 63 37 100 Favor Oppose Total Expected Frequencies Role Admin Students 60. 0 30. 0 40. 0 20. 0 100 50 Opinion Calculations Faculty 20 30 50 Total 37 13 50 Faculty 120 80 200 3. 0000 -3. 0000 fo - fe -10. 0000 7 -7 120 80 200 0. 1500 0. 2250 (fo - fe)^2/fe 3. 3333 5. 0000 1. 6333 2. 4500 Total 30. 0 20. 0 50 Data Level of Significance Number of Rows Number of Columns Degrees of Freedom Results Critical Value Chi-Square Test Statistic p-Value Reject the null hypothesis Expected frequency assumption is met. 0. 01 2 3 2 =($B$19 - 1) * ($B$20 - 1) 9. 2103 =CHIINV(B 18, B 21) 12. 7917 =SUM(G 13: I 14) 0. 0017 =CHIDIST(B 25, B 21) =IF(B 26<B 18, "Reject the null hypothesis", Do not reject the null hypothesis") =IF(OR(B 13<1, C 13<1, D 13<1, B 14<1, C 14<1, D 14<1), " is violated. ", " is met. ") Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -21
Minitab Output For The Example DCOVA Tabulated statistics: Position, Role Rows: Position Columns: Role Admin Faculty Students All Favor 63 37 20 120 60 30 30 120 0. 150 Oppose All 1. 633 3. 333 * 37 13 30 80 40 20 20 80 0. 225 2. 450 100 50 50 200 * * 5. 000 * * * Pearson Chi-Square = 12. 792, DF = 2, P-Value = 0. 002 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -22
2 Test of Independence DCOVA n Similar to the 2 test for equality of more than two proportions, but extends the concept to contingency tables with r rows and c columns H 0: The two categorical variables are independent (i. e. , there is no relationship between them) H 1: The two categorical variables are dependent (i. e. , there is a relationship between them) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -23
2 Test of Independence (continued) The Chi-square test statistic is: n DCOVA where: fo = observed frequency in a particular cell of the r x c table fe = expected frequency in a particular cell if H 0 is true (Assumed: each cell in the contingency table has expected frequency of at least 1) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -24
Expected Cell Frequencies DCOVA n Expected cell frequencies: Where: row total = sum of all frequencies in the row column total = sum of all frequencies in the column n = overall sample size Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -25
Decision Rule n DCOVA The decision rule is If , reject H 0, otherwise, do not reject H 0 Where is from the chi-squared distribution with (r – 1)(c – 1) degrees of freedom Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -26
Example n DCOVA The meal plan selected by 200 students is shown below: Number of meals per week Class none Standing 20/week 10/week Fresh. 24 32 14 Total 70 Soph. 22 26 12 60 Junior 10 14 6 30 Senior 14 16 10 40 Total 70 88 42 200 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -27
Example DCOVA (continued) n The hypothesis to be tested is: H 0: Meal plan and class standing are independent (i. e. , there is no relationship between them) H 1: Meal plan and class standing are dependent (i. e. , there is a relationship between them) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -28
Example: Expected Cell Frequencies (continued) Observed: Class Standing DCOVA Number of meals per week Expected cell frequencies if H 0 is true: 20/wk 10/wk none Total Fresh. 24 32 14 70 Soph. 22 26 12 60 Junior 10 14 6 30 Senior 14 16 10 40 Class Standing Total 70 88 42 200 Example for one cell: 20/wk 10/wk none Total Fresh. 24. 5 30. 8 14. 7 70 Soph. 21. 0 26. 4 12. 6 60 Junior 10. 5 13. 2 6. 3 30 Senior 14. 0 17. 6 8. 4 40 70 88 42 200 Total Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Number of meals per week Chap 11 -29
Example: The Test Statistic (continued) n The test statistic value is: DCOVA = 12. 592 from the chi-squared distribution with (4 – 1)(3 – 1) = 6 degrees of freedom Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -30
Example: Decision and Interpretation DCOVA (continued) Decision Rule: If > 12. 592, reject H 0, otherwise, do not reject H 0 Here, 0. 05 0 Do not reject H 0 Reject H 0 20. 05=12. 592 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall 2 = 0. 709 < = 12. 592, so do not reject H 0 Conclusion: there is not sufficient evidence that meal plan and class standing are related at = 0. 05 Chap 11 -31
Excel Output Of Example DCOVA Chi-Square Test of Independence Fresh. Soph. Junior Senior Total Observed Frequencies Meals Per Week 20/wk 10/wk 24 32 22 26 10 14 14 16 70 88 Fresh. Soph. Junior Senior Total Expected Frequencies Meals Per Week 20/wk 10/wk 24. 5000 30. 8000 21. 0000 26. 4000 10. 5000 13. 2000 14. 0000 17. 6000 70 88 Class Standing Calculations None Total 14 12 6 10 42 None 14. 7000 12. 6000 6. 3000 8. 4000 42 70 60 30 40 200 -0. 5000 1. 0000 -0. 5000 0. 0000 fo - fe 1. 2000 -0. 4000 0. 8000 -1. 6000 -0. 7000 -0. 6000 -0. 3000 1. 6000 70 60 30 40 200 0. 0102 0. 0476 0. 0238 0. 0000 (fo - fe)^2/fe 0. 0468 0. 0061 0. 0485 0. 1455 0. 0333 0. 0286 0. 0143 0. 3048 Total Data Level of Significance Number of Rows Number of Columns Degrees of Freedom 0. 05 4 3 6=($B$23 - 1) * ($B$24 - 1) Results Critical Value 12. 5916=CHIINV(B 22, B 25) Chi-Square Test Statistic 0. 7093=SUM($G$15: $I$18) p-Value 0. 9943=CHIDIST(B 29, B 25) Do not reject the null hypothesis =IF(B 30<B 22, "Reject the null hypothesis", Do not reject the null hypothesis) Expected frequency assumption is met. =IF(OR(B 15<1, C 15<1, D 15<1, B 16<1, C 16<1, D 16<1, B 17<1, C 17<1, D 17<1, B 18<1, C 18<1, D 18<1), " is violated. ", " is met. ") Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -32
Minitab Output Of Example DCOVA Tabulated statistics: Class, Meals Rows: Class Columns: Meals 0 Fresh 10 14 14. 70 32 30. 80 20 All 24 70 24. 50 70. 00 0. 03333 0. 04675 0. 01020 Junior 6 6. 30 14 13. 20 10 30 10. 50 30. 00 0. 01429 0. 04848 0. 02381 Senior 10 8. 40 16 17. 60 * 14 * 40 14. 00 40. 00 0. 30476 0. 14545 0. 00000 Soph 12 12. 60 26 26. 40 22 60 21. 00 60. 00 0. 02857 0. 00606 0. 04762 All 42 88 42. 00 88. 00 * * * 70 * 200 70. 00 200. * * Pearson Chi-Square = 0. 709, DF = 6, P-Value = 0. 994 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -33
Chapter Summary n n n Developed and applied the 2 test for the difference between two proportions Developed and applied the 2 test for differences in more than two proportions Examined the 2 test for independence Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -34
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 11 -35
- Slides: 35