Sociology 601 Lecture 11: October 6, 2009 No office hours Oct. 15, but available all day Oct. 16 Homework Contingency Tables for Categorical Variables.

Slides:



Advertisements
Similar presentations
Contingency Table Analysis Mary Whiteside, Ph.D..
Advertisements

Categorical Data Analysis
Contingency Tables For Tests of Independence. Multinomials Over Various Categories Thus far the situation where there are multiple outcomes for the qualitative.
Chapter 11 Other Chi-Squared Tests
Contingency Tables Chapters Seven, Sixteen, and Eighteen Chapter Seven –Definition of Contingency Tables –Basic Statistics –SPSS program (Crosstabulation)
15- 1 Chapter Fifteen McGraw-Hill/Irwin © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved.
Basic Statistics The Chi Square Test of Independence.
Statistical Inference for Frequency Data Chapter 16.
Sociology 601 Class 8: September 24, : Small-sample inference for a proportion 7.1: Large sample comparisons for two independent sample means.
Chapter 13: The Chi-Square Test
Sociology 601 Class 13: October 13, 2009 Measures of association for tables (8.4) –Difference of proportions –Ratios of proportions –the odds ratio Measures.
 Last time we discussed t-tests: how to use sample means of quantitative variables to make inferences about parameters.  Today we’ll use the very same.
Loglinear Models for Contingency Tables. Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical.
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
Sociology 601 Class 10: October 1, : Small sample comparisons for two independent groups. o Difference between two small sample means o Difference.
12.The Chi-square Test and the Analysis of the Contingency Tables 12.1Contingency Table 12.2A Words of Caution about Chi-Square Test.
Sociology 601: Midterm review, October 15, 2009
Sociology 601 Class12: October 8, 2009 The Chi-Squared Test (8.2) – expected frequencies – calculating Chi-square – finding p When (not) to use Chi-squared.
Cross-Tabulations.
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
Presentation 12 Chi-Square test.
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.
© 2008 McGraw-Hill Higher Education The Statistical Imagination Chapter 13: Nominal Variables: The Chi-Square and Binomial Distributions.
For testing significance of patterns in qualitative data Test statistic is based on counts that represent the number of items that fall in each category.
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.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Copyright © 2009 Pearson Education, Inc LEARNING GOAL Interpret and carry out hypothesis tests for independence of variables with data organized.
Chapter 13: Categorical Data Analysis Statistics.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Lecture 15: Crosstabulation 1 Sociology 5811 Copyright © 2005 by Evan Schofer Do not copy or distribute without permission.
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 14: Chi-Square Procedures – Test for Goodness of Fit.
CHI SQUARE TESTS.
© 2000 Prentice-Hall, Inc. Statistics The Chi-Square Test & The Analysis of Contingency Tables Chapter 13.
Chi Square Classifying yourself as studious or not. YesNoTotal Are they significantly different? YesNoTotal Read ahead Yes.
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.
Aim: How do we analyze data with a two-way table?
CHAPTER INTRODUCTORY CHI-SQUARE TEST Objectives:- Concerning with the methods of analyzing the categorical data In chi-square test, there are 2 methods.
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.
Chapter 11: Chi-Square  Chi-Square as a Statistical Test  Statistical Independence  Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
N318b Winter 2002 Nursing Statistics Specific statistical tests Chi-square (  2 ) Lecture 7.
Copyright © Cengage Learning. All rights reserved. Chi-Square and F Distributions 10.
Data Lab # 4 June 16, 2008 Ivan Katchanovski, Ph.D. POL 242Y-Y.
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.
Week 13a Making Inferences, Part III t and chi-square tests.
Making Comparisons All hypothesis testing follows a common logic of comparison Null hypothesis and alternative hypothesis – mutually exclusive – exhaustive.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Lesson 12 - R Chapter 12 Review. Objectives Summarize the chapter Define the vocabulary used Complete all objectives Successfully answer any of the review.
Bullied as a child? Are you tall or short? 6’ 4” 5’ 10” 4’ 2’ 4”
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.
Cross Tabs and Chi-Squared Testing for a Relationship Between Nominal/Ordinal Variables.
THE CHI-SQUARE TEST BACKGROUND AND NEED OF THE TEST Data collected in the field of medicine is often qualitative. --- For example, the presence or absence.
1 ES9 A random sample of registered voters was selected and each was asked his or her opinion on Proposal 129, a property tax reform bill. The distribution.
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 © 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.
Chi-Square hypothesis testing
Chapter 9: Non-parametric Tests
Presentation 12 Chi-Square test.
Making Comparisons All hypothesis testing follows a common logic of comparison Null hypothesis and alternative hypothesis mutually exclusive exhaustive.
Hypothesis Testing Review
Chi Square Two-way Tables
Chapter 10 Analyzing the Association Between Categorical Variables
Chapter 26 Comparing Counts.
Presentation transcript:

