85645161b1dc0e4e4321f8664c949ba3.ppt
- Количество слайдов: 39
Basic Business Statistics (9 th Edition) Chapter 12 Tests for Two or More Samples with Categorical Data © 2004 Prentice-Hall, Inc. Chap 12 -1
Chapter Topics n n n Z Test for Differences in Two Proportions (Independent Samples) 2 Test for Differences in More than Two Proportions (Independent Samples) Marascuilo Procedure 2 Test of Independence © 2004 Prentice-Hall, Inc. 2
Z Test for Differences in Two Proportions n What is It Used For? n n To determine whethere is a difference between 2 population proportions or whether one is larger than the other Assumptions: n n n Independent samples Population follows binomial distribution Sample size large enough: np 5 and n(1 -p) 5 for each population © 2004 Prentice-Hall, Inc. 3
Z Test Statistic where Pooled Estimate of the Population Proportion X 1 = Number of Successes in Sample 1 X 2 = Number of Successes in Sample 2 © 2004 Prentice-Hall, Inc. 4
The Hypotheses for the Z Test Research Questions Hypothesis No Difference Prop 1 Prop 2 Any Difference Prop 1 < Prop 2 Prop 1 > Prop 2 H 0 p 1 - p 2 = 0 H 1 p 1 - p 2 0 © 2004 Prentice-Hall, Inc. p 1 - p 2 0 p 1 - p 2 < 0 p 1 - p 2 > 0 5
Z Test for Differences in Two Proportions: Example As personnel director, you want to test the perception of fairness of two methods of performance evaluation. 63 of 78 employees rated Method 1 as fair. 49 of 82 rated Method 2 as fair. At the 0. 01 significance level, is there a difference in perceptions? © 2004 Prentice-Hall, Inc. 6
Calculating the Test Statistic © 2004 Prentice-Hall, Inc. 7
Z Test for Differences in Two Proportions: Solution H 0 : p 1 - p 2 = 0 H 1 : p 1 - p 2 0 Test Statistic: Z 2. 90 = 0. 01 n 1 = 78 n 2 = 82 Critical Value(s): Reject H 0 . 005 Decision: Reject at = 0. 01. Conclusion: There is evidence of a difference in proportions. -2. 58 0 2. 58 Z © 2004 Prentice-Hall, Inc. 8
Z Test for Differences in Two Proportions in PHStat n n PHStat | Two-Sample Tests | Z Test for Differences in Two Proportions … Example Solution in Excel Spreadsheet © 2004 Prentice-Hall, Inc. 9
Confidence Interval for Differences in Two Proportions n The Confidence Interval for Differences in Two Proportions © 2004 Prentice-Hall, Inc. 10
Confidence Interval for Differences in Two Proportions: Example As personnel director, you want to find out the perception of fairness of two methods of performance evaluation. 63 of 78 employees rated Method 1 as fair. 49 of 82 rated Method 2 as fair. Construct a 99% confidence interval for the difference in two proportions. © 2004 Prentice-Hall, Inc. 11
Confidence Interval for Differences in Two Proportions: Solution We are 99% confident that the difference between two proportions is somewhere between 0. 0294 and 0. 3909. © 2004 Prentice-Hall, Inc. 12
2 Test for Two Proportions: Basic Idea n n Compares Observed to Expected Frequencies if Null Hypothesis is True The Closer Observed Frequencies are to Expected Frequencies, the More Likely the H 0 is True n n Measured by squared difference relative to expected frequency Sum of relative squared differences is the test statistic © 2004 Prentice-Hall, Inc. 13
2 Test for Two Proportions: Contingency Table n Contingency Table (Observed Frequencies) for Comparing Fairness of Performance Evaluation Methods 2 Populations Perception Fair Unfair Total © 2004 Prentice-Hall, Inc. Evaluation Method 1 2 63 49 15 33 78 82 Levels of Variable Total 112 48 160 14
2 Test for Two Proportions: Expected Frequencies n n n 112 of 160 Total are “Fair” ( ) 78 Used Evaluation Method 1 Expect (78 112/160) = 54. 6 to be “Fair” Perception Fair Unfair Total © 2004 Prentice-Hall, Inc. Evaluation Method 1 2 63 49 15 33 78 82 Total 112 48 160 15
The 2 Test Statistic © 2004 Prentice-Hall, Inc. 16
Computation of the 2 Test Statistic f 0 fe (f 0 - fe) 63 54. 6 8. 4 70. 56 1. 293 49 57. 4 -8. 4 70. 56 1. 229 15 23. 4 -8. 4 70. 56 3. 015 33 24. 6 8. 4 70. 56 2. 868 Observed Frequencies © 2004 Prentice-Hall, Inc. (f 0 - fe)2 / fe Sum = 8. 405 Expected Frequencies 17
2 Test for Two Proportions: Finding the Critical Value df = (r - 1)(c - 1) = 1 r = 2 (# rows in Reject contingency table) c = 2 (# columns) =. 01 2 Table (Portion) DF 1 2 . 995. . . 0. 010 © 2004 Prentice-Hall, Inc. … … … =. 01 0 6. 635 Upper Tail Area. 95. 025 … 0. 004 … 3. 841 5. 024 0. 103 … 5. 991 7. 378 2. 01 6. 635 9. 210 18
2 Test for Two Proportions: Solution H 0 : p 1 - p 2 = 0 H 1 : p 1 - p 2 0 Test Statistic = 8. 405 Decision: Reject at = 0. 01. Conclusion: There is evidence of a difference in proportions. cted. expe e 5 Each uld b tion! y sho Cau enc requ f Reject =. 01 0 6. 635 2 Note: The conclusion obtained using 2 test is the same as using Z Test. © 2004 Prentice-Hall, Inc. 19
2 Test for Two Proportions in PHStat n n PHStat | Two-Sample Tests | Chi-Square Test for Differences in Two Proportions … Example Solution in Excel Spreadsheet © 2004 Prentice-Hall, Inc. 20
2 Test for More Than Two Proportions n n Extends the 2 Test to the General Case of c Independent Populations Tests for Equality (=) of Proportions Only Uses Contingency Table Assumptions: n n n Independent random samples “Large” sample sizes All expected frequencies 1 © 2004 Prentice-Hall, Inc. 21
2 Test for c Proportions: Hypotheses and Statistic n Hypotheses n n n H 0: p 1 = p 2 =. . . = pc H 1: Not all pj are equal Test statistic Observed frequency n n Expected frequency Degrees of freedom: (r - 1)(c - 1) © 2004 Prentice-Hall, Inc. # Rows # Columns 22
2 Test for c Proportions: Example The University is thinking of switching to a trimester academic calendar. A random sample of 100 undergraduates, 50 graduate students and 50 faculty members were surveyed. Opinion Under Grad Faculty Favor 63 20 37 Oppose 37 30 13 Totals 100 50 50 Test at the. 01 level of significance to determine if there is evidence of a difference in attitude between the groups. © 2004 Prentice-Hall, Inc. 23
2 Test for c Proportions: Example (continued) 1. Set Hypotheses: H 0 : p 1 = p 2 = p 3 H 1: Not all pj are equal 2. Contingency Table: Opinion Favor Oppose Totals © 2004 Prentice-Hall, Inc. Under 63 37 100 Grad 20 30 50 Faculty 37 13 50 Totals 120 80 200 24
2 Test for c Proportions: Example (continued) 3. Compute Expected Frequencies Opinion Favor Oppose Totals Under 60 40 100 (100)(120)/200=60 © 2004 Prentice-Hall, Inc. Grad 30 20 50 All expected frequencies are large. Faculty 30 20 50 Totals 120 80 200 (50)(80)/200=20 25
2 Test for c Proportions: Example (continued) 4. Compute Test Statistic: f 0 fe (f 0 - fe)2 / fe 63 60 3 9 . 15 20 30 -10 100 3. 3333 37 30 7 49 1. 6333 37 40 -3 9 . 225 30 20 10 100 5 13 20 -7 49 2. 45 Test Statistic 2 = 12. 792 © 2004 Prentice-Hall, Inc. 26
2 Test for c Proportions: Example Solution H 0 : p 1 = p 2 = p 3 H 1: Not all pj are equal df = (c – 1)(r - 1) = 3 - 1 = 2 Reject Decision: Do Not Reject H 0. Conclusion: =. 01 0 9. 210 2 Since 2 =12. 792, there is sufficient evidence of a difference in attitude among the groups. © 2004 Prentice-Hall, Inc. 27
2 Test for c Proportions in PHStat n n PHStat | c-Sample Tests | Chi-Square Test … Example Solution in Excel Spreadsheet © 2004 Prentice-Hall, Inc. 28
Marascuilo Procedure n n n Used when the Test for c Proportions is Rejected Compares All Pairs of Groups The Marascuilo Multiple Comparison Procedure: n Compute n The critical range for a pair n among all pairs of groups is A pair is considered significantly different if critical range © 2004 Prentice-Hall, Inc. 29
Marascuilo Procedure : Example The University is thinking of switching to a trimester academic calendar. A random sample of 100 undergraduates, 50 graduate students and 50 faculty members were surveyed. Opinion Under Grad Faculty Favor 63 20 37 Oppose 37 30 13 Totals 100 50 50 Using a 1% level of significance, which groups have a different attitude? © 2004 Prentice-Hall, Inc. 30
Marascuilo Procedure : Solution Excel Output: At 1% level of significance, there is evidence of a difference in attitude between graduate students and faculty. © 2004 Prentice-Hall, Inc. 31
2 Test of Independence n Shows If a Relationship Exists between 2 Factors of Interest n n n n One sample drawn Each factor has 2 or more levels of responses Does not show nature of relationship Does not show causality Similar to Testing p 1 = p 2 = … = pc Used Widely in Marketing Uses Contingency Table © 2004 Prentice-Hall, Inc. 32
2 Test of Independence: Example A survey was conducted to determine whethere is a relationship between architectural style (Split-Level or Ranch) and geographical location (Urban or Rural). Given the survey data, test at the =. 01 level to determine whethere is a relationship between location and architectural style. © 2004 Prentice-Hall, Inc. 33
2 Test of Independence: Example (continued) 1. Set Hypotheses: H 0: The 2 categorical variables (Architectural Style and Location) are independent H 1: The 2 categorical variables are related 2. Contingency Table: House Location House Style Levels of Variable 1 © 2004 Prentice-Hall, Inc. Urban Rural Total Split-Level Ranch Total 63 15 78 49 33 82 112 48 160 Levels of Variable 2 34
2 Test of Independence: Example (continued) 3. Computing Expected Frequencies n n n Statistical independence : P(A and B) = P(A)·P(B) Compute marginal (row & column) probabilities & multiply for joint probability Expected frequency is sample size times joint probability 78· 112 160 © 2004 Prentice-Hall, Inc. House Location Urban Rural House Style Obs. Exp. Total Split-Level 63 54. 6 49 57. 4 112 Ranch 15 23. 4 33 24. 6 48 78 78 82 82 160 Total 82· 112 160 35
2 Test of Independence: Example (continued) 4. Calculate Test Statistic: f 0 fe (f 0 - fe)2 / fe 63 54. 6 8. 4 70. 56 1. 292 49 57. 4 -8. 4 70. 56 1. 229 15 23. 4 -8. 4 70. 56 3. 015 33 24. 6 8. 4 70. 56 2. 868 2 Test Statistic = 8. 404 All expected frequencies are large, i. e. > 1. © 2004 Prentice-Hall, Inc. 36
2 Test of Independence: Example Solution H 0: The 2 categorical variables (Architectural Style and Location) are independent H 1: The 2 categorical variables are related df = (r - 1)(c - 1) = 1 Reject Decision: =. 01 Reject H 0 at =. 01. Conclusion: 0 6. 635 Since c 2 =8. 404, there is evidence that the choice of architectural design and location are related. © 2004 Prentice-Hall, Inc. 37
2 Test of Independence in PHStat n n PHStat | c-Sample Tests | Chi-Square Test … Example Solution in Excel Spreadsheet © 2004 Prentice-Hall, Inc. 38
Chapter Summary n n n Performed Z Test for Differences in Two Proportions (Independent Samples) Discussed 2 Test for Differences in Two Proportions (Independent Samples) Addressed 2 Test for Differences in More Than Two Proportions (Independent Samples) Illustrated Marascuilo Procedure Described 2 Test of Independence © 2004 Prentice-Hall, Inc. 39
85645161b1dc0e4e4321f8664c949ba3.ppt