Testing for a Relationship Between 2 Categorical Variables The Chi-Square Test …

Slides:



Advertisements
Similar presentations
What is Chi-Square? Used to examine differences in the distributions of nominal data A mathematical comparison between expected frequencies and observed.
Advertisements

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)
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Goodness-of-Fit Tests.
1 Contingency Tables: Tests for independence and homogeneity (§10.5) How to test hypotheses of independence (association) and homogeneity (similarity)
Hypothesis Testing IV Chi Square.
Chapter 13: The Chi-Square Test
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.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
ChiSq Tests: 1 Chi-Square Tests of Association and Homogeneity.
PSY 340 Statistics for the Social Sciences Chi-Squared Test of Independence Statistics for the Social Sciences Psychology 340 Spring 2010.
Chi-square Test of Independence
Stat 512 – Lecture 13 Chi-Square Analysis (Ch. 8).
Crosstabs and Chi Squares Computer Applications in Psychology.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Hypothesis Testing Using The One-Sample t-Test
1 Nominal Data Greg C Elvers. 2 Parametric Statistics The inferential statistics that we have discussed, such as t and ANOVA, are parametric statistics.
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.
The Chi-Square Test Used when both outcome and exposure variables are binary (dichotomous) or even multichotomous Allows the researcher to calculate a.
1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Categorical Data Test of Independence.
1 Psych 5500/6500 Chi-Square (Part Two) Test for Association Fall, 2008.
Goodness-of-Fit Tests and Categorical Data Analysis
Chi-Square as a Statistical Test Chi-square test: an inferential statistics technique designed to test for significant relationships between two variables.
Chi-square (χ 2 ) Fenster Chi-Square Chi-Square χ 2 Chi-Square χ 2 Tests of Statistical Significance for Nominal Level Data (Note: can also be used for.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Chi-square test or c2 test
Chi-square test Chi-square test or  2 test Notes: Page Goodness of Fit 2.Independence 3.Homogeneity.
Two Way Tables and the Chi-Square Test ● Here we study relationships between two categorical variables. – The data can be displayed in a two way table.
Chapter 26 Chi-Square Testing
Chapter 12: The Analysis of Categorical Data and Goodness- of-Fit Test.
Analyze Improve Define Measure Control L EAN S IX S IGMA L EAN S IX S IGMA Chi-Square Analysis Chi-Square Analysis Chi-Square Training for Attribute Data.
FPP 28 Chi-square test. More types of inference for nominal variables Nominal data is categorical with more than two categories Compare observed frequencies.
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and l Chapter 17 l Chi-Squared Analysis: Testing for Patterns in Qualitative Data.
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.
Essential Statistics Chapter 161 Review Part III_A_Chi Z-procedure Vs t-procedure.
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.
Warm up On slide.
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.
Chi-Square Test James A. Pershing, Ph.D. Indiana University.
Reasoning in Psychology Using Statistics Psychology
Chapter 13 Inference for Counts: Chi-Square Tests © 2011 Pearson Education, Inc. 1 Business Statistics: A First Course.
The table shows a random sample of 100 hikers and the area of hiking preferred. Are hiking area preference and gender independent? Hiking Preference Area.
Chapter 11: Chi-Square  Chi-Square as a Statistical Test  Statistical Independence  Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Dan Piett STAT West Virginia University Lecture 12.
12/23/2015Slide 1 The chi-square test of independence is one of the most frequently used hypothesis tests in the social sciences because it can be used.
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.
ContentFurther guidance  Hypothesis testing involves making a conjecture (assumption) about some facet of our world, collecting data from a sample,
Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.
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.
Section 6.4 Inferences for Variances. Chi-square probability densities.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
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.
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 &
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.
©2006 Thomson/South-Western 1 Chapter 12 – Analysis of Categorical Data Slides prepared by Jeff Heyl Lincoln University ©2006 Thomson/South-Western Concise.
Presentation 12 Chi-Square test.
Lecture #27 Tuesday, November 29, 2016 Textbook: 15.1
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Statistical Inference about Regression
Chapter 10 Analyzing the Association Between Categorical Variables
Analysis of two-way tables
Presentation transcript:

Testing for a Relationship Between 2 Categorical Variables The Chi-Square Test …

Rel’nship between owning a bike and having a significant other? Rows: Bike Columns: SigOther No Yes All No Yes All Cell Contents -- Count % of Row

Our Hypotheses If there is no relationship, we’d expect the percentages (proportions) in each group to be equal. So: H 0 : There is no relationship between owning a bike and having a significant other. Or, p N = p Y. H A : There is a relationship. Or, p N  p Y.

What would the table look like if there was no relationship? Rows: Bike Columns: SigOther No Yes All No Yes All Cell Contents -- Observed Counts 45/92, or 48.9%, would have an SO regardless of owning a bike. So, 0.489(64), or 31.3, non-bikers would have SO. And, 0.489(28), or 13.7, bikers would have SO Expected Counts

Are observed counts very different from expected counts? Calculate (observed - expected) 2 /expected for each of the cells. For first cell: ( ) 2 /32.7 = For second cell: ( ) 2 /31.3 = For third cell: ( ) 2 /14.3 = For fourth cell: ( ) 2 /13.7 = 1.350

Are observed counts very different from expected counts? Add up the resulting quantities to get the value of the “chi-square statistic” for the table. Chi-square statistic = = 3.80 If the chi-square statistic is large, then the observed counts are very different than the counts we’d expect to get if there is no relationship.

The P-value How likely is it that we’d get a chi-square statistic as large as we did if the proportions are equal? The chi-square statistic follows the chi- square distribution with (r-1)(c-1) degrees of freedom, where r and c are the number of rows and columns, respectively, in the table. We’ll let Minitab calculate the P-value.

Rel’nship between owning a bike and having a significant other? Rows: Bike Columns: SigOther No Yes All No Yes All Chi-Square = 3.807, DF = 1, P-Value = Cell Contents -- Count Exp Freq DF= (2-1)(2-1) = 1

Chi-Square Test in Minitab when data are not summarized Select Stat >> Tables >> Cross Tabulation Select two Classification Variables. The first (second) variable you select will be the row (column) variable. Under Display, select what you want shown--perhaps, counts and row percents. Click on box labeled Chi-Square Analysis. Select OK.

Chi-Square Test in Minitab when data are summarized Enter observed counts in table format. Select Stat >> Tables >> Chi-Square Test Specify the columns containing the table. Select OK.

Miscellaneous issues Relationship of chi-square test to Z test Significant relationships not necessarily true relationships. Assumptions

Rel’nship between owning a bike and having a significant other? Success = Having Significant Other Bike X N Sample p No Yes Estimate for p(No) - p(Yes): % CI for p(No) - p(Yes): ( , ) Test for p(No) - p(Yes) = 0 (vs not = 0): Z = P-Value = 0.051

Relationship between Z test and chi-square test Two-tailed Z-test for two proportions (using a pooled estimate of p) and a chi-square test for a 2-by-2 table will give exactly same P- value. Use Z-test for one-tailed tests (to see if one proportion is larger than other.) Use chi-square test for two-tailed tests and for larger than 2-by-2 tables.

Rel’nship between owning bike and having a significant other? Rows: bike Columns: steady No Yes All No Yes All Chi-Square = 0.053, DF = 1, P-Value = Cell Contents -- Count % of Row Using Fall 1998 data, conclude no relationship.

If test suggests relationship exists... Is there a reasonable explanation for a relationship? If not, consider possibility of having made a Type I error. If so, collect data on another random sample and see if new data suggest relationship. If so, start believing it … but still go collect more data …

Ah, those darn assumptions... P-value will only be accurate if you have large enough sample. “Large enough” here means: –no cells have an expected count less than 1 –no more than 20% of the cells have an expected count less than 5 (in a 2-by-2, means no cells). Minitab will print a warning if assumptions are violated.