Datasets with counts 150 people were surveyed about their softdrink preferences. They were asked, “Do you prefer coke, pepsi, or sprite?”. 50 people said.

Slides:



Advertisements
Similar presentations
Chapter 11 Other Chi-Squared Tests
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)
Chi square.  Non-parametric test that’s useful when your sample violates the assumptions about normality required by other tests ◦ All other tests we’ve.
© 2011 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license.
Basic Statistics The Chi Square Test of Independence.
The Chi-Square Test for Association
Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables.
Statistical Inference for Frequency Data Chapter 16.
Analysis of frequency counts with Chi square
Chi-Square Test of Independence u Purpose: Test whether two nominal variables are related u Design: Individuals categorized in two ways.
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
CHI-SQUARE TEST OF INDEPENDENCE
Chi Square Test Dealing with categorical dependant variable.
Chi-square Test of Independence
CHI-SQUARE GOODNESS OF FIT TEST u A nonparametric statistic u Nonparametric: u does not test a hypothesis about a population value (parameter) u requires.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Cross-Tabulations.
Chi-Square and Analysis of Variance (ANOVA)
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.
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.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
CJ 526 Statistical Analysis in Criminal Justice
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
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.
Chapter 11: Applications of Chi-Square. Chapter Goals Investigate two tests: multinomial experiment, and the contingency table. Compare experimental results.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
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
1 Chi-Square Heibatollah Baghi, and Mastee Badii.
Copyright © 2009 Pearson Education, Inc LEARNING GOAL Interpret and carry out hypothesis tests for independence of variables with data organized.
Chapter 20 For Explaining Psychological Statistics, 4th ed. by B. Cohen 1 These tests can be used when all of the data from a study has been measured on.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Other Chi-Square Tests
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
Chi-Square Distributions. Recap Analyze data and test hypothesis Type of test depends on: Data available Question we need to answer What do we use to.
Chapter-8 Chi-square test. Ⅰ The mathematical properties of chi-square distribution  Types of chi-square tests  Chi-square test  Chi-square distribution.
Chi- square test x 2. Chi Square test Symbolized by Greek x 2 pronounced “Ki square” A Test of STATISTICAL SIGNIFICANCE for TABLE data.
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
CHI SQUARE TESTS.
HYPOTHESIS TESTING BETWEEN TWO OR MORE CATEGORICAL VARIABLES The Chi-Square Distribution and Test for Independence.
Chapter 13 CHI-SQUARE AND NONPARAMETRIC PROCEDURES.
Chi-Square Test ( 2 ) Chi-Square Test (  2 ) Used when dependent variable is counts within categories Used when DV has two or more mutually exclusive.
© 2000 Prentice-Hall, Inc. Statistics The Chi-Square Test & The Analysis of Contingency Tables Chapter 13.
Other Chi-Square Tests
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.
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.
Chapter Fifteen Chi-Square and Other Nonparametric Procedures.
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.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Goodness-of-Fit and Contingency Tables Chapter 11.
Copyright © 2009 Pearson Education, Inc LEARNING GOAL Interpret and carry out hypothesis tests for independence of variables with data organized.
Basic Statistics The Chi Square Test of Independence.
Other Chi-Square Tests
Chi-Square hypothesis testing
Chi-square test or c2 test
Hypothesis Testing Review
Qualitative data – tests of association
The Chi-Square Distribution and Test for Independence
Inference on Categorical Data
Analyzing the Association Between Categorical Variables
Non-Parametric Statistics Part I: Chi-Square
Presentation transcript:

Datasets with counts 150 people were surveyed about their softdrink preferences. They were asked, “Do you prefer coke, pepsi, or sprite?”. 50 people said “coke”. 70 people said “pepsi”. 30 people said “sprite”. Test the hypothesis that people differ in their soda preferences. Solution: H 0 : p pepsi = p coke =p sprite =1/3 H A : not all p’s are equal Use a one-way chi-square test. PepsiCokeSprite

One-way Chi-Square Test (  2 ) Used when your dependent variable is counts within categories (# pepsi lovers, # coke lovers, # sprite lovers) Used when your DV has two or more mutually exclusive categories Compares the counts you got in your sample to those you would expect under the null hypothesis Also called the Chi-Square “Goodness of Fit” test.

One-way  2 example Which power would you rather have: flight, invisibility, or x-ray vision? FlightInvisibilityX-ray vision 18 people14 people10 people Is this difference significant, or is just due to chance?

One-way  2 example H 0 : p fly = p invis = p xray = 1/3 H A : not all p’s are equal FlightInvisibilityX-ray vision f o = 18f o = 14f o = 10 Step 1: Write hypotheses Step 2: Write the observed frequencies, and also the frequencies that would be expected under the null hypothesis N=42

One-way  2 example FlightInvisibilityX-ray vision f o = 18 f e = 14 f o = 14 f e = 14 f o = 10 f e = 14 H 0 : p fly = p invis = p xray = 1/3 H A : not all p’s are equal Step 1: Write hypotheses Step 2: Write the observed frequencies, and also the frequencies that would be expected under the null hypothesis N=42

One-way  2 example FlightInvisibilityX-ray vision f o = 18 f e = 14 f o = 14 f e = 14 f o = 10 f e = 14 N=42 Step 3: Compute the relative squared discrepancies And sum them up

One-way  2 example FlightInvisibilityX-ray vision f 0 = 18 f e = 14 f 0 = 14 f e = 14 f 0 = 10 f e = 14 N=42 Step 4: Compare to critical value of Retain null!

Steps: 1) State hypotheses 2) Write observed and expected frequencies 3) Get  2 by summing up relative squared deviations 4) Use Table I to get critical  2 Calculating one-way  2

