drawing conclusions from data

48
Drawing Conclusions from Data An introduc4on to sta4s4cal tes4ng without equa4ons Metcalf Ins4tute 15 th Annual Science Immersion Workshop for Journalists Jonathan Stray Columbia University

Upload: jonathan-stray

Post on 18-May-2015

807 views

Category:

Education


1 download

DESCRIPTION

How data journalists can get stories from their data without fooling themselves. Includes statistical testing, correlation, causation, and more. A talk at the 15th Annual Science Immersion Workshop for Journalists at the Metcalf Institute for Marine & Environmental Reporting, Rhode Island.

TRANSCRIPT

Page 1: Drawing conclusions from data

Drawing  Conclusions  from  Data  An  introduc4on  to  sta4s4cal  tes4ng  

without  equa4ons  

Metcalf  Ins4tute  15th  Annual    Science  Immersion  Workshop    

for  Journalists    

Jonathan  Stray  Columbia  University  

Page 2: Drawing conclusions from data

You  see  a  story  in  the  data  Is  it  really  there?  

Page 3: Drawing conclusions from data

Why  wouldn't  there  be  a  story?  

•  You  misunderstand  how  the  data  is  collected  •  The  data  is  incomplete  or  bad    •  The  paIern  is  due  to  chance  •  The  paIern  is  real,  but  it  isn't  a  causal  rela4onship  

•  The  data  doesn't  generalize  the  way  you  want  it  to  

Page 4: Drawing conclusions from data

How  was  this  data  created?  

Page 5: Drawing conclusions from data

Inten4onal  or  uninten4onal  problems  

Page 6: Drawing conclusions from data

What  doesn't  a  TwiIer  map  show?  

Page 7: Drawing conclusions from data

NYC  popula4oncolored  by  income  

Page 8: Drawing conclusions from data

"Interview  the  data"  Where  do  these  numbers  come  from?  Who  recorded  them?  How?  For  what  purpose  was  this  data  collected?  How  do  we  know  it  is  complete?  What  are  the  demographics?  Is  this  the  right  way  to  quan4fy  this  issue?  Who  is  not  included  in  these  figures?  Who  is  going  to  look  bad  or  lose  money  as  a  result  of  these  numbers?  What  arbitrary  choices  had  to  be  made  to  generate  the  data?  Is  the  data  consistent  with  other  sources?  Who  has  already  analyzed  it?  Does  it  have  known  flaws?  Are  there  mul4ple  versions?  

.  

.    

Page 9: Drawing conclusions from data

What  stats  know-­‐how  gets  you  

•  You  misunderstand  how  the  data  is  collected  •  The  data  is  incomplete  or  bad    •  The  paIern  is  due  to  chance  •  The  paIern  is  real,  but  it  isn't  a  causal  rela4onship  

•  The  data  doesn't  generalize  the  way  you  want  it  to  

Page 10: Drawing conclusions from data

Sta4s4cal  tes4ng  

Assumes  the  data  is  good,  but  includes  an  element  of  chance.  

Then  the  first  ques4on  is:  is  the  paIern  a  coincidence...  or  not?    Or:  Is  "coincidence"  consistent  with  the  data?    

Page 11: Drawing conclusions from data

Is  this  die  loaded?  

Page 12: Drawing conclusions from data
Page 13: Drawing conclusions from data
Page 14: Drawing conclusions from data
Page 15: Drawing conclusions from data

First  rule  of  sta4s4cs  

Smaller  samples  have  more  variance.    That's  why  more  data  is  always  beIer,  from  the  point  of  view  of  sta4s4cal  tes4ng.    More  data  increases  "sta4s4cal  power."  

Page 16: Drawing conclusions from data

Are  these  two  dice  loaded?  

Page 17: Drawing conclusions from data

Two  dice:  non-­‐uniform  distribu4on  

Page 18: Drawing conclusions from data
Page 19: Drawing conclusions from data

The  Null  Hypothesis,  H0      

The  paIern  I  see  is  just  due  to  chance.    

Distribu4on  of  data  under  H0  =    what  might  the  data  look  like  if    generated  purely  by  chance?  

Page 20: Drawing conclusions from data

Comparing  two  sets  of  numbers    Let's  say  you  measure  the  grades  of  students  taught  by  two  different  classes  and  the  average  is  different.    Is  this  evidence  that  something  is  different  between  the  two  classes?  

Page 21: Drawing conclusions from data

Construc4ng  the  null  distribu4on    We  don't  have  a  theore4cal  argument  (like  the  dice.)    But  if  the  two  classes  are  really  the  same,  then  we  can  switch  students  between  them  if  we  want,  and  the  null  hypothesis  will  s4ll  hold.  

Page 22: Drawing conclusions from data

Construc4ng  the  null  distribu4on    Observed  data  Class  A  =  0.90    0.93    1.25    1.24  1.38  0.94  1.14  0.73  1.46  Class  B  =  1.15    0.88    0.90    0.74    1.21    Permuted  Data  Class  A  =  1.25  0.90  0.90  0.93  0.74  0.73  0.94  1.15  0.88  Class  B  =  1.21  1.14  1.46  1.38  1.24      

