Statistics for Business and Economics Chapter 9 Categorical Data Analysis.

Slides:



Advertisements
Similar presentations
1 2 Test for Independence 2 Test for Independence.
Advertisements

1 2 Test for Independence 2 Test for Independence.
Overview of Lecture Parametric vs Non-Parametric Statistical Tests.
Chapter 7 Sampling and Sampling Distributions
EPI809/Spring Chapter 10 Hypothesis testing: Categorical Data Analysis.
Statistics for Business and Economics
Chapter 13: Chi-Square Test
© 2011 Pearson Education, Inc
Chapter 16 Goodness-of-Fit Tests and Contingency Tables
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chi-Square Tests Chapter 12.
Categorical Data Analysis
 2 Test of Independence. Hypothesis Tests Categorical Data.
Chi Squared Tests. Introduction Two statistical techniques are presented. Both are used to analyze nominal data. –A goodness-of-fit test for a multinomial.
1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Chapter 12 Goodness-of-Fit Tests and Contingency Analysis
Inference about the Difference Between the
© 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 13: The Chi-Square Test
Discrete (Categorical) Data Analysis
1 1 Slide © 2009 Econ-2030-Applied Statistics-Dr. Tadesse. Chapter 11: Comparisons Involving Proportions and a Test of Independence n Inferences About.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter Goals After completing this chapter, you should be able to:
Chapter 16 Chi Squared Tests.
Previous Lecture: Analysis of Variance
Cross-Tabulations.
Chapter 12 Chi-Square Tests and Nonparametric Tests
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide IS 310 – Business Statistics IS 310 Business Statistics CSU Long Beach.
© 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.
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.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
1 1 Slide IS 310 – Business Statistics IS 310 Business Statistics CSU Long Beach.
1 1 Slide © 2005 Thomson/South-Western Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial Population Goodness of.
Chapter 11: Applications of Chi-Square. Count or Frequency Data Many problems for which the data is categorized and the results shown by way of counts.
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.
1 1 Slide © 2006 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 In this case, each element of a population is assigned to one and only one of several classes or categories. Chapter 11 – Test of Independence - Hypothesis.
1 1 Slide Chapter 11 Comparisons Involving Proportions n Inference about the Difference Between the Proportions of Two Populations Proportions of Two Populations.
Other Chi-Square Tests
© 2000 Prentice-Hall, Inc. Statistics The Chi-Square Test & The Analysis of Contingency Tables Chapter 13.
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.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
1 1 Slide © 2009 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
1/71 Statistics Tests of Goodness of Fit and Independence.
Chapter Outline Goodness of Fit test Test of Independence.
11.2 Tests Using Contingency Tables When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Test of independence: Contingency Table
Chapter 11 – Test of Independence - Hypothesis Test for Proportions of a Multinomial Population In this case, each element of a population is assigned.
Chapter 12 Chi-Square Tests and Nonparametric Tests
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Chapter 11 Chi-Square Tests.
Chapter 12 Tests with Qualitative Data
John Loucks St. Edward’s University . SLIDES . BY.
Statistics for Business and Economics (13e)
Econ 3790: Business and Economics Statistics
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
CHI SQUARE TEST OF INDEPENDENCE
Chapter Outline Goodness of Fit test Test of Independence.
Chapter 11 Chi-Square Tests.
Presentation transcript:

Statistics for Business and Economics Chapter 9 Categorical Data Analysis

Learning Objectives 1.Explain 2 Test for Proportions 2.Explain 2 Test of Independence 3.Solve Hypothesis Testing Problems More Than Two Population Proportions Independence

Data Types Data QuantitativeQualitative ContinuousDiscrete

Qualitative Data Qualitative random variables yield responses that classify –Example: gender (male, female) Measurement reflects number in category Nominal or ordinal scale Examples –What make of car do you drive? –Do you live on-campus or off-campus?

Hypothesis Tests Qualitative Data Qualitative Data Z Test 2 Test ProportionIndependence 1 pop. 2 Test More than 2 pop.

Chi-Square ( 2 ) Test for k Proportions

