Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.

Slides:



Advertisements
Similar presentations
Chapter 16 Introduction to Nonparametric Statistics
Advertisements

Chapter 12 Goodness-of-Fit Tests and Contingency Analysis
© 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.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 14 Analysis of Categorical Data
Chapter 12 Chi-Square Tests and Nonparametric Tests
© 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 8 Two Sample Tests with Numerical Data.
Chapter Goals After completing this chapter, you should be able to:
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Basic Business Statistics.
Chapter 17 Analysis of Variance
Statistics for Managers Using Microsoft® Excel 5th Edition
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 15 Analysis of Variance.
Previous Lecture: Analysis of Variance
© 2004 Prentice-Hall, Inc.Chap 10-1 Basic Business Statistics (9 th Edition) Chapter 10 Two-Sample Tests with Numerical Data.
Chap 12-1 Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 12-1 Chapter 12 Chi-Square Tests and Nonparametric Tests Basic Business.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
Basic Business Statistics (9th Edition)
Statistics for Managers Using Microsoft® Excel 5th Edition
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 15 Nonparametric Statistics
1 1 Slide IS 310 – Business Statistics IS 310 Business Statistics CSU Long Beach.
Presentation 12 Chi-Square test.
© 2004 Prentice-Hall, Inc.Chap 12-1 Basic Business Statistics (9 th Edition) Chapter 12 Tests for Two or More Samples with Categorical Data.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 12-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
Chapter 10 Hypothesis Testing
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Business Statistics,
Fundamentals of Hypothesis Testing: One-Sample Tests
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics, A First Course 4 th Edition.
INFERENTIAL STATISTICS: Analysis Of Variance ANOVA
NONPARAMETRIC STATISTICS
Chapter 9 Hypothesis Testing: Single Population
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
© 2002 Prentice-Hall, Inc.Chap 9-1 Statistics for Managers Using Microsoft Excel 3 rd Edition Chapter 9 Analysis of Variance.
1 Measuring Association The contents in this chapter are from Chapter 19 of the textbook. The crimjust.sav data will be used. cjsrate: RATE JOB DONE: CJ.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
Chapter 11 Nonparametric Tests.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
© 2000 Prentice-Hall, Inc. Statistics Nonparametric Statistics Chapter 14.
A Course In Business Statistics 4th © 2006 Prentice-Hall, Inc. Chap 9-1 A Course In Business Statistics 4 th Edition Chapter 9 Estimation and Hypothesis.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
Chap 8-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 8 Introduction to Hypothesis.
Lecture 9 Chap 9-1 Chapter 2b Fundamentals of Hypothesis Testing: One-Sample Tests.
Business Statistics: A First Course, 5e © 2009 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics: A First Course Fifth Edition.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Chap 11-1 Copyright ©2013 Pearson Education, Inc. publishing as Prentice Hall Chapter 11 Chi-Square Tests Business Statistics: A First Course 6 th Edition.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-1 Chapter 12 Chi-Square Tests and Nonparametric Tests Statistics for Managers using.
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
Chapter Outline Goodness of Fit test Test of Independence.
CD-ROM Chap 16-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition CD-ROM Chapter 16 Introduction.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Chapter Fifteen Chi-Square and Other Nonparametric Procedures.
Copyright © 2010, 2007, 2004 Pearson Education, Inc Lecture Slides Elementary Statistics Eleventh Edition and the Triola Statistics Series by.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 8 th Edition Chapter 9 Hypothesis Testing: Single.
1 Nonparametric Statistical Techniques Chapter 18.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Nonparametric Statistics
Test of independence: Contingency Table
Chapter 12 Chi-Square Tests and Nonparametric Tests
Statistics for Managers using Microsoft Excel 3rd Edition
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Chapter 11 Chi-Square Tests.
Chapter 10 Analyzing the Association Between Categorical Variables
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Chapter 11 Chi-Square Tests.
Inference on Categorical Data
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Chapter 11 Chi-Square Tests.
Presentation transcript:

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for Managers Using Microsoft ® Excel 4 th Edition

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-2 Chapter Goals After completing this chapter, you should be able to:  Perform a  2 test for the difference between two proportions  Use a  2 test for differences in more than two proportions  Perform a  2 test of independence  Apply and interpret the Wilcoxon rank sum test for the difference between two medians  Perform nonparametric analysis of variance using the Kruskal-Wallis rank test for one-way ANOVA

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-3 Contingency Tables Useful in situations involving multiple population proportions Used to classify sample observations according to two or more characteristics Also called a cross-classification table.

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-4 Contingency Table Example Left-Handed vs. Gender Dominant Hand: Left vs. Right Gender: Male vs. Female  2 categories for each variable, so called a 2 x 2 table  Suppose we examine a sample of size 300

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-5 Contingency Table Example Sample results organized in a contingency table: (continued) Gender Hand Preference LeftRight Female Male Females, 12 were left handed 180 Males, 24 were left handed sample size = n = 300:

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-6  2 Test for the Difference Between Two Proportions 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 H 0 : p 1 = p 2 (Proportion of females who are left handed is equal to the proportion of males who are left handed) H 1 : p 1 ≠ p 2 (The two proportions are not the same – Hand preference is not independent of gender)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-7 The Chi-Square Test Statistic where: f o = observed frequency in a particular cell f e = expected frequency in a particular cell if H 0 is true  2 for the 2 x 2 case has 1 degree of freedom (Assumed: each cell in the contingency table has expected frequency of at least 5) The Chi-square test statistic is:

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-8 Decision Rule  2U2U Decision Rule: If  2 >  2 U, reject H 0, otherwise, do not reject H 0 The  2 test statistic approximately follows a chi- squared distribution with one degree of freedom 0  Reject H 0 Do not reject H 0

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-9 Computing the Average Proportion Here: 120 Females, 12 were left handed 180 Males, 24 were left handed i.e., the proportion of left handers overall is 12% The average proportion is:

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Finding Expected Frequencies 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

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Observed vs. Expected Frequencies Gender Hand Preference LeftRight Female Observed = 12 Expected = 14.4 Observed = 108 Expected = Male Observed = 24 Expected = 21.6 Observed = 156 Expected =

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Gender Hand Preference LeftRight Female Observed = 12 Expected = 14.4 Observed = 108 Expected = Male Observed = 24 Expected = 21.6 Observed = 156 Expected = The Chi-Square Test Statistic The test statistic is:

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Decision Rule Decision Rule: If  2 > 3.841, reject H 0, otherwise, do not reject H 0 Here,  2 = <  2 U = 3.841, so we do not reject H 0 and conclude that there is not sufficient evidence that the two proportions are different at  =.05   2 U =  Reject H 0 Do not reject H 0

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Extend the  2 test to the case with more than two independent populations:  2 Test for the Differences in More Than Two Proportions H 0 : p 1 = p 2 = … = p c H 1 : Not all of the p j are equal (j = 1, 2, …, c)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap The Chi-Square Test Statistic where: f o = observed frequency in a particular cell of the 2 x c table f e = expected frequency in a particular cell if H 0 is true  2 for the 2 x c case has (2-1)(c-1) = c - 1 degrees of freedom (Assumed: each cell in the contingency table has expected frequency of at least 1) The Chi-square test statistic is:

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Computing the Overall Proportion The overall proportion is: 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  2 >  2 U, reject H 0, otherwise, do not reject H 0 Where  2 U is from the chi-squared distribution with c – 1 degrees of freedom

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap  2 Test of Independence 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)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap  2 Test of Independence where: f o = observed frequency in a particular cell of the r x c table f e = expected frequency in a particular cell if H 0 is true  2 for the r x c case has (r-1)(c-1) degrees of freedom (Assumed: each cell in the contingency table has expected frequency of at least 1) The Chi-square test statistic is: (continued)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Expected Cell Frequencies 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

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Decision Rule The decision rule is If  2 >  2 U, reject H 0, otherwise, do not reject H 0 Where  2 U is from the chi-squared distribution with (r – 1)(c – 1) degrees of freedom

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Example The meal plan selected by 200 students is shown below: Class Standing Number of meals per week Total 20/week10/weeknone Fresh Soph Junior Senior Total

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Example The hypothesis to be tested is: (continued) 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)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Class Standing Number of meals per week Total 20/wk10/wknone Fresh Soph Junior Senior Total Class Standing Number of meals per week Total 20/wk10/wknone Fresh Soph Junior Senior Total Observed: Expected cell frequencies if H 0 is true: Example for one cell: Example: Expected Cell Frequencies (continued)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Example: The Test Statistic The test statistic value is: (continued)  2 U = for α =.05 from the chi-squared distribution with (4 – 1)(3 – 1) = 6 degrees of freedom

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Example: Decision and Interpretation (continued) Decision Rule: If  2 > , reject H 0, otherwise, do not reject H 0 Here,  2 = <  2 U = , so do not reject H 0 Conclusion: there is not sufficient evidence that meal plan and class standing are related at  =.05   2 U =  Reject H 0 Do not reject H 0

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test for Differences in 2 Medians Test two independent population medians Populations need not be normally distributed Distribution free procedure Used when only rank data are available Must use normal approximation if either of the sample sizes is larger than 10

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test: Small Samples Can use when both n 1, n 2 ≤ 10 Assign ranks to the combined n 1 + n 2 sample observations If unequal sample sizes, let n 1 refer to smaller-sized sample Smallest value rank = 1, largest value rank = n 1 + n 2 Assign average rank for ties Sum the ranks for each sample: T 1 and T 2 Obtain test statistic, T 1 (from smaller sample)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Checking the Rankings The sum of the rankings must satisfy the formula below Can use this to verify the sums T 1 and T 2 where n = n 1 + n 2

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test: Hypothesis and Decision Rule H 0 : M 1 = M 2 H 1 : M 1  M 2 H 0 : M 1  M 2 H 1 : M 1  M 2 H 0 : M 1  M 2 H 1 : M 1  M 2 Two-Tail TestLeft-Tail TestRight-Tail Test M 1 = median of population 1; M 2 = median of population 2 Reject T 1L T 1U Reject Do Not Reject Reject T 1L Do Not Reject T 1U Reject Do Not Reject Test statistic = T 1 (Sum of ranks from smaller sample) Reject H 0 if T 1 < T 1L or if T 1 > T 1U Reject H 0 if T 1 < T 1L Reject H 0 if T 1 > T 1U

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Sample data is collected on the capacity rates (% of capacity) for two factories. Are the median operating rates for two factories the same? For factory A, the rates are 71, 82, 77, 94, 88 For factory B, the rates are 85, 82, 92, 97 Test for equality of the sample medians at the 0.05 significance level Wilcoxon Rank-Sum Test: Small Sample Example

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test: Small Sample Example CapacityRank Factory AFactory BFactory AFactory B Rank Sums: Tie in 3 rd and 4 th places Ranked Capacity values: (continued)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test: Small Sample Example (continued) Factory B has the smaller sample size, so the test statistic is the sum of the Factory B ranks: T 1 = 24.5 The sample sizes are: n 1 = 4 (factory B) n 2 = 5 (factory A) The level of significance is α =.05

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap n2n2  n1n1 One- Tailed Two- Tailed , 2819, , 2917, , 3016, , --15, 40 6 Wilcoxon Rank-Sum Test: Small Sample Example Lower and Upper Critical Values for T 1 from Appendix table E.8: (continued) T 1L = 11 and T 1U = 29

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap H 0 : M 1 = M 2 H 1 : M 1  M 2 Two-Tail Test Reject T 1L =11T 1U =29 Reject Do Not Reject Reject H 0 if T 1 < T 1L =11 or if T 1 > T 1U =29  =.05 n 1 = 4, n 2 = 5 Test Statistic (Sum of ranks from smaller sample): T 1 = 24.5 Decision: Conclusion: Do not reject at  = 0.05 There is not enough evidence to prove that the medians are not equal. Wilcoxon Rank-Sum Test: Small Sample Solution (continued)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test (Large Sample) For large samples, the test statistic T 1 is approximately normal with mean and standard deviation : Must use the normal approximation if either n 1 or n 2 > 10 Assign n 1 to be the smaller of the two sample sizes Can use the normal approximation for small samples

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test (Large Sample) The Z test statistic is Where Z approximately follows a standardized normal distribution (continued)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test: Normal Approximation Example Use the setting of the prior example: The sample sizes were: n 1 = 4 (factory B) n 2 = 5 (factory A) The level of significance was α =.05 The test statistic was T 1 = 24.5

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Wilcoxon Rank-Sum Test: Normal Approximation Example The test statistic is (continued) Z = 1.64 is not greater than the critical Z value of 1.96 (for α =.05) so we do not reject H 0 – there is not sufficient evidence that the medians are not equal

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Kruskal-Wallis Rank Test Tests the equality of more than 2 population medians Use when the normality assumption for one- way ANOVA is violated Assumptions: The samples are random and independent variables have a continuous distribution the data can be ranked populations have the same variability populations have the same shape

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Kruskal-Wallis Test Procedure Obtain relative rankings for each value In event of tie, each of the tied values gets the average rank Sum the rankings for data from each of the c groups Compute the H test statistic

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Kruskal-Wallis Test Procedure The Kruskal-Wallis H test statistic: (with c – 1 degrees of freedom) where: n = sum of sample sizes in all samples c = Number of samples T j = Sum of ranks in the j th sample n j = Size of the j th sample (continued)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Decision rule Reject H 0 if test statistic H >  2 U Otherwise do not reject H 0 (continued) Kruskal-Wallis Test Procedure Complete the test by comparing the calculated H value to a critical  2 value from the chi-square distribution with c – 1 degrees of freedom  2U2U 0  Reject H 0 Do not reject H 0

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Do different departments have different class sizes? Kruskal-Wallis Example Class size (Math, M) Class size (English, E) Class size (Biology, B)

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Do different departments have different class sizes? Kruskal-Wallis Example Class size (Math, M) Ranking Class size (English, E) Ranking Class size (Biology, B) Ranking  = 44  = 56  = 20

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap The H statistic is (continued) Kruskal-Wallis Example

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Since H = 6.72 < do not reject H 0 (continued) Kruskal-Wallis Example Compare H = 6.72 to the critical value from the chi-square distribution for 5 – 1 = 4 degrees of freedom and  =.05: There is not sufficient evidence to reject that the population medians are all equal

Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap Chapter Summary 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 Used the Wilcoxon rank sum test for two population medians Small Samples Large sample Z approximation Applied the Kruskal-Wallis H-test for multiple population medians