Download presentation

Presentation is loading. Please wait.

Published bySamuel Rice Modified over 4 years ago

1
© 2002 Prentice-Hall, Inc.Chap 10-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 10 Tests for Two or More Samples with Categorical Data

2
© 2002 Prentice-Hall, Inc. Chap 10-2 Chapter Topics Z test for differences in two proportions (independent samples) 2 test for differences in two proportions (independent samples) 2 test for differences in c proportions (independent samples) 2 test of independence

3
© 2002 Prentice-Hall, Inc. Chap 10-3 Z Test for Differences in Two Proportions Why is it used? To determine whether there is a difference between two population proportions and whether one is larger than the other Assumptions: Independent samples Population follows Binomial distribution Sample size large enough: np 5 and n(1-p) 5 for each population

4
© 2002 Prentice-Hall, Inc. Chap 10-4 Z Test Statistic Where X 1 = Number of Successes in Sample 1 X 2 = Number of Successes in Sample 2 Pooled Estimate of the Population Proportion

5
© 2002 Prentice-Hall, Inc. Chap 10-5 The Hypotheses for the Z Test Research Questions Hypothesi s No Difference Any Difference Prop 1 Prop 2 Prop 1 < Prop 2 Prop 1 Prop 2 Prop 1 > Prop 2 H 0 p 1 - p 2 p 1 -p 2 0p 1 -p 2 0 H 1 p 1 -p 2 0 p 1 -p 2 < 0p 1 - p 2 > 0

6
© 2002 Prentice-Hall, Inc. Chap 10-6 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 one as fair. Forty- nine of 82 rated method two as fair. At the 0.01 significance level, is there a difference in perceptions?

7
© 2002 Prentice-Hall, Inc. Chap 10-7 Calculating the Test Statistic

8
© 2002 Prentice-Hall, Inc. Chap 10-8 Z Test for Differences in Two Proportions: Solution H 0 : p 1 - p 2 = 0 H 1 : p 1 - p 2 0 = 0.01 n 1 = 78 n 2 = 82 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = 0.01 There is evidence of a difference in proportions. Z 290. Z 0 2.58-2.58.005 Reject H 0 0.005

9
© 2002 Prentice-Hall, Inc. Chap 10-9 Z Test for Difference in Two Proportions in PHStat PHStat | two-sample tests | Z test for differences in two proportions … Example solution in excel spreadsheet

10
© 2002 Prentice-Hall, Inc. Chap 10-10 2 Test for Two Proportions: Basic Idea Compares observed frequencies to expected frequencies if null hypothesis is true The closer the observed frequencies are to the expected frequencies, the more likely the H 0 is true Measured by squared difference relative to expected frequency Sum of relative squared differences is the test statistic

11
© 2002 Prentice-Hall, Inc. Chap 10-11 2 Test for Two Proportions: Contingency Table Evaluation Method Perception12Total Fair6349112 Unfair153348 Total 7882160 Contingency table (observed frequencies) for comparing fairness of performance evaluation methods Two populations Levels of variable

12
© 2002 Prentice-Hall, Inc. Chap 10-12 2 Test for Two Proportions: Expected Frequencies 112 of 160 total are “fair” ( ) 78 used evaluation method 1 Expect (78 112/160) = 54.6 to be ‘fair’ Evaluation Method Perception12 Total Fair6349112 Unfair153348 Total 7882160

13
© 2002 Prentice-Hall, Inc. Chap 10-13 The 2 Test Statistic

14
© 2002 Prentice-Hall, Inc. Chap 10-14 Computation of the 2 Test Statistic f 0 f e (f 0 - f e ) (f 0 - f e ) 2 (f 0 - f e ) 2 / f e 6354.6 8.4 70.56 1.293 49 57.4 -8.4 70.56 1.229 1523.4 -8.4 70.56 3.015 3324.6 8.4 70.56 2.868 Sum = 8.405 Observed Frequencies Expected Frequencies

