bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#!...

45
366 bivariate tables / chapter 10

Transcript of bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#!...

Page 1: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

366  

bivariate  tables  /  chapter  10  

Page 2: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  Tables  

•  nominal  and  /  or  ordinal  data  

•  What  variable  is  dependent?    Independent?  

Page 3: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  Tables  Independent  variable  

column  

Dependent  variable        row  

Page 4: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  Tables  Independent  variable  

column  

Dependent  variable        row  

<-­‐  row  totals  

<-­‐  row  totals  

column    total  

column    total  

Page 5: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  Tables  

                     cell  

           cell  

                           cell  

             cell  

Independent  variable  column  

Dependent  variable        row  

<-­‐  row  totals  

<-­‐  row  totals  

column    total  

column    total  

Page 6: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  Tables  

 2  

               7  

                       5      

               3    

gender  male      female  

homeownership    

   own        

     rent  

Page 7: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  Tables  

 2  

               7  

                       5      

               3    

gender  male      female  

homeownership    

   own        

     rent  

         7            10                17    

9  

8  

Page 8: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Column  percentages  

 28.5%  

               70.0%  

                 71.4%      

               30.0%    

   gender  male      female                  total  

homeownership    

   own        

     rent  

         100%                      100%                          17    

52.9%  

47.1%  

Page 9: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  tables  

•  Is  there  a  relaKonship?  

•  What  direcKon?  

•  What  strength?  

Page 10: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

What  would  it  look  like  if  no  relaKonship?    

 50%  

               50%  

                 50%      

               50%  

   gender  male      female                  total  

homeownership    

   own        

     rent  

       7                                          10                          17    

9  

8  

Page 11: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Why  is  this  wrong?  

 50%  

               50%  

                 50%      

               50%  

   gender  male      female                  total  

homeownership    

   own        

     rent  

       7                                          10                          17    

9  

8  

Page 12: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 13: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 14: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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%  

Page 15: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’
Page 16: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’
Page 17: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Univariate  table  

Page 18: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’
Page 19: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  table  

Page 20: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’
Page 21: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Bivariate  tables  

•  Is  there  a  relaKonship?  

•  What  direcKon?  

•  What  strength?  

Page 22: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

What  would  this  look  like  if  nothing  going  on?  

Page 23: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

No  relaKonship  

23%  

29.2%  

47.7%   47.7%  

29.2%  

23%  

47.7%   47.7%  

23%   23%  

29.2%   29.2%  

Page 24: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

RelaKonship?  DirecKon?  Strength?  

Page 25: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 26: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Is  the  relaKonship  significant?  

Page 27: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Chi  Square  Non-­‐parametric  sta:s:cs      Chi-­‐square  test  of  independence,  Chapter  10  &  11      

 Parametric  staKsKcs  assume:      

     interval        normal        large  sample  

   

Page 28: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 29: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 30: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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)  

Page 31: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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.  

Page 32: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Chi  Square  

•  State  Null  Hypotheses:          •  Support  for  Tea  Party  is  independent  of  gender      •  A<tudes  about  child  rearing  are  independent  of  ideology    

Page 33: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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.  

Page 34: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Chi  Square:  What  do  we  expect  if  nothing  going  on?  

Page 35: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 36: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Expected  cell  frequencies  if  no  relaKonship  

Page 37: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

•  Step  2:    Calculate  Chi  Square  •     •  X2  =      Σ      (fo    -­‐  fe  )

2          .                          fe  

Page 38: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 39: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

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  

Page 40: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

chi-­‐square  

•    Chi-­‐Sq.  Table  •     •      p.  486  •     •      1  df    X2  =  3.85  =  sig  at  .05  •                                 =  6.6      =  sig  at  .01  

Page 41: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Sample  size  issue  

Page 42: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Sample  size  issues  

Page 43: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Same  substanKve  effect,  but  now  significant  

Page 44: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Empty  cells  inflate  Chi  square  

Page 45: bivariate#tables#/# chapter#10#faculty.wwu.edu/~donovat/chi_sq13.pdf · Column#percentages#! 28.5%!!!!!70.0% # 71.4% ## # 30.0% ’’gender male # ##female # #####total# homeownership’

Empty  cells  inflate  chi  square