Contingency Tables (cross tabs) Generally used when variables
are nominal and/or ordinal Even here, should have a limited number
of variable attributes (categories) Even here, should have a
limited number of variable attributes (categories) Some find these
very intuitiveothers struggle It is very easy to misinterpret these
critters It is very easy to misinterpret these critters
Slide 2
Interpreting a Contingency Table WHAT IS IN THE INDIVIDUAL
CELLS? The number of cases that fit in that particular cell The
number of cases that fit in that particular cell In other words,
frequencies (number of cases that fit criteria)In other words,
frequencies (number of cases that fit criteria) For small tables,
and/or small sample sizes, it may be possible to detect
relationships by eyeballing frequencies. For most.. For small
tables, and/or small sample sizes, it may be possible to detect
relationships by eyeballing frequencies. For most.. Convert to
Percentages: a way to standardize cells and make relationships more
apparentConvert to Percentages: a way to standardize cells and make
relationships more apparent
Slide 3
Example 1 Random sample of UMD students to examine political
party membership Are UMD students more likely to belong to
particular political parties? Are UMD students more likely to
belong to particular political parties? DemocratDemocrat
RepublicanRepublican IndependentIndependent GreenGreen (N=40 UMD
students) (N=40 UMD students)
Slide 4
Univariate Table Univariate Table Null: The distribution is
even across all categories. (N=40 UMD students) CategoriesF%
Republican1230% Democrat1435% Independent923% Green510%
Slide 5
Example 2 A survey of 10,000 U.S. residents Is ones political
view related to attitudes towards police? What are the DV and IV?
What are the DV and IV? Convention for bivariate tables The IV is
on the top of the table (dictates columns) The IV is on the top of
the table (dictates columns) The DV is on the side (dictates rows).
The DV is on the side (dictates rows).
Slide 6
Bivariate Table Attitude Towards Police Political Party Total
RepubDemocratLibertarianSocialist Favorable29002100180305210
Unfav.19001800160283888 Total48003900340589098
Slide 7
The Percentages of Interest Attitude Towards Police Political
Party Total RepubDemocratLibertarianSocialist Favorable2900 (60%)
2100 (54%) 180 (53%) 30 (52%) 5210 Unfav19001800160283888
Total48003900340589098
Slide 8
The Test Statistic for Contingency Tables Chi Square, or 2
Calculation Calculation Observed frequencies (your sample
data)Observed frequencies (your sample data) Expected frequencies
(UNDER NULL)Expected frequencies (UNDER NULL) Intuitive: how
different are the observed cell frequencies from the expected cell
frequencies Intuitive: how different are the observed cell
frequencies from the expected cell frequencies Degrees of Freedom:
Degrees of Freedom: 1-way = K-11-way = K-1 2-way = (# of Rows -1)
(# of Columns -1)2-way = (# of Rows -1) (# of Columns -1)
Slide 9
One-Way CHI SQUARE The most simple form of the Chi square is
the one-way Chi square test For Univariate Table Do frequencies
observed differ significantly from an even distribution?Do
frequencies observed differ significantly from an even
distribution? Null hypothesis: there are no differences across the
categories in the populationNull hypothesis: there are no
differences across the categories in the population
Slide 10
Chi Square: Steps 1. Find the expected (under null hypothesis)
cell frequencies 2. Compare expected & observed frequencies
cell by cell 3. If null hypothesis is true, expected and observed
frequencies should be close in value 4. Greater the difference
between the observed and expected frequencies, the greater the
possibility of rejecting the null
Slide 11
Calculating 2 2 = [(f o - f e ) 2 /f e ] Where F e = Row
Marginal X Column Marginal Where F e = Row Marginal X Column
MarginalN So, for each cell, calculate the difference between the
actual frequencies (observed) and what frequencies would be
expected if the null was true (expected). Square, and divide by the
expected frequency. Add the results from each cell.
Slide 12
1-WAY CHI SQUARE 1-way Chi Square Example: There is an even
distribution of membership across 4 political parties (N=40 UMD
students) Find the expected cell frequencies ( F e = N / K) Find
the expected cell frequencies ( F e = N / K) Categories FoFoFoFo
FeFeFeFe Republican1210 Democrat1410 Independ.910 Green510
Slide 13
1-WAY CHI SQUARE 1-way Chi Square Example: There is an even
distribution of membership across 4 political parties (N=40 UMD
students) Compare observed & expected frequencies cell-by-cell
Compare observed & expected frequencies cell-by-cell Categories
FoFoFoFo FeFeFeFe f o - f e Republican12102 Democrat14104
Independ.910 Green510-5
Slide 14
1-WAY CHI SQUARE 1-way Chi Square Example: There is an even
distribution of membership across 4 political parties (N=40 UMD
students) Square the difference between observed & expected
frequencies Square the difference between observed & expected
frequencies Categories FoFoFoFo FeFeFeFe f o - f e (f o - f e ) 2
Republican121024 Democrat1410416 Independ.9101 Green510-525
Slide 15
1-WAY CHI SQUARE 1-way Chi Square Example: There is an even
distribution of membership across 4 political parties (N=40 UMD
students) Divide that difference by expected frequency Divide that
difference by expected frequency Categories FoFoFoFo FeFeFeFe f o -
f e (f o - f e ) 2 (f o - f e ) 2 /f e Republican1210240.4
Democrat14104161.6 Independ.91010.1 Green510-5252.5 ====4.6
Slide 16
Interpreting Chi-Square Chi-square has no intuitive meaning, it
can range from zero to very large As with other test statistics,
the real interest is the p value associated with the calculated
chi-square value As with other test statistics, the real interest
is the p value associated with the calculated chi-square value
Conventional testing = find 2 (critical) for stated alpha (.05,.01,
etc.)Conventional testing = find 2 (critical) for stated alpha
(.05,.01, etc.) Reject if 2 (observed) is greater than 2 (critical)
Reject if 2 (observed) is greater than 2 (critical) SPSS: find the
exact probability of obtaining the 2 under the null (reject if less
than alpha)SPSS: find the exact probability of obtaining the 2
under the null (reject if less than alpha)
Slide 17
Example of Chi-Square Sampling Distributions (Assuming Null is
True)
Slide 18
Interpreting 2 the old fashioned way: The UMD political party
example Chi square = 4.6 df (1-way Chi square) = K-1 = 3 X 2
(critical) (p
2-WAY CHI SQUARE Compare expected & observed frequencies
cell by cellCompare expected & observed frequencies cell by
cell X 2 (obtained) = 4.920X 2 (obtained) = 4.920 df= (r-1)(c-1) =
1 X 1 = 1df= (r-1)(c-1) = 1 X 1 = 1 X 2 (critical) for alpha of.05
is 3.841 (Healey Appendix C)X 2 (critical) for alpha of.05 is 3.841
(Healey Appendix C) Obtained > CriticalObtained > Critical
CONCLUSION:CONCLUSION: Reject the null: There is a relationship
between the team that students root for and their opinion of Brett
Favre (p