Top Banner
R we f#¢$ed? Why We Don't Understand Risk, and How it Dooms Us All
32

R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Aug 19, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Rwef#¢$ed?

WhyWeDon'tUnderstandRisk,andHowitDoomsUsAll

Page 2: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

StrangerswithCandy?

•  Yoursix‐year‐olddaughterislostinthecity.Whatshouldshedo?

www.flickr.com/photos/keyphotographics/2185720078

Page 3: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Seventhingsyoushouldknowaboutrisk

Page 4: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Risk

=Probability×Impact

1:

Page 5: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Models:notjustfordressingupandfallingdown

www.flickr.com/photos/edgun/2624354242

Page 6: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

2:Allmodelsarewrong,butsomeareuseful.

G.E.P.Box,Sta_s_cian

Page 7: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Housingpricesonlyevergoup!

Page 8: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Er,well…

RobertShiller,www.irra_onalexuberance.com

Page 9: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

#3:Coincidencesarenotsurprising

JessicaUcs:hcp://anson.ucdavis.edu/~ucs/AmerStat2003.pdf

Page 10: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Thesethingscouldneverhappen!

•  Twosubmarinescrashintheocean•  Meteorstrikesanairplane

•  Cosmicraysmakeacomputa_onfail

“Everythingweseehasaboutazeroprobability.Calcula_ngtheseprobabili_esaherthefactiskindofmeaningless.”– PeterWesjall

Page 11: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

#4:Condi_onalprobability:you’redoingitwrong

JessicaUcs:hcp://anson.ucdavis.edu/~ucs/AmerStat2003.pdf

Page 12: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Talkingonyourcellphonewhiledrivingistotallysafe

AAA(2001):– 1.5%ofdriversinaccidentswereusingacellphone

– 10.9%ofdriversweredistractedbyapassenger– OMG!Passengersaremoredangerousthancellphones?

Page 13: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

#5:Surveysandexperimentsprobablyhavebias

Page 14: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

“Sureofficer,I’lltellyouexactlywhatadumbassIjustwas.”

•  Furthercri_quebyMagliozzi&Magliozzi(2001):thisisvolunteeredinforma_on

•  hcp://_nyurl.com/R‐aaa‐study

©Pixar,Inc

Page 15: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

#6:Thepluralofanecdoteisnotdata

FrankKotsonis

Page 16: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Globalwarmingistotallybunk!

hcp://flowingdata.com/2009/07/20/important‐data‐please‐act‐responsibily/

Page 17: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

#7:Correla_ondoesn’timplycausa_on

Page 18: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Sugges_vely‐wagglingeyebrows

hcp://xkcd.com/552/

Page 19: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Open‐sourcesta_s_calanalysisandvisualiza_on

Page 20: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatcanyoudowithR?

•  Improveyourcareerprospects

Dice.com: "Is There an R in Your Future?” h,p://0nyurl.com/R‐dice‐video

Page 21: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatisR?

•  Risopen‐sourcesohwareforsta_s_calcompu_nganddatavisualiza_on.

•  Risanextensible,interac_veprogramminglanguage.

•  Rhasavastlibraryofmathema_calandsta_s_calalgorithms.

•  Rhasaworld‐widecommunityof1‐2millionusersanddevelopers.

•  RrunsonWindows,Mac,LinuxandUnixsystems.

Page 22: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhousesR?

•  Risusedbyanyonewhoneedsvisualizeorextractinforma_onfromdata:–  sta_s_cians,scien_sts,dataanalysts,dataminers,quan_ta_veanalysts,modelers,forecasters

•  Risusedtoanalyzeandpresentdataatorganiza_onslike:– Google,BankofAmerica,Pfizer,Facebook,Shell,theNewYorkTimes,theFoodandDrugAdministra_on

•  Risusedasafreealterna_vetoproductslike:–  SAS,SPSS,Stata,Sta_s_ca,S‐PLUS.

•  Risusedbyacademicstoimplementthelatestadvancesinsta_s_csandpredic_veanaly_cs

Page 23: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Rsaves_mefortheNewYorkTimes

•  Published3hoursaherJackson’sdeath:

nyt.com, June 25 2009

Page 24: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatcanyoudowithR?

•  Mash‐upmessydatasourcestoanalyzetheforeclosurecrisis

From O'Reilly's Data Mash-ups in R.

Page 25: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatcanyoudowithR?

•  FindacleanplacetosurfintheBayArea

John Oram, a scientist at the San Francisco Estuary Institute (SFEI) uses R to collect and monitor environmental data from the waters and wetlands of the Bay Area

Page 26: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatcanyoudowithR?

•  Comparebaseballplayerperformance

PitchFX Viewer, by Mike Driscoll: labs.dataspora.com/gameday/

Page 27: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatcanyoudowithR?

•  BuildaWebdashboard,fast.

From the "Learning R" blog, "R: From zero to Web 2.0 in six weeks"

Page 28: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

WhatcanyoudowithR?

•  Showthata_ppingpointingaymarriagesupportisnear.

The chart is based on a hierarchical model of polling data by Jeff Lax and Justin Philips using the glmer function in R

Page 29: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Let’sdoasimula_on!

•  Isthisyourbirthday?

6

January

Page 30: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

Simula_ngbirthdays

•  Asimplesimulation:

birthday <- function(n) { ntests <- 10000 pop <- 1:365 anydup <- function(i) any(duplicated( sample(pop, n, replace=TRUE))) sum(sapply(seq(ntests), anydup)) / ntests }

x <- foreach (j=1:100) %dopar% birthday (j)

Page 31: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

BirthdaySimula_on

> x <- foreach (j=1:100) %dopar% birthday (j) > plot(1:100, unlist(x),type="l")

Page 32: R we fucked? oscon.pdf · Who uses R? • R is used by anyone who needs visualize or extract informaon from data: – stascians, sciensts,

ThankYou!

•  DavidSmith–  david@revolu_on‐compu_ng.com,@revodavid

•  DaneseCooper–  danese@revolu_on‐compu_ng.com

•  REvolu_onCompu_ng–  Booth405:FreeMonkeysat6PM! – www.revolu_on‐compu_ng.com

•  Revolu1ons,theRblog–  blog.revolu_on‐compu_ng.com

•  RProject– www.r‐project.org