r we fucked? oscon.pdf · who uses r? • r is used by anyone who needs visualize or extract...

Post on 19-Aug-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Rwef#¢$ed?

WhyWeDon'tUnderstandRisk,andHowitDoomsUsAll

StrangerswithCandy?

•  Yoursix‐year‐olddaughterislostinthecity.Whatshouldshedo?

www.flickr.com/photos/keyphotographics/2185720078

Seventhingsyoushouldknowaboutrisk

Risk

=Probability×Impact

1:

Models:notjustfordressingupandfallingdown

www.flickr.com/photos/edgun/2624354242

2:Allmodelsarewrong,butsomeareuseful.

G.E.P.Box,Sta_s_cian

Housingpricesonlyevergoup!

Er,well…

RobertShiller,www.irra_onalexuberance.com

#3:Coincidencesarenotsurprising

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

Thesethingscouldneverhappen!

•  Twosubmarinescrashintheocean•  Meteorstrikesanairplane

•  Cosmicraysmakeacomputa_onfail

“Everythingweseehasaboutazeroprobability.Calcula_ngtheseprobabili_esaherthefactiskindofmeaningless.”– PeterWesjall

#4:Condi_onalprobability:you’redoingitwrong

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

Talkingonyourcellphonewhiledrivingistotallysafe

AAA(2001):– 1.5%ofdriversinaccidentswereusingacellphone

– 10.9%ofdriversweredistractedbyapassenger– OMG!Passengersaremoredangerousthancellphones?

#5:Surveysandexperimentsprobablyhavebias

“Sureofficer,I’lltellyouexactlywhatadumbassIjustwas.”

•  Furthercri_quebyMagliozzi&Magliozzi(2001):thisisvolunteeredinforma_on

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

©Pixar,Inc

#6:Thepluralofanecdoteisnotdata

FrankKotsonis

Globalwarmingistotallybunk!

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

#7:Correla_ondoesn’timplycausa_on

Sugges_vely‐wagglingeyebrows

hcp://xkcd.com/552/

Open‐sourcesta_s_calanalysisandvisualiza_on

WhatcanyoudowithR?

•  Improveyourcareerprospects

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

WhatisR?

•  Risopen‐sourcesohwareforsta_s_calcompu_nganddatavisualiza_on.

•  Risanextensible,interac_veprogramminglanguage.

•  Rhasavastlibraryofmathema_calandsta_s_calalgorithms.

•  Rhasaworld‐widecommunityof1‐2millionusersanddevelopers.

•  RrunsonWindows,Mac,LinuxandUnixsystems.

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

Rsaves_mefortheNewYorkTimes

•  Published3hoursaherJackson’sdeath:

nyt.com, June 25 2009

WhatcanyoudowithR?

•  Mash‐upmessydatasourcestoanalyzetheforeclosurecrisis

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

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

WhatcanyoudowithR?

•  Comparebaseballplayerperformance

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

WhatcanyoudowithR?

•  BuildaWebdashboard,fast.

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

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

Let’sdoasimula_on!

•  Isthisyourbirthday?

6

January

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)

BirthdaySimula_on

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

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

top related