© 2000 Prentice-Hall, Inc. Statistics The Chi-Square Test & The Analysis of Contingency Tables Chapter 13
© 2000 Prentice-Hall, Inc. Learning Objectives 1.Explain 2 Test for Proportions 2.Explain 2 Test of Independence 3.Solve Hypothesis Testing Problems Two or More Population Proportions Two or More Population Proportions Independence Independence
© 2000 Prentice-Hall, Inc. Data Types
© 2000 Prentice-Hall, Inc. Qualitative Data 1.Qualitative Random Variables Yield Responses That Classify Example: Gender (Male, Female) Example: Gender (Male, Female) 2.Measurement Reflects # in Category 3.Nominal or Ordinal Scale 4.Examples Do You Own Savings Bonds? Do You Own Savings Bonds? Do You Live On-Campus or Off-Campus? Do You Live On-Campus or Off-Campus?
© 2000 Prentice-Hall, Inc. Hypothesis Tests Qualitative Data
© 2000 Prentice-Hall, Inc. Chi-Square ( 2 ) Test for k Proportions
© 2000 Prentice-Hall, Inc. Hypothesis Tests Qualitative Data
© 2000 Prentice-Hall, Inc. Chi-Square ( 2 ) Test for k Proportions 1.Tests Equality (=) of Proportions Only Example: p 1 =.2, p 2 =.3, p 3 =.5 Example: p 1 =.2, p 2 =.3, p 3 =.5 2.One Variable With Several Levels 3.Assumptions Multinomial Experiment Multinomial Experiment Large Sample Size Large Sample Size All Expected Counts 5 All Expected Counts 5 4.Uses One-Way Contingency Table
© 2000 Prentice-Hall, Inc. Multinomial Experiment 1.n Identical Trial 2.k Outcomes to Each Trial 3.Constant Outcome Probability, p k 4.Independent Trials 5.Random Variable is Count, n k 6.Example: Ask 100 People (n) Which of 3 Candidates (k) They Will Vote For
© 2000 Prentice-Hall, Inc. One-Way Contingency Table 1.Shows # Observations in k Independent Groups (Outcomes or Variable Levels)
© 2000 Prentice-Hall, Inc. One-Way Contingency Table 1.Shows # Observations in k Independent Groups (Outcomes or Variable Levels) Outcomes (k = 3) Number of responses
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Hypotheses & Statistic
© 2000 Prentice-Hall, Inc. 1.Hypotheses H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H a : Not all p i are equal H a : Not all p i are equal 2 Test for k Proportions Hypotheses & Statistic Hypothesized probability
© 2000 Prentice-Hall, Inc. 1.Hypotheses H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H a : Not all p i are equal H a : Not all p i are equal 2.Test Statistic 2 Test for k Proportions Hypotheses & Statistic Observed count Expected count Hypothesized probability
© 2000 Prentice-Hall, Inc. 1.Hypotheses H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H a : Not all p i are equal H a : Not all p i are equal 2.Test Statistic 3.Degrees of Freedom: k - 1 2 Test for k Proportions Hypotheses & Statistic Observed count Expected count Number of outcomes Hypothesized probability
© 2000 Prentice-Hall, Inc. 2 Test Basic Idea 1.Compares Observed Count to Expected Count If Null Hypothesis Is True 2.Closer Observed Count to Expected Count, the More Likely the H 0 Is True Measured by Squared Difference Relative to Expected Count Measured by Squared Difference Relative to Expected Count Reject Large Values Reject Large Values
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05?
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? 2 Table (Portion)
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? 2 Table (Portion) If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) df= k - 1 = 2 If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) df= k - 1 = 2 If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) df= k - 1 = 2 If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) df= k - 1 = 2 If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. Finding Critical Value Example What is the critical 2 value if k = 3, & =.05? =.05 2 Table (Portion) df= k - 1 = 2 If n i = E(n i ), 2 = 0. Do not reject H 0
© 2000 Prentice-Hall, Inc. As personnel director, you want to test the perception of fairness of three methods of performance evaluation. Of 180 employees, 63 rated Method 1 as fair. 45 rated Method 2 as fair. 72 rated Method 3 as fair. At the.05 level, is there a difference in perceptions? 2 Test for k Proportions Example
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : H a : = n 1 = n 2 = n 3 = Critical Value(s): Test Statistic: Decision:Conclusion:
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : p 1 = p 2 = p 3 = 1/3 H a : At least 1 is different = n 1 = n 2 = n 3 = Critical Value(s): Test Statistic: Decision:Conclusion:
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : p 1 = p 2 = p 3 = 1/3 H a : At least 1 is different =.05 n 1 = 63 n 2 = 45 n 3 = 72 Critical Value(s): Test Statistic: Decision:Conclusion:
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : p 1 = p 2 = p 3 = 1/3 H a : At least 1 is different =.05 n 1 = 63 n 2 = 45 n 3 = 72 Critical Value(s): Test Statistic: Decision:Conclusion: =.05
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : p 1 = p 2 = p 3 = 1/3 H a : At least 1 is different =.05 n 1 = 63 n 2 = 45 n 3 = 72 Critical Value(s): Test Statistic: Decision:Conclusion: =.05 2 = 6.3
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : p 1 = p 2 = p 3 = 1/3 H a : At least 1 is different =.05 n 1 = 63 n 2 = 45 n 3 = 72 Critical Value(s): Test Statistic: Decision:Conclusion: =.05 2 = 6.3 Reject at =.05
© 2000 Prentice-Hall, Inc. 2 Test for k Proportions Solution H 0 : p 1 = p 2 = p 3 = 1/3 H a : At least 1 is different =.05 n 1 = 63 n 2 = 45 n 3 = 72 Critical Value(s): Test Statistic: Decision:Conclusion: Reject at =.05 There is evidence of a difference in proportions =.05 2 = 6.3
© 2000 Prentice-Hall, Inc. 2 Test of Independence
© 2000 Prentice-Hall, Inc. Hypothesis Tests Qualitative Data
© 2000 Prentice-Hall, Inc. 2 Test of Independence 1.Shows If a Relationship Exists Between 2 Qualitative Variables One Sample Is Drawn One Sample Is Drawn Does Not Show Causality Does Not Show Causality 2.Assumptions Multinomial Experiment Multinomial Experiment All Expected Counts 5 All Expected Counts 5 3.Uses Two-Way Contingency Table
© 2000 Prentice-Hall, Inc. 2 Test of Independence Contingency Table 1.Shows # Observations From 1 Sample Jointly in 2 Qualitative Variables
© 2000 Prentice-Hall, Inc. 2 Test of Independence Contingency Table 1.Shows # Observations From 1 Sample Jointly in 2 Qualitative Variables Levels of variable 2 Levels of variable 1
© 2000 Prentice-Hall, Inc. 2 Test of Independence Hypotheses & Statistic 1.Hypotheses H 0 : Variables Are Independent H 0 : Variables Are Independent H a : Variables Are Related (Dependent) H a : Variables Are Related (Dependent)
© 2000 Prentice-Hall, Inc. 2 Test of Independence Hypotheses & Statistic 1.Hypotheses H 0 : Variables Are Independent H 0 : Variables Are Independent H a : Variables Are Related (Dependent) H a : Variables Are Related (Dependent) 2.Test Statistic Observed count Expected count
© 2000 Prentice-Hall, Inc. 2 Test of Independence Hypotheses & Statistic 1.Hypotheses H 0 : Variables Are Independent H 0 : Variables Are Independent H a : Variables Are Related (Dependent) H a : Variables Are Related (Dependent) 2.Test Statistic Degrees of Freedom: (r - 1)(c - 1) Rows Columns Observed count Expected count
© 2000 Prentice-Hall, Inc. 2 Test of Independence Expected Counts 1.Statistical Independence Means Joint Probability Equals Product of Marginal Probabilities 2.Compute Marginal Probabilities & Multiply for Joint Probability 3.Expected Count Is Sample Size Times Joint Probability
© 2000 Prentice-Hall, Inc. Expected Count Example
© 2000 Prentice-Hall, Inc. Expected Count Example
© 2000 Prentice-Hall, Inc. Expected Count Example Marginal probability =
© 2000 Prentice-Hall, Inc. Expected Count Example Marginal probability =
© 2000 Prentice-Hall, Inc. Expected Count Example Marginal probability = Joint probability =
© 2000 Prentice-Hall, Inc. Expected Count Example Marginal probability = Joint probability = Expected count = 160· = 54.6
© 2000 Prentice-Hall, Inc. Expected Count Calculation
© 2000 Prentice-Hall, Inc. Expected Count Calculation
© 2000 Prentice-Hall, Inc. Expected Count Calculation 112· · · ·78 160
© 2000 Prentice-Hall, Inc. You’re a marketing research analyst. You ask a random sample of 286 consumers if they purchase Diet Pepsi or Diet Coke. At the.05 level, is there evidence of a relationship? 2 Test of Independence Example
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : H a : = df = Critical Value(s): Test Statistic: Decision:Conclusion:
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : No Relationship H a : Relationship = df = Critical Value(s): Test Statistic: Decision:Conclusion:
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : No Relationship H a : Relationship =.05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision:Conclusion:
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : No Relationship H a : Relationship =.05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision:Conclusion: =.05
© 2000 Prentice-Hall, Inc. E(n ij ) 5 in all cells 170· · · · 2 Test of Independence Solution
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : No Relationship H a : Relationship =.05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision:Conclusion: =.05 2 = 54.29
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : No Relationship H a : Relationship =.05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision:Conclusion: Reject at =.05 =.05 2 = 54.29
© 2000 Prentice-Hall, Inc. 2 Test of Independence Solution H 0 : No Relationship H a : Relationship =.05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision:Conclusion: Reject at =.05 There is evidence of a relationship =.05 2 = 54.29
© 2000 Prentice-Hall, Inc. OK. There is a statistically significant relationship between purchasing Diet Coke & Diet Pepsi. So what do you think the relationship is? Aren’t they competitors? 2 Test of Independence Thinking Challenge
© 2000 Prentice-Hall, Inc. You Re-Analyze the Data
© 2000 Prentice-Hall, Inc. You Re-Analyze the Data High Income
© 2000 Prentice-Hall, Inc. You Re-Analyze the Data Low Income High Income
© 2000 Prentice-Hall, Inc. True Relationships* Apparent relation Underlying causal relation Control or intervening variable (true cause) Diet Coke Diet Pepsi
© 2000 Prentice-Hall, Inc. Moral of the Story* Numbers don’t think - People do! © T/Maker Co.
© 2000 Prentice-Hall, Inc. Conclusion 1.Explained 2 Test for Proportions 2.Explained 2 Test of Independence 3.Solved Hypothesis Testing Problems Two or More Population Proportions Two or More Population Proportions Independence Independence
End of Chapter Any blank slides that follow are blank intentionally.