Hypothesis Tests Qualitative Data Qualitative Data Z Test 2 Test ProportionIndependence 1 pop. 2 Test More than 2 pop.

Multinomial Experiment n identical trials k outcomes to each trial Constant outcome probability, p k Independent trials Random variable is count, n k Example: ask 100 people (n) which of 3 candidates (k) they will vote for

One-Way Contingency Table Shows number of observations in k independent groups (outcomes or variable levels) Outcomes (k = 3) Number of responses Candidate TomBillMaryTotal

: – H: Prof (Tom) = Prob (Mary)=Prof(Bill)=1/3 –H1: Prof (Tom) = 1/3 –H2: Prof (Mary) = 1/3 –H3: Prof (Bill) = 1/3

Calculate the probability of incorrectly rejecting the null using the common sense test based on the three individual t-statistics. To simplify the calculation, suppose that, and are independently distributed. Let t 1 and t 2 be the t-statistics. The common sense test is reject if |t 1 |>1.96 and/or |t 2 | > 1.96 and/or |t 3 | > What is the probability that this common sense test rejects H 0 when H 0 is actually true? (It should be 5%.) 11

Probability of incorrectly rejecting the null 12

which is not the desired 5%. 13

The size of a test is the actual rejection rate under the null hypothesis. The size of the common sense test isnt 5%. Its size actually depends on the correlation between t 1 t 2 and t 3 (and thus on the correlation between and ). Two Solutions. Use a different critical value in this procedure - not 1.96 (this is the Bonferroni method). This is rarely used in practice. Use a different test statistic that test at once 14

Chi-Square ( 2 ) Test for k Proportions Tests equality (=) of proportions only –Example: p 1 =.2, p 2 =.3, p 3 =.5 One variable with several levels Uses one-way contingency table

Conditions Required for a Valid Test: One-way Table 1.A multinomial experiment has been conducted 2.The sample size n is large: E(n i ) is greater than or equal to 5 for every cell

2 Test for k Proportions Hypotheses & Statistic 2.Test Statistic Observed count Expected count: E(n i ) = np i,0 3.Degrees of Freedom: k – 1 Number of outcomes Hypothesized probability 1.Hypotheses H 0 : p 1 = p 1,0, p 2 = p 2,0,..., p k = p k,0 H a : At least one p i is different from above

2 Test Basic Idea 1.Compares observed count to expected count assuming null hypothesis is true 2.Closer observed count is to expected count, the more likely the H 0 is true Measured by squared difference relative to expected count Reject large values

Finding Critical Value Example What is the critical 2 value if k = 3, and =.05? 2 0 Upper Tail Area DF.995….95… …0.004… …0.103… Table (Portion) If n i = E(n i ), 2 = 0. Do not reject H 0 df= k - 1 = Reject H 0 =.05

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 of significance, is there a difference in perceptions? 2 Test for k Proportions Example

H 0 : H a : = n 1 = n 2 = n 3 = Critical Value(s): Test Statistic: Decision: Conclusion: p 1 = p 2 = p 3 = 1/3 At least 1 is different = Reject H Test for k Proportions Solution

Test Statistic: Decision: Conclusion: 2 = 6.3 Reject at =.05 There is evidence of a difference in proportions 2 Test for k Proportions Solution H 0 : H a : = n 1 = n 2 = n 3 = Critical Value(s): 2 0 Reject H 0 p 1 = p 2 = p 3 = 1/3 At least 1 is different =.05

Hypothesis Tests Qualitative Data Qualitative Data Z TestZ, Chi 2 Test ProportionIndependence 1 pop. 2 Test More than 2 pop.

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 300 children

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:

H 0 : H a : = n 1 = n 2 = Critical Value(s): Test Statistic: Decision: Conclusion: p 1 = p 2 At least 1 is different = Reject H Contingency Table Example Solution

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

H 0 : H a : = n 1 = n 2 = Critical Value(s): Test Statistic: Decision: Conclusion: p 1 = p 2 At least 1 is different = Reject H Contingency Table Example Solution 2 = Reject at =.05 There is evidence of a difference in proportions

