©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture 1 Lecture 33: Chapter 12, Section 2 Two Categorical Variables More.

Slides:



Advertisements
Similar presentations
Chi-square test Chi-square test or  2 test. Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate)
Advertisements

1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Tests for Homogeneity.
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Chapter 11 Inference for Distributions of Categorical Data
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Variance Chapter 16.
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.
Chapter 26: Comparing Counts
Copyright ©2011 Brooks/Cole, Cengage Learning Analysis of Variance Chapter 16 1.
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
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.
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Test of Independence.
Chapter 10 Analyzing the Association Between Categorical Variables
How Can We Test whether Categorical Variables are Independent?
Testing Distributions Section Starter Elite distance runners are thinner than the rest of us. Skinfold thickness, which indirectly measures.
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.
+ Chapter 12: Inference for Regression Inference for Linear Regression.
Chapter 11: Inference for Distributions of Categorical Data.
1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests.
Chapter 26 Chi-Square Testing
Chapter 11: Inference for Distributions of Categorical Data Section 11.1 Chi-Square Goodness-of-Fit Tests.
Other Chi-Square Tests
Section 9-1: Inference for Slope and Correlation Section 9-3: Confidence and Prediction Intervals Visit the Maths Study Centre.
+ Chi Square Test Homogeneity or Independence( Association)
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
Data Analysis for Two-Way Tables. The Basics Two-way table of counts Organizes data about 2 categorical variables Row variables run across the table Column.
Essential Statistics Chapter 161 Review Part III_A_Chi Z-procedure Vs t-procedure.
The Practice of Statistics Third Edition Chapter (13.1) 14.1: Chi-square Test for Goodness of Fit Copyright © 2008 by W. H. Freeman & Company Daniel S.
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
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.
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.
1 Chapter 11: Analyzing the Association Between Categorical Variables Section 11.1: What is Independence and What is Association?
Chapter 13 Inference for Counts: Chi-Square Tests © 2011 Pearson Education, Inc. 1 Business Statistics: A First Course.
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.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture1 Lecture 35: Chapter 13, Section 2 Two Quantitative Variables Interval.
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.
©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture 1 Lecture 7: Chapter 4, Section 3 Quantitative Variables (Summaries,
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Objectives (BPS chapter 12) General rules of probability 1. Independence : Two events A and B are independent if the probability that one event occurs.
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 &
1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc Tests for Homogeneity and Independence in a Two-Way Table Data resulting from observations.
Chi Square Procedures Chapter 14. Chi-Square Goodness-of-Fit Tests Section 14.1.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8… Where we are going… Significance Tests!! –Ch 9 Tests about a population proportion –Ch 9Tests.
Textbook Section * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Chi-Square hypothesis testing
Chapter 11 Chi-Square Tests.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 11: Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Chapter 11 Chi-Square Tests.
Elementary Statistics: Looking at the Big Picture
Analyzing the Association Between Categorical Variables
Elementary Statistics: Looking at the Big Picture
Chapter 11 Chi-Square Tests.
Presentation transcript:

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture 1 Lecture 33: Chapter 12, Section 2 Two Categorical Variables More About Chi-Square  Hypotheses about Variables or Parameters  Computing Chi-square Statistic  Details of Chi-square Test  Confounding Variables

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.2 Looking Back: Review  4 Stages of Statistics Data Production (discussed in Lectures 1-4) Displaying and Summarizing (Lectures 5-12) Probability (discussed in Lectures 13-20) Statistical Inference  1 categorical (discussed in Lectures (21-23)  1 quantitative (discussed in Lectures (24-27)  cat and quan: paired, 2-sample, several-sample (Lectures 28-31)  2 categorical  2 quantitative

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.3 and for 2 Cat. Variables (Review)  In terms of variables : two categorical variables are not related : two categorical variables are related  In terms of parameters : population proportions in response of interest are equal for various explanatory groups : population proportions in response of interest are not equal for various explanatory group Word “not” appears in H o about variables, H a about parameters.

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.4 Chi-Square Statistic Compute table of counts expected if true: each is Expected =  Same as counts for which proportions in response categories are equal for various explanatory groups Compute chi-square test statistic Column total  Row total Table total

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.5 “Observed” and “Expected” Expressions “observed” and “expected” commonly used for chi-square hypothesis tests. More generally, “observed” is our sample statistic, “expected” is what happens on average in the population when is true, and there is no difference from claimed value, or no relationship.

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.6 Example: 2 Categorical Variables: Data  Background: We’re interested in the relationship between gender and lenswear.  Question: What do data show about sample relationship?  Response: Females wear contacts more (43% vs. 26%); males wear glasses more (23% vs. 11%); proportions with none are close (46% vs. 52%). Practice: 12.28a p.617

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.7 Example: 2 Categorical Variables: Data  Background: We’re interested in the relationship between gender and lenswear.  Question: What do data show about sample relationship?  Response: Females wear contacts more (_____ vs. _____); males wear glasses more (_____ vs. _____); proportions with none are close (_____ vs. _____ ). Practice: 12.28a p.617

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.8 Example: Table of Expected Counts  Background: We’re interested in the relationship between gender and lenswear.  Question: What counts are expected if gender and lenswear are not related?  Response: Calculate each expected count as Column total  Row total Table total Practice: 12.42b p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.9 Example: Table of Expected Counts  Background: We’re interested in the relationship between gender and lenswear.  Question: What counts are expected if gender and lenswear are not related?  Response: Calculate each expected count as Practice: 12.42b p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.10 Example: “Eyeballing” Obs. and Exp. Tables  Background: We’re interested in the relationship between gender & lenswear.  Question: Do observed and expected counts seem very different?  Response: Yes, especially in first two columns. Practice: 12.12f p.609

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.11 Example: “Eyeballing” Obs. and Exp. Tables  Background: We’re interested in the relationship between gender & lenswear.  Question: Do observed and expected counts seem very different?  Response: Practice: 12.12f p.609

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.12 Example: Components for Comparison  Background: Observed and expected tables:  Question: What are the components of chi-square?  Response: Calculate each Practice: 12.13g p.610

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.13 Example: Components for Comparison  Background: Observed and expected tables:  Question: What are the components of chi-square?  Response: Calculate each Practice: 12.13g p.610

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.14 Example: Components for Comparison  Background: Components of chi-square are  Questions: Which contribute most and least to the chi-square statistic? What is chi-square? Is it large?  Responses: 5.4, 5.8 largest: most impact from males wearing glasses, not contacts 0.3, 0.5 smallest: least impact from females vs. males not wearing any lenses chi-square is = 18.4 We need more info to judge if 18.4 is “large”. Practice: 12.13h p.610

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.15 Example: Components for Comparison  Background: Components of chi-square are  Questions: Which contribute most and least to the chi-square statistic? What is chi-square? Is it large?  Responses: ______ largest: most impact from ____________________________ ______ smallest: least impact from ____________________________ _______________________________________________ ________________________________________________________ Practice: 12.13h p.610

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.16 Chi-Square Distribution (Review) follows predictable pattern known as chi-square distribution with df = (r-1)  (c-1) r = number of rows (possible explanatory values) c = number of columns (possible response values) Properties of chi-square: Non-negative (based on squares) Mean=df [=1 for smallest (2  2) table] Spread depends on df Skewed right

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.17 Example: Chi-Square Degrees of Freedom  Background: Table for gender and lenswear:  Question: How many degrees of freedom apply?  Response: row variable (male or female) has r =2, column variable (contacts, glasses, none) has c =3. df = (2-1)(3-1) = 2. A Closer Look: Degrees of freedom tell us how many unknowns can vary freely before the rest are “locked in.” Once we know 2 row values in a 2x3 table, we can fill in the remaining 4 counts by subtraction. Practice: 12.42a p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.18 Example: Chi-Square Degrees of Freedom  Background: Table for gender and lenswear:  Question: How many degrees of freedom apply?  Response: row variable (male or female) has r =__, column variable (contacts, glasses, none) has c =__. df = ___________ A Closer Look: Degrees of freedom tell us how many unknowns can vary freely before the rest are “locked in.” Practice: 12.42a p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.19 Chi-Square Density Curve For chi-square with 2 df,  If is more than 6, P-value is less than 0.05.

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.20 Example: Assessing Chi-Square  Background: In testing for relationship between gender and lenswear in 2  3 table, found.  Question: Is there evidence of a relationship in general between gender and lenswear (not just in the sample)?  Response: For df = (2-1)  (3-1) = 2, chi-square is considered “large” if greater than 6. Is 18.4 large? Is the P-value small?Yes! Is there statistically significant evidence of a relationship between gender and lenswear? Yes! Practice: 12.42e-f p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.21 Example: Assessing Chi-Square  Background: In testing for relationship between gender and lenswear in 2  3 table, found.  Question: Is there evidence of a relationship in general between gender and lenswear (not just in the sample)?  Response: For df = (2-1)  (3-1) = 2, chi-square is considered “large” if greater than 6. Is 18.6 large? ____ Is the P-value small? ____ Is there statistically significant evidence of a relationship between gender and lenswear? ____ Practice: 12.42e-f p.624

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.22 Example: Checking Assumptions  Background: We produced table of expected counts below right:  Question: Are samples large enough to guarantee the individual distributions to be approximately normal, so the sum of standardized components follows a distribution?  Response: All expected counts are more than 5  yes Practice: 12.41c p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.23 Example: Checking Assumptions  Background: We produced table of expected counts below right:  Question: Are samples large enough to guarantee the individual distributions to be approximately normal, so the sum of standardized components follows a distribution?  Response: Practice: 12.41c p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.24 Example: Chi-Square with Software  Background: Some subjects injected under arm with Botox, others with placebo. After a month, reported if sweating had decreased.  Question: What do we conclude?  Response: Sample sizes large enough? Proportions with reduced sweating 121/161=75%, 40/161= 25%. P-value =  diff significant? Seem different? Yes. Conclude Botox reduces sweating? Yes. Practice: 12.41a p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.25 Example: Chi-Square with Software  Background: Some subjects injected under arm with Botox, others with placebo. After a month, reported if sweating had decreased.  Question: What do we conclude?  Response: Sample sizes large enough?____Proportions with reduced sweating ________________________ ____P-value = ____  diff significant? ____ Seem different? Conclude Botox reduces sweating? ____ Practice: 12.41a p.623

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.26 Guidelines for Use of Chi-Square (Review) Need random samples taken independently from two or more populations. Confounding variables should be separated out. Sample sizes must be large enough to offset non- normality of distributions. Need populations at least 10 times sample sizes.

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.27 Example: Confounding Variables  Background: Students of all years: Underclassmen: Upperclassmen:  Question: Are major (dec or not) and living situation related?  Response: Only via year as confounding variable; otherwise not. Practice: p.626

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.28 Example: Confounding Variables  Background: Students of all years: Underclassmen: Upperclassmen:  Question: Are major (dec or not) and living situation related?  Response: Practice: p.626

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L33.29 Activity  Complete table of total students of each gender on roster, and count those attending and not attending for each gender group. Carry out a chi-square test to see if gender and attendance are related in general. XX YY XX+YY

©2011 Brooks/Cole, Cengage Learning Elementary Statistics: Looking at the Big Picture L19.30 Lecture Summary (Inference for Cat  Cat; More Chi-Square)  Hypotheses about variables or parameters  Computing chi-square statistic Observed and expected counts  Chi-square test Calculations Degrees of freedom Chi-square density curve Checking assumptions Testing with software  Confounding variables