Page 23: Drawing conclusions from data

observed  difference  

Page 24: Drawing conclusions from data

How  sure  do  we  need  to  be?    These  plots  of  the  null  distribu4on  show  us  how  oeen  H0  will  look  like  a  paIern.  This  is  the  "p-­‐value."    If  p-­‐value  is  lower,  we  have  stronger  evidence  that  what  we  see  is  "real."    How  low  is  low  enough?  

Page 25: Drawing conclusions from data

Two  values  

"Significance"  is  how  sure  you  are  that  the  effect  you're  seeing  is  real.  "Effect  size"  is  how  big  the  effect  is.    Example:  class  grades  differed  by  3%,  p<0.05    Warning:  large  significance  doesn't  mean  a  large  effect!  

Page 26: Drawing conclusions from data

I  see  a  trend.  Is  it  "real"?  

Page 27: Drawing conclusions from data

Looking  for  correla4ons    Suppose  you  want  to  know  if  more  firearms  correlate  with  more  firearm  homicides.    First,  a  scaIerplot.  

Page 28: Drawing conclusions from data
Page 29: Drawing conclusions from data
Page 30: Drawing conclusions from data

Construc4ng  the  null  distribu4on    Again,  we  don't  have  a  theore4cal  distribu4on  that  tells  us  what  the  distribu4ons  of  firearms  and  homicides  should  be,  if  they're  independent.    But...  

Page 31: Drawing conclusions from data

Construc4ng  the  null  distribu4on    But...  if  X  and  Y  variables  are  truly  independent,  then  switching  which  X  goes  with  which  Y  won't  make  any  difference.  

Page 32: Drawing conclusions from data
Page 33: Drawing conclusions from data

A  correla4on  puzzle    Suppose  I  you  discover  that  the  students  with  the  top  5%  of  standardized  test  scores  come  from  smaller  classes.    Why?      

Page 34: Drawing conclusions from data
Page 35: Drawing conclusions from data

Have  we  learned  nothing?    Smaller  samples  will  always  have  higher  variance.    So  the  smaller  classes  will  have  higher  scores.  They  will  also  have  lower  scores.    Protect  yourself  from  reasoning  errors:  always  plot  null  distribu4ons.      

Page 36: Drawing conclusions from data
Page 37: Drawing conclusions from data
Page 38: Drawing conclusions from data

Have  I  really  found  the  cause?  

Page 39: Drawing conclusions from data

Suppose  you  apply  a  sta4s4cal  test,  and  the  smaller  classes  really  are  unlikely  to  have  scores  this  high  by  chance.    Was  it  really  because  of  the  smaller  class  size?      

Page 40: Drawing conclusions from data

You  will  invent  stories    about  your  data  

Page 41: Drawing conclusions from data
Page 42: Drawing conclusions from data

How  correla4on  happens  

YX

X  causes  Y  

YX

Y  causes  X  

YX

random  chance!  

YX

hidden  variable  causes  X  and  Y  

YX

Z  causes  X  and  Y  

Z

Page 43: Drawing conclusions from data

Guns  and  firearm  homicides?  

YX

if  you  have  a  gun,  you're  going  to  use  it  

YX

if  it's  a  dangerous  neighborhood,  you'll  buy  a  gun  

YX

the  correla4on  is  due  to  chance  

Page 44: Drawing conclusions from data
Page 45: Drawing conclusions from data

Beauty  and  responses  

YX

telling  a  woman  she's  beau4ful  doesn't  work  

YX

if  a  woman  is  beau4ful,      1)  she'll  respond  less      2)  people  will  tell  her  that  

Z

Beauty  is  a  "confounding  variable."  The  correla4on  is  real,  but  you've  misunderstood  the  causal  structure.  

Page 46: Drawing conclusions from data

Suppose  you  apply  a  sta4s4cal  test,  and  the  smaller  classes  really  are  unlikely  to  have  scores  this  high  by  chance.    Will  the  same  thing  be  true  in  other  states?        

Generalizability  

Page 47: Drawing conclusions from data

Are  those  three  students  you  interviewed  really  representa4ve  of  all  students?    Everyone  you  know  is  talking  about  it,  but  is  everyone  else?    What's  the  margin  of  error  of  this  poll?    The  sta4s4cs  of  generalizability:  another  4me...  

Generalizability  

Page 48: Drawing conclusions from data

In  Short  

•  First  ask  about  what  the  data  means,  where  it  came  from,  and  if  it's  good.  

•  Then  ask  about  coincidence.  Get  a  look  at  the  null  distribu4on.  

•  If  the  correla4on  is  significant,  then  ask  about  causality.  Rule  out  each  case.  

•  Are  your  results  standing  in  for  things  you  don't  actually  have  data  on?