bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#!...
Transcript of bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#!...
366
bivariate tables / chapter 10
Bivariate Tables
• nominal and / or ordinal data
• What variable is dependent? Independent?
Bivariate Tables Independent variable
column
Dependent variable row
Bivariate Tables Independent variable
column
Dependent variable row
<-‐ row totals
<-‐ row totals
column total
column total
Bivariate Tables
cell
cell
cell
cell
Independent variable column
Dependent variable row
<-‐ row totals
<-‐ row totals
column total
column total
Bivariate Tables
2
7
5
3
gender male female
homeownership
own
rent
Bivariate Tables
2
7
5
3
gender male female
homeownership
own
rent
7 10 17
9
8
Column percentages
28.5%
70.0%
71.4%
30.0%
gender male female total
homeownership
own
rent
100% 100% 17
52.9%
47.1%
Bivariate tables
• Is there a relaKonship?
• What direcKon?
• What strength?
What would it look like if no relaKonship?
50%
50%
50%
50%
gender male female total
homeownership
own
rent
7 10 17
9
8
Why is this wrong?
50%
50%
50%
50%
gender male female total
homeownership
own
rent
7 10 17
9
8
What would it look like if no relaKonship?
3.7
5.3
3.3
4.7
gender male female total
homeownership
own
rent
7 10 17
9
8
What would it look like if no relaKonship?
52.8%
53.0%
47.2%
47.0%
gender male female total
homeownership
own
rent
7 10 17
9
8
Compare this to the null
28.5%
70.0%
71.4%
30.0%
gender male female total
homeownership
own
rent
100% 100% 17
52.9%
47.1%
Univariate table
Bivariate table
Bivariate tables
• Is there a relaKonship?
• What direcKon?
• What strength?
What would this look like if nothing going on?
No relaKonship
23%
29.2%
47.7% 47.7%
29.2%
23%
47.7% 47.7%
23% 23%
29.2% 29.2%
RelaKonship? DirecKon? Strength?
InterpretaKon
• Blacks, Hispanics much less likely than whites to agree with Tea Party
• How much less? 44% disagree vs. 28% disagree
• Hispanics much more likely to have no opinion of Tea Party
Is the relaKonship significant?
Chi Square Non-‐parametric sta:s:cs Chi-‐square test of independence, Chapter 10 & 11
Parametric staKsKcs assume:
interval normal large sample
Chi Square • Non parametrics: In social world, many things not
distributed “normal”
• Yes or No; • Religious or not religious; • Democrat, Republican, independent • Chi square tests hypotheses about the independence of
relaKonships between nominal and / ordinal variables
Hypothesis tesKng, again
• Null hypothesis: The variables in a table are independent of each other.
• We expect that what we observe in the relaKonship between two variables is random
• No pa]ern
Chi Square
• We compare that expecta:on to our actual observa:ons
• Formula for Chi-‐Square (X2) • X2 = Σ (fo -‐ fe )
2 . fe
• fe = expected frequencies in a category (cell) • fo = observed frequencies in a category (cell)
Chi Square
• Or, the sum of the squared differences between what we observe and what we expect if random / what we expect if things were random.
Chi Square
• State Null Hypotheses: • Support for Tea Party is independent of gender • A<tudes about child rearing are independent of ideology
Chi Square
• Step 1: Calculate expected cell frequencies • If no paPern, we expect that observaKons in a cross tabulaKon table are distributed propor%onately across the cells.
Chi Square: What do we expect if nothing going on?
Expected cell frequencies
fe • Cell A (25*20) / 40 = 12.5 • Cell B (25*20) / 40 = 12.5 • Cell C (20*15) / 40 = 7.5 • Cell D (20*15) / 40 = 7.5
Expected cell frequencies if no relaKonship
• Step 2: Calculate Chi Square • • X2 = Σ (fo -‐ fe )
2 . fe
calculate chi square
fo fe fo -‐ fe (fo-‐fe)2 (fo -‐ fe)2 / fe
• Cell A 15 12.5 2.5 6.25 .5 • Cell B 10 12.5 -‐2.5 6.25 .5 • Cell D 5 7.5 -‐2.5 6.25 .83 • Cell C 10 7.5 2.5 6.25 .83 sum = X2 = 2.66
Chi Square • Step 3: Check if you can reject null hypothesis • What "alpha", what level to reject at? .10, .05, .01? • Degrees of Freedom • DF = (R-‐1) (C-‐1) • r = number of rows • c = number of columns • 2-‐1 * 2-‐1 = 1
chi-‐square
• Chi-‐Sq. Table • • p. 486 • • 1 df X2 = 3.85 = sig at .05 • = 6.6 = sig at .01
Sample size issue
Sample size issues
Same substanKve effect, but now significant
Empty cells inflate Chi square
Empty cells inflate chi square