Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Goodness-of-Fit Tests.
Advertisements

Chapter 13: The Chi-Square Test
Chapter 13: Inference for Distributions of Categorical Data
Copyright ©2011 Brooks/Cole, Cengage Learning More about Inference for Categorical Variables Chapter 15 1.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Categorical Variables Chapter 15.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 25, Slide 1 Chapter 25 Comparing Counts.
Chapter 26: Comparing Counts
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
Review for Exam 2 Some important themes from Chapters 6-9 Chap. 6. Significance Tests Chap. 7: Comparing Two Groups Chap. 8: Contingency Tables (Categorical.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
Presentation 12 Chi-Square test.
Chapter 13 Chi-Square Tests. The chi-square test for Goodness of Fit allows us to determine whether a specified population distribution seems valid. The.
Chapter 10 Analyzing the Association Between Categorical Variables
How Can We Test whether Categorical Variables are Independent?
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.3 Determining.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.3 Determining.
Goodness-of-Fit Tests and Categorical Data Analysis
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 26 Comparing Counts.
Chapter 26: Comparing Counts AP Statistics. Comparing Counts In this chapter, we will be performing hypothesis tests on categorical data In previous chapters,
Copyright © 2010 Pearson Education, Inc. Warm Up- Good Morning! If all the values of a data set are the same, all of the following must equal zero except.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
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.
Chi-Square as a Statistical Test Chi-square test: an inferential statistics technique designed to test for significant relationships between two variables.
Chi-square test or c2 test
Chapter 16 – Categorical Data Analysis Math 22 Introductory Statistics.
Copyright © 2004 Pearson Education, Inc.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.4 Analyzing Dependent Samples.
Slide 26-1 Copyright © 2004 Pearson Education, Inc.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
+ Chi Square Test Homogeneity or Independence( Association)
Chapter 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for.
Statistical Significance for a two-way table Inference for a two-way table We often gather data and arrange them in a two-way table to see if two categorical.
Copyright © 2010 Pearson Education, Inc. Slide
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
1 Chapter 11: Analyzing the Association Between Categorical Variables Section 11.1: What is Independence and What is Association?
Chapter 11: Chi-Square  Chi-Square as a Statistical Test  Statistical Independence  Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
1 Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION.
Slide 1 Copyright © 2004 Pearson Education, Inc..
Copyright © 2010 Pearson Education, Inc. Warm Up- Good Morning! If all the values of a data set are the same, all of the following must equal zero except.
© Copyright McGraw-Hill 2004
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
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.
Comparing Counts Chapter 26. Goodness-of-Fit A test of whether the distribution of counts in one categorical variable matches the distribution predicted.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
Chapter 10 Section 5 Chi-squared Test for a Variance or Standard Deviation.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.3 Other Ways of Comparing Means and Comparing Proportions.
Slide 1 Copyright © 2004 Pearson Education, Inc. Chapter 11 Multinomial Experiments and Contingency Tables 11-1 Overview 11-2 Multinomial Experiments:
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 1 FINAL EXAMINATION STUDY MATERIAL III A ADDITIONAL READING MATERIAL – INTRO STATS 3 RD EDITION.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.1 Independence.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.
Chapter 12 Tests with Qualitative Data
Chapter 11: Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Contingency Tables: Independence and Homogeneity
Analyzing the Association Between Categorical Variables
Chapter 26 Comparing Counts Copyright © 2009 Pearson Education, Inc.
Presentation transcript:

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical Variables for Independence

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 3 Testing Categorical Variables for Independence Create a table of frequencies divided into the categories of the two variables:  The hypotheses for the test are: : The two variables are independent. : The two variables are dependent (associated). The test assumes random sampling and a large sample size (cell counts in the frequency table of at least 5).

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 4 Expected Cell Counts If the Variables Are Independent The count in any particular cell is a random variable.  Different samples have different count values. The mean of its distribution is called an expected cell count.  This is found under the presumption that is true.

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 5 How Do We Find the Expected Cell Counts? Expected Cell Count: For a particular cell, The expected frequencies are values that have the same row and column totals as the observed counts, but for which the conditional distributions are identical (this is the assumption of the null hypothesis).

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 6 Table 11.5 Happiness by Family Income, Showing Observed and Expected Cell Counts. We use the highlighted totals to get the expected count of = (315 * 423)/1993 in the first cell. How Do We Find the Expected Cell Counts?

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 7 Chi-Squared Test Statistic The chi-squared statistic summarizes how far the observed cell counts in a contingency table fall from the expected cell counts for a null hypothesis.

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 8 State the null and alternative hypotheses for this test.  : Happiness and family income are independent  : Happiness and family income are dependent (associated) Example: Happiness and Family Income

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 9 Report the statistic and explain how it was calculated.  To calculate the statistic, for each cell, calculate:  Sum the values for all the cells.  The value is Example: Happiness and Family Income

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 10 Example: Happiness and Family Income

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 11 Insight: The larger the value, the greater the evidence against the null hypothesis of independence and in support of the alternative hypothesis that happiness and income are associated. The Chi-Squared Test Statistic

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 12 The Chi-Squared Distribution To convert the test statistic to a P-value, we use the sampling distribution of the statistic. For large sample sizes, this sampling distribution is well approximated by the chi-squared probability distribution.

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 13 Figure 11.3 The Chi-Squared Distribution. The curve has larger mean and standard deviation as the degrees of freedom increase. Question: Why can’t the chi-squared statistic be negative? The Chi-Squared Distribution

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 14 Main properties of the chi-squared distribution:  It falls on the positive part of the real number line.  The precise shape of the distribution depends on the degrees of freedom: The Chi-Squared Distribution

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 15 Main properties of the chi-squared distribution (cont’d):  The mean of the distribution equals the df value.  It is skewed to the right.  The larger the value, the greater the evidence against : independence. The Chi-Squared Distribution

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 16 Table 11.7 Rows of Table C Displaying Chi-Squared Values. The values have right-tail probabilities between and For a table with r = 3 rows and c = 3 columns, df = (r - 1) x (c - 1) = 4, and 9.49 is the chi-squared value with a right-tail probability of The Chi-Squared Distribution

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 17 The Five Steps of the Chi-Squared Test of Independence 1.Assumptions:  Two categorical variables  Randomization  Expected counts in all cells

Copyright © 2013, 2009, and 2007, Pearson Education, Inc Hypotheses:  The two variables are independent  The two variables are dependent (associated) The Five Steps of the Chi-Squared Test of Independence

Copyright © 2013, 2009, and 2007, Pearson Education, Inc Test Statistic: The Five Steps of the Chi-Squared Test of Independence

Copyright © 2013, 2009, and 2007, Pearson Education, Inc P-value:  Right-tail probability above the observed value, for the chi-squared distribution with. 5. Conclusion:  Report P-value and interpret in context. If a decision is needed, reject when P-value significance level. The Five Steps of the Chi-Squared Test of Independence

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 21 Chi-Squared is Also Used as a “Test of Homogeneity” The chi-squared test does not depend on which is the response variable and which is the explanatory variable. When a response variable is identified and the population conditional distributions are identical, they are said to be homogeneous.  The test is then referred to as a test of homogeneity.

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 22 Chi-Squared and the Test Comparing Proportions in 2x2 Tables In practice, contingency tables of size 2x2 are very common. They often occur in summarizing the responses of two groups on a binary response variable.  Denote the population proportion of success by in group 1 and in group 2.  If the response variable is independent of the group,, so the conditional distributions are equal.  is equivalent to independence

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 23 Example: Aspirin and Heart Attacks Revisited Table 11.9 Annotated MINITAB Output for Chi-Squared Test of Independence of Group (Placebo, Aspirin) and Whether or Not Subject Died of Cancer. The same P-value results as with a two-sided Z test comparing the two population proportions.

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 24 What are the hypotheses for the chi-squared test for these data?  The null hypothesis is that whether a doctor has a heart attack is independent of whether he takes placebo or aspirin.  The alternative hypothesis is that there’s an association. Example: Aspirin and Heart Attacks Revisited

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 25 Report the test statistic and P-value for the chi- squared test:  The test statistic is with a P-value of This is very strong evidence that the population proportion of heart attacks differed for those taking aspirin and for those taking placebo. The sample proportions indicate that the aspirin group had a lower rate of heart attacks than the placebo group. Example: Aspirin and Heart Attacks Revisited

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 26 Limitations of the Chi-Squared Test If the P-value is very small, strong evidence exists against the null hypothesis of independence. But… The chi-squared statistic and the P-value tell us nothing about the nature of the strength of the association. We know that there is statistical significance, but the test alone does not indicate whether there is practical significance as well.

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 27 The chi-squared test is often misused. Some examples are:  When some of the expected frequencies are too small.  When separate rows or columns are dependent samples.  Data are not random.  Quantitative data are classified into categories - results in loss of information. Limitations of the Chi-Squared Test

Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 28 “Goodness of Fit” Chi-Squared Tests The Chi-Squared test can also be used for testing particular proportion values for a categorical variable.  The null hypothesis is that the distribution of the variable follows a given probability distribution; the alternative is that it does not.  The test statistic is calculated in the same manner where the expected counts are what would be expected in a random sample from the hypothesized probability distribution.  For this particular case, the test statistic is referred to as a goodness-of-fit statistic.