Practice Suppose we ask 200 randomly selected people if they think that voting should be made compulsory. The data come out like this: NoYes f o = 84f 0 = 116 Is there evidence for a clear preference?

Practice Suppose we ask 200 randomly selected people if they think that voting should be made compulsory. The data come out like this: NoYes f 0 = 84f 0 = 116 f e =100 Reject null!

we tested H 0 that all cell frequencies are equal But can test any expected frequencies example – political affiliation among psych grad students: DemocratRepublicanIndependent 9518 political affiliation in the U.S. (Gallup): DemocratRepublicanIndependent 46%43%11% Other null hypotheses

DemocratRepublicanIndependent f o = 9 f e = 14.7 f o = 5 f e = 13.8 f o = 18 f e = 3.5 N=32 Is the distribution for psych grad students different than the distribution for the U.S.? If not, then 46% of the 32 students would be Democrats, 43% would be republican, and 11% would be independent Reject null!

Points of interest about  2  2 cannot be negative  2 will be zero only if each observed frequency exactly equals the expected frequency 3.The larger the discrepancies, the larger the  2 4.The greater the number of groups, the larger the  2. That’s why  2 distribution is a family of curves with df = k-1.

Two Factor Chi-Square A 1999 New Jersey poll sampled people’s opinions concerning the use of the death penalty for murder when given the option of life in prison instead. 800 people were polled, and the number of men and women supporting each penalty were tabulated. Preferred Penalty Death PenaltyLife in PrisonNo Opinion Female Male Contingency table: shows contingency between two variables Are these two variables (gender, penalty preference) independent??

Two-Factor Chi-Square Test Used to test whether two nominal variables are independent or related E.g. Is gender related to socio-economic class? Compares the observed frequencies to the frequencies expected if the variables were independent Called a chi-squared test of independence Fundamentally testing, “do these variables interact”?

Example A 1999 New Jersey poll sampled people’s opinions concerning the use of the death penalty for murder when given the option of life in prison instead. 800 people were polled, and the number of men and women supporting each penalty were tabulated. Preferred Penalty Death PenaltyLife in PrisonNo Opinion Female Male H 0 : distribution of female preferences matches distribution of male preferences H A : female proportions do not match male proportions

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinion Femalef 0 = 151 f e = ___ f 0 = 179 f e = ___ f 0 = 80 f e = __ Malef 0 = 201 f e = ___ f 0 = 117 f e = ___ f 0 = 72 f e = __

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinion Femalef 0 = 151 f e = 133.3? f 0 = 179 f e = 133.3? f 0 = 80 f e = 133.3? Malef 0 = 201 f e = 133.3? f 0 = 117 f e = 133.3? f 0 = 72 f e = 133.3? WRONG -- this is saying there is an equal # of men and women, and an equal preference for prison sentences (e.g. no main effects). We are willing to let there be main effects. We just want to test whether the distribution of preferences for men and women is the same (e.g. no interaction effects)

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinion Femalef 0 = 151 f e = ___ f 0 = 179 f e = ___ f 0 = 80 f e = __ Malef 0 = 201 f e = ___ f 0 = 117 f e = ___ f 0 = 72 f e = __ We need to look at the marginal totals to get our expected frequencies

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinionf row Femalef 0 = 151 f e = ___ f 0 = 179 f e = ___ f 0 = 80 f e = __ 410 Malef 0 = 201 f e = ___ f 0 = 117 f e = ___ f 0 = 72 f e = __ 390 f col n = 800

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinionf row Femalef 0 = 151 f e = ___ f 0 = 179 f e = ___ f 0 = 80 f e = __ 410 Malef 0 = 201 f e = ___ f 0 = 117 f e = ___ f 0 = 72 f e = __ 390 f col 352 p death = p life = p none =.19 n = 800

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinionf row Femalef 0 = 151 f e =.44(410) f 0 = 179 f e =.37(410) f 0 = 80 f e =.19(410) 410 Malef 0 = 201 f e =.44(390) f 0 = 117 f e =.37(390) f 0 = 72 f e =.19(390) 390 f col 352 p death = p life = p none =.19 n = 800

Example Preferred Penalty Death PenaltyLife in PrisonNo Opinionf row Femalef 0 = 151 f e =180.4 f 0 = 179 f e =151.7 f 0 = 80 f e = Malef 0 = 201 f e =171.6 f 0 = 117 f e =144.3 f 0 = 72 f e = f col 352 p death = p life = p none =.19 n = 800 Reject null!

Steps: 1) State hypotheses 2) Get expected frequencies 3) Get  2 by summing up relative squared deviations 4) Use table to get critical  2 Calculating two-way  2

Practice Suppose we want to determine if there is any relationship between level of education and medium through which one follows current events. We ask a random sample of high school graduates and a random sample of college graduates whether they keep up with the news mostly by reading the paper or by listening to the radio or by watching television. radiopaperTV HS college244432

Practice radiopaperTVf row HSf o =10 f e =17 f o =29 f e =36.5 f o =61 f e = collegef o =24 f e =17 f o =44 f e =36.5 f o =32 f e = f col 34 p radio = p paper = p TV =.465 N=200 = df = (2)*(1) = 2

Assumptions of Chi-Square Test 1. Categories are mutually exclusive –A subject cannot be counted in more than one cell 2. Expected frequency in each cell must be –at least 10 when k A and k B are less than or equal to 2 –at least 5 when k A or k B is greater than 2 (e.g., a 2x3 design) –N must be sufficiently large to ensure that this is true