Sociology 601 Lecture 11: October 6, 2009 No office hours Oct. 15, but available all day Oct. 16 Homework Contingency Tables for Categorical Variables (8.1) some useful probabilities and hypothesis tests based on contingency tables independence redefined. The Chi-Squared Test (8.2) [Thursday] When to use Chi-squared tests (8.3) [Thursday] chi-squared residuals

Homework Stata ttests: means and proportions – using categorical, dummy, interval/continuous variables P values with the T table: t=3, n=9, what is P? # 30 – industrial plant – part C # 52 – random number generator Small sample significance test # 54 – e is incorrect

3

Definitions for a 2X2 contingency table Let X and Y denote two categorical variables Variable X (Explanatory/Independent variable) can have one of two values: X = 1 or X = 2 Variable Y (Response/Dependent variable) can have one of two values: Y = 1 or Y = 2 n ij denotes the count of responses in a cell in a table

Structure for a 2X2 contingency table Values for X and Y variables are arrayed as follows: Value of Y: 12 Value of X: 1n 11 n 12 total X=1 2n 21 n 22 total X=2 total Y=1total Y=2(grand total)

Some useful definitions The unconditional probability P(Y = 1): = (n 11 + n 21 )/ (n 11 + n 12 + n 21 + n 22 ) = the marginal probability that Y equals 1 The conditional probability P(Y = 1, given X = 1):= n 11 / (n 11 + n 12 ) = P ((Y = 1) | (X = 1)) The joint probability P(Y = 1 and X = 1): = n 11 / (n 11 + n 12 + n 21 + n 22 ) = P ((Y = 1)  (X = 1)) = the cell probability for cell (1,1)

Example: Support Law Enforcement? YesNoTot Support health Yes care spending? No14923 Tot What is the unconditional probability of favoring increased spending on law enforcement? What is the conditional probability of favoring increased spending on law enforcement for respondents who opposed increased spending on health? What is the joint probability of favoring increased spending on law enforcement and opposing increased spending on health?

Hypothesis tests based on contingency tables: Usually we ask: is the distribution of Y when X=1 different than the distribution of Y when X=2? Null Hypothesis: the conditional distributions of Y, given X, are equal. H o : P ((Y = 1) | (X = 1)) – P((Y = 1) | (X = 2)) = 0 alternatively, H o :  Y|X=1 -  Y|X=2 = 0 This type of question often comes up because of its causal implications. For example: “Are childless adults more likely to vote for school funding than parents?”

A confusing new definition for independence Previously we used the term independence to refer to groups of observations. “White and hispanic respondents were sampled independently.” In this chapter, we use independence to refer to a property of variables, not observations. “Political orientation is independently distributed with respect to ethnicity” Two categorical variables are independent if the conditional distributions of one variable are identical at each category of the other variable. DemocratIndependentRepublicanTotal white black hispanic Total

Contingency tables in STATA The 1991 General Social Survey Contains data on Party Identification and Gender for 980 respondents. See Table 8.1, page 250 in A&F Here is a program for inputting the data into STATA interactively: input str10 gender str12 party number female democrat 279 male democrat 165 female independent 73 male independent 47 female republican 225 male republican 191 end

Contingency tables in STATA Here is a command to create a contingency table, and its output. tabulate gender party [freq=number] | party gender | democrat independe republica | Total female | | 577 male | | Total | | 980 The following slide adds row, column, and cell %

. tabulate gender party [freq=number], row column cell | Key | | | | frequency | | row percentage | | column percentage | | cell percentage | | party gender | democrat independe republica | Total female | | 577 | | | | | | male | | 403 | | | | | | Total | | 980 | | | | | |

8.2 Developing a new statistical significance test for contingency tables. support tax reform? YesNoTot supportYes environment?No Tot “Is the level of support for the environment dependent on the level of support for tax reform.” If so, these two measures are likely to have some causal link worth investigating.

With a 2x2 table, we can use a t-test for independent-sample proportions.. prtesti Two-sample test of proportion x: Number of obs = 250 y: Number of obs = Variable | Mean Std. Err. z P>|z| [95% Conf. Interval] x | y | diff | | under Ho: diff = prop(x) - prop(y) z = Ho: diff = 0 Ha: diff 0 Pr(Z z) =

Moving beyond 2x2 tables: Comparing conditional probabilities is fine when there are only two comparisons and two possible outcomes for each comparison. The Chi-Square (  2 ) test is a new technique for making comparisons more flexible.  2 is like a null hypothesis that every cell should have the frequency you would expect if the variables were independently distributed. f e is the expected count for each cell. f e = total N * unconditional row probability * unconditional column probability A test for the whole table will combine tests for f e for every cell.