Statistics 303 Chapter 9 Two-Way Tables. Relationships Between Two Categorical Variables Relationships between two categorical variables –Depending on.

Slides:



Advertisements
Similar presentations
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Advertisements

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
Hypothesis Testing IV Chi Square.
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 11 Inference for Distributions of Categorical Data
Two-Way Tables Two-way tables come about when we are interested in the relationship between two categorical variables. –One of the variables is the row.
Crosstabs and Chi Squares Computer Applications in Psychology.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
Presentation 12 Chi-Square test.
The Chi-Square Test Used when both outcome and exposure variables are binary (dichotomous) or even multichotomous Allows the researcher to calculate a.
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.
More About Significance Tests
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.
1 Desipramine is an antidepressant affecting the brain chemicals that may become unbalanced and cause depression. It was tested for recovery from cocaine.
Dr.Shaikh Shaffi Ahamed Ph.D., Dept. of Family & Community Medicine
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
CHAPTER 11 SECTION 2 Inference for Relationships.
Chapter 11 The Chi-Square Test of Association/Independence Target Goal: I can perform a chi-square test for association/independence to determine whether.
13.2 Chi-Square Test for Homogeneity & Independence AP Statistics.
Analysis of Two-Way tables Ch 9
+ Chi Square Test Homogeneity or Independence( Association)
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
Analysis of two-way tables - Inference for two-way tables IPS chapter 9.2 © 2006 W.H. Freeman and Company.
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.
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.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Chapter Outline Goodness of Fit test Test of Independence.
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.
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.
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.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Dr.Shaikh Shaffi Ahamed Ph.D., Dept. of Family & Community Medicine
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 &
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
11/12 9. Inference for Two-Way Tables. Cocaine addiction Cocaine produces short-term feelings of physical and mental well being. To maintain the effect,
 Check the Random, Large Sample Size and Independent conditions before performing a chi-square test  Use a chi-square test for homogeneity to determine.
Presentation 12 Chi-Square test.
Chapter 11 Chi-Square Tests.
Chapter 12 Tests with Qualitative Data
CHAPTER 11 Inference for Distributions of Categorical Data
Data Analysis for Two-Way Tables
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 11: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Chapter 11 Chi-Square Tests.
CHAPTER 11 Inference for Distributions of Categorical Data
Analyzing the Association Between Categorical Variables
Chapter 13: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 11 Chi-Square Tests.
CHAPTER 11 Inference for Distributions of Categorical Data
Presentation transcript:

Statistics 303 Chapter 9 Two-Way Tables

Relationships Between Two Categorical Variables Relationships between two categorical variables –Depending on the situation, one of the variables is the explanatory variable and the other is the response variable. –In this case, we look at the percentages of one variable for each level of the other variable. –Examples: Gender and Soda Preference Country of Origin and Marital Status Smoking Habits and Socioeconomic Status

Relationships Between Two Categorical Variables Relationships between two categorical variables –A two-way table can summarize the data for relationships between two categorical variables. Example: Gender and Highest Degree Obtained

SPSS OUTPUT Example: Percents

Review of Two-Way Tables Two-way tables come about when we are interested in the relationship between two categorical variables. –One of the variables is the row variable. –The other is the column variable. –The combination of a row variable and a column variable is a cell.

Review of Two-Way Tables Example: Row variable Column variable Column Totals Row Totals Overall Total Cells

Chi-Squared Test for Independence To test whether or not there is a relationship between the row variable and the column variable, we use the chi-square statistic (X 2 ), which can be calculated in the computer. The null hypothesis (H 0 ) is no relationship among the two variables, i.e. the variables are independent. The alternative hypothesis (H A ) is that there is a relationship, i.e. the variables are not independent. For 2x2 tables, we require that all four expected cell counts be 5 or more. For tables larger than 2x2, we will use this approximation whenever the average of the expected counts is 5 or more and the smallest expected count is 1 or more.

Chi-Squared Test for Independence A comparison of the proportion of “successes” in two populations leads to a 2x2 table. We can compare two population proportions either by the chi-square test or by the two-sample z test from section 8.2 These tests always give exactly the same result. The chi-square statistic is equal to the square of the z statistic and χ 2 (1) critical values are equal to the squares of the corresponding N(0,1) critical values. Advantage of the z test: We can test either one-sided or two-sided alternatives Chi-square test always tests the two-sided alternative Advantage of chi-square: We can compare more than two populations z-Test compares only two populations