2 Test of Independence

Hypothesis Tests Qualitative Data Qualitative Data Z Test 2 Test ProportionIndependence 1 pop. 2 Test More than 2 pop.

2 Test of Independence Shows if a relationship exists between two qualitative variables –One sample is drawn –Does not show causality Uses two-way contingency table

2 Test of Independence Contingency Table Shows number of observations from 1 sample jointly in 2 qualitative variables Levels of variable 2 Levels of variable 1

Conditions Required for a Valid 2 Test: Independence 1.Multinomial experiment has been conducted 2.The sample size, n, is large: E ij is greater than or equal to 5 for every cell

2 Test of Independence Hypotheses & Statistic 1.Hypotheses H 0 : Variables are independent H a : Variables are related (dependent) 3.Degrees of Freedom: (r – 1)(c – 1) Rows Columns 2.Test Statistic Observed count Expected count

2 Test of Independence Expected Counts 1.Statistical independence means joint probability equals product of marginal probabilities 2.Compute marginal probabilities and multiply for joint probability 3.Expected count is sample size times joint probability

Marginal probability = Expected Count Example Location UrbanRural House Style Obs. Obs.Total Split–Level Ranch Total

Marginal probability = Expected Count Example Marginal probability = Location UrbanRural House Style Obs. Obs.Total Split–Level Ranch Total

Expected Count Example Marginal probability = Marginal probability = Joint probability = Location UrbanRural House Style Obs. Obs.Total Split–Level Ranch Total Expected count = 160· = 54.6

Expected Count Calculation House Location Urban Rural House Style Obs. Exp. Obs. Exp. Total Split-Level · · Ranch 15 48· · Total

As a realtor you want to determine if house style and house location are related. At the.05 level of significance, is there evidence of a relationship? 2 Test of Independence Example

2 Test of Independence Solution H 0 : H a : = df = Critical Value(s): Test Statistic: Decision: Conclusion: No Relationship Relationship.05 (2 - 1)(2 - 1) = Reject H =.05

E ij 5 in all cells 2 Test of Independence Solution 112· · · ·78 160

2 Test of Independence Solution

Test Statistic: Decision: Conclusion: 2 = 8.41 Reject at =.05 There is evidence of a relationship H 0 : H a : = df = Critical Value(s): 2 0 Reject H 0 No Relationship Relationship.05 (2 - 1)(2 - 1) = =.05

Youre a marketing research analyst. You ask a random sample of 286 consumers if they purchase Diet Pepsi or Diet Coke. At the.05 level of significance, is there evidence of a relationship? 2 Test of Independence Thinking Challenge Diet Pepsi Diet CokeNoYesTotal No Yes Total

2 Test of Independence Solution* H 0 : H a : = df = Critical Value(s): Test Statistic: Decision: Conclusion: No Relationship Relationship.05 (2 - 1)(2 - 1) = Reject H =.05

E ij 5 in all cells 170· · · · Test of Independence Solution*

Test Statistic: Decision: Conclusion: 2 = Reject at =.05 There is evidence of a relationship H 0 : H a : = df = Critical Value(s): 2 0 Reject H 0 No Relationship Relationship.05 (2 - 1)(2 - 1) = =.05

Example The meal plan selected by 200 students is shown below: Class Standing Number of meals per week Total 20/wee k 10/weeknone Fresh Soph Junior Senior Total

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)

Class Standin g 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)

Example: The Test Statistic The test statistic value is: (continued) = from the chi-squared distribution with (4 – 1)(3 – 1) = 6 degrees of freedom

Example: Decision and Interpretation (continued) Decision Rule: If > , reject H 0, otherwise, do not reject H 0 Here, = < = , so do not reject H 0 Conclusion: there is not sufficient evidence that meal plan and class standing are related at = = Reject H 0 Do not reject H 0

Conclusion 1.Explained 2 Test for Proportions 2.Explained 2 Test of Independence 3.Solved Hypothesis Testing Problems More Than Two Population Proportions Independence