15
© 2002 Prentice-Hall, Inc. Chap 10-15 2 Test for Two Proportions: Finding the Critical value 06.635 Reject r = 2 (# rows in Contingency Table) c = 2 (# columns) =.01 df = (r - 1)(c - 1) = 1 2 Table (Portion) Upper Tail Area DF.995 ….95 ….05 1... … 0.0043.841 20.0100.1035.991.025.01 5.024 7.378 6.635 9.210 … … …

16
© 2002 Prentice-Hall, Inc. Chap 10-16 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: Conclusion: 6.635 0 Reject =.01 Reject at = 0.01 There is evidence of a difference in proportions. Note: Conclusion obtained using test is the same as using Z Test. Caution! Each expected frequency should be 5.

17
© 2002 Prentice-Hall, Inc. Chap 10-17 2 Test for Two Proportions in PHStat PHStat | two-sample tests | chi-square test for differences in two proportions … Example solution in excel spreadsheet

18
© 2002 Prentice-Hall, Inc. Chap 10-18 2 Test for c Proportions Extends the 2 test to the general case of c independent populations Tests for equality (=) of proportions only One variable with several groups or levels Uses contingency table Assumptions: Independent random samples “Large” sample size All expected frequencies 1

19
© 2002 Prentice-Hall, Inc. Chap 10-19 2 Test for c Proportions: Hypotheses and Statistic Hypotheses H 0 : p 1 = p 2 =... = p c H 1 : Not all p j are equal Test statistic Degrees of freedom: (r - 1)(c - 1) Observed frequency Expected frequency # Rows # Columns

20
© 2002 Prentice-Hall, Inc. Chap 10-20 2 Test for c Proportions: Example The University is considering switching to a trimester academic calendar. A random sample of 100 undergraduates, 50 graduate students and 50 faculty members was surveyed. OpinionUnderGradFaculty Favor 63 27 30 Oppose 37 23 20 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.

21
© 2002 Prentice-Hall, Inc. Chap 10-21 2 Test for c Proportions: Example (continued) 1. Set Hypotheses: H 0 : p 1 = p 2 = p 3 H 1 : Not All p j Are Equal 2. Contingency Table: OpinionUnderGradFacultyTotals Favor 63 27 30 120 Oppose 37 23 20 80 Totals 100 50 50 200 All expected frequencies are large.

22
© 2002 Prentice-Hall, Inc. Chap 10-22 2 Test for c Proportions: Example (continued) OpinionUnderGradFacultyTotals Favor 60 30 30 120 Oppose 40 20 20 80 Totals 100 50 50 200 3. Compute Expected Frequency (100)(120)/200=60 (50)(80)/200=20

23
© 2002 Prentice-Hall, Inc. Chap 10-23 2 Test for c Proportions: Example (continued) 4. Compute Test Statistic: f 0 f e (f 0 - f e )(f 0 - f e ) 2 (f 0 - f e ) 2 / f e 6360 3 9.15 2730 -3 9.30 3030 0 0.0 3740 -3 9.225 2320 3 9.45 2020 0 0.0 Test Statistic 2 = 1.125

24
© 2002 Prentice-Hall, Inc. Chap 10-24 2 Test for c Proportions: Example Solution H 0 : p 1 = p 2 = p 3 H 1 : Not All p j Are Equal Decision: Conclusion: df = (c – 1)(r - 1) = 3 - 1 = 2 Reject =.01 2 09.210 Do Not Reject H 0 Since 2 =1.125, there is no evidence of a difference in attitude among the groups.

25
© 2002 Prentice-Hall, Inc. Chap 10-25 2 Test for c Proportions in PHStat PHStat | c-sample tests | chi-square test … Example solution in excel spreadsheet

26
© 2002 Prentice-Hall, Inc. Chap 10-26 2 Test of Independence Shows whether a relationship exists between two factors of interest One sample drawn Each factor has two or more levels of responses Does not show nature of relationship Does not show causality Is similar to testing p 1 = p 2 = … = p c Is used widely in marketing Uses contingency table

27
© 2002 Prentice-Hall, Inc. Chap 10-27 2 Test of Independence: Example A Survey was conducted to determine whether there 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 whether there is a relationship between location and architectural style.

28
© 2002 Prentice-Hall, Inc. Chap 10-28 House Location House StyleUrbanRuralTotal Split-Level6349112 Ranch153348 Total 7882160 2 Test of Independence: Example 1. Set hypothesis: H 0 : the two categorical variables (architectural style and location) are independent H 1 : the two categorical variables are related 2. Contingency table : Levels of Variable 2 Levels of Variable 1 (continued)

29
© 2002 Prentice-Hall, Inc. Chap 10-29 2 Test of Independence: Example (continued) 3. Computing expected frequencies 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 House Location UrbanRural House Style Obs.Exp.Obs.Exp. Total Split-Level6354.64957.4112 Ranch1523.43324.648 Total 78 82 160 78·112 160 82·112 160

30
© 2002 Prentice-Hall, Inc. Chap 10-30 2 Test of Independence: Example (continued) 4. Calculate Test Statistic: f 0 f e (f 0 - f e )(f 0 - f e ) 2 (f 0 - f e ) 2 / f e 6354.6 8.4 70.56 1.292 4957.4 -8.4 70.56 1.229 1523.4 -8.4 70.56 3.015 3324.6 8.4 70.56 2.868 8.404 2 Test Statistic =

31
© 2002 Prentice-Hall, Inc. Chap 10-31 2 Test of Independence: Example Solution H 0 : The two categorical variables (Architectural Style and Location) are independent H 1 : The two categorical variables are related Decision: Conclusion: df = (r - 1)(c - 1) = 1 Reject =.01 2 06.635 Reject H 0 at =.01 Since 2 =8.404, there is evidence that the choice of architectural design and location are related.

32
© 2002 Prentice-Hall, Inc. Chap 10-32 2 Test of Independence in PHStat PHStat | c-sample tests | chi-square test … Example solution in excel spreadsheet

33
© 2002 Prentice-Hall, Inc. Chap 10-33 Chapter Summary Performed Z test for differences in two proportions (independent samples) Discussed test for differences in two proportions (independent samples) Addressed 2 test for differences in c proportions (independent samples) Described 2 test of independence

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google