Chi-Squared Test for Independence The chi-square statistic compares the observed cell counts with the expected cell counts The chi-square statistic is a measure of how much the observed cell counts in a two-way table diverge from the expected cell counts. If the expected counts and the observed counts are very different, a large value of X 2 will result. Large values of X 2 provide evidence against the null hypothesis.

Chi-Square Test Like the t distributions, the χ 2 distributions are described by a single parameter, degrees of freedom (df). The degrees of freedom for the chi-square test are df = (r – 1)*(c – 1 ) = (#rows – 1)*(#columns – 1). For a 2x2 table, we have df = (2 – 1)(2 – 1) = 1. The p-value is determined by looking in Table F. P(χ 2 ≥ X 2 )Notice Table F gives probabilities to the right. Also, note χ 2 distributions take only positive values and are skewed to the right.

Analysis in SPSS gives us: The p-value is Because this is larger than 0.05 we fail to reject H 0 and conclude there is no significant relationship between gender and tomato enjoyment. We are interested in this row:

Link between Diabetes and Heart Disease? Background: Contradictory opinions: 1. A diabetic’s risk of dying after a first heart attack is the same as that of someone without diabetes. There is no link between diabetes and heart disease. vs. 2. Diabetes takes a heavy toll on the body and diabetes patients often suffer heart attacks and strokes or die from cardiovascular complications at a much younger age. So we use hypothesis test based on the latest data to see what’s the right conclusion. There are a total of 5167 managed-care patients, among which 1131 patients are non-diabetics and 4036 are diabetics. Among the non-diabetic patients, 42% of them had their blood pressure properly controlled (therefore it’s 475 of 1131). While among the diabetic patients only 20% of them had the blood pressure controlled (therefore it’s 807 of 4036).

Link between Diabetes and Heart Disease? Data ControlledUncontrolledTotal Non-diabetes Diabetes Total

Link between Diabetes and Heart Disease? Data: Diabetes: 1=Not have diabetes, 2=Have Diabetes Control: 1=Controlled, 2=Uncontrolled

Link between Diabetes and Heart Disease?

Hypothesis test: 1) H 0 : There is no link between diabetes and heart disease. (There is no relationship between diabetes and heart disease. Diabetes and heart disease are independent.) 2) H A : There is link between diabetes and heart disease. (There is a relationship between diabetes and heart disease. Diabetes and heart disease are dependent.) 3) Assume a significance level of.05

Link between Diabetes and Heart Disease? SPSS Output

Link between Diabetes and Heart Disease? 4) The computer gives us a Chi-Square Statistic of ) The computer gives us a p-value of.000 6) Because our p-value is less than alpha, we would reject the null hypothesis. 7) There IS sufficient evidence that there is link between diabetes and heart disease.

Is there a relationship between exposure to R- rated movies and adolescent smoking? The study attempted to examine the relationship between exposure to R-Rated movies and smoking habits among adolescents. Smoking in R-rated movies is higher than any other movie-rating category. Therefore, the objective of this study was to determine if an association existed between parental restrictions on movies and adolescent cigarette use. SmokingNon-smokingTotal Complete Restriction Partial Restriction No Restriction Total

Is there a relationship between exposure to R- rated movies and adolescent smoking?

Hypothesis Test 1) H 0 : There is no relationship between exposure to R-rated movies and tobacco use among adolescents 2) H A : There is a relationship between the occurrence of tobacco use and the exposure to R- rated movies among adolescents 3) alpha = 0.05

SPSS Output 4) The computer gives us a chi-square test statistic of ) The computer output gives us a p-value that is 0.000

Is there a relationship between exposure to R-rated movies and adolescent smoking? 6) Decision Rule: –If p-value ≤ alpha, we reject H 0 –If p-value > alpha, we fail to reject H 0 Because our p-value is less than our significance level (alpha), we would reject the null hypothesis 7) Because we rejected H 0, we can conclude that there IS significant evidence that a relationship between exposure to R-rated movies and adolescent tobacco use exists.