76

Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Embed Size (px)

Citation preview

Page 1: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 2: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

THEMYSTERIOUSCORRELATION

AdetectivestoryEvelinaGaba ová

@EVELGAB

Page 3: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 4: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 5: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 6: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 7: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 8: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

CORRELATIONISNOTCAUSATION!

Page 9: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

CORRELATIONANDCAUSATION

Page 10: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

EVERYONELOVESANICECORRELATION!

Page 11: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 12: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 13: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 14: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 15: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 16: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

CAUSALLANGUAGEFORCORRELATIONDATA

Page 17: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

THINGSTOCHECKcorrelationorcausation(randomisedstudy?)smallsamplesizeresultbychancehiddencause(latentvariable)

Page 18: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

DOSTORKSDELIVERBABIES?

Source:ClaudeCovo-Farchi

Page 19: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Testingthehypothesis

Matthews,R.(2000),StorksDeliverBabies(p=0.008).TeachingStatistics,22:36–38.

Page 20: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 21: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 22: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Storksandcountryarea

Page 23: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Birthrateandcountryarea

Page 24: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 25: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 26: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

PredictingsalarywithlinearregressionCountryYearsofprogrammingexperienceTabsandspacesusageDevelopertypeandlanguageLevelofformaleducation(e.g.bachelor’s,master’s,doctorate)WhethertheycontributetoopensourceWhethertheyprogramasahobbyCompanysize

Page 27: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

WHATHAPPENSIFWEREMOVETABSAND

SPACES?

Page 28: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 29: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

DivingdeeperintolinearregressionFullmodelwiththeinformationontabsandspacesincludedReducedmodelwithouttheinformationontabsandspaces

Page 30: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Coefficientofdeterminationhowmuchvarianceinsalarycanthemodelexplain

Model Coefficientofdetermination Adjusted

Fullmodel 0.4008 0.3892

Reducedmodel 0.3938 0.3892

R2 R2adj

Page 31: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

COLLINEARITY?

Page 32: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

WHATCHANGEDINTHEREDUCEDMODEL?

Page 33: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

MORESIGNIFICANTINTHEREDUCEDMODEL

YearsofprogrammingexperienceContributingtoopensourcePHP

Page 34: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

OPENSOURCE?

Page 35: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 36: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Opensourcecontributorsusespacesmorethantabs

Page 37: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 38: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

POTENTIALEXPLANATION?

Page 39: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Languageeffects?

Page 40: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Languageeffects?

Page 41: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

LANGUAGEANDOPENSOURCE?

Page 42: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

TABS,SPACES,OPENSOURCE&SALARY

Howdoesitfittogether?

Page 43: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 44: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

ExploringsalarydistributionsBASEDONEXPERIENCELEVEL

Page 45: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

What’sdifferentfortheseusers?…morestatisticaltesting

Page 46: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 47: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

TheimportanceofversioncontrolHighersalary Lowersalary

Git 168 660

Iusesomeothersystem 17 30

Subversion 4 47

TeamFoundationServer 6 92

Page 48: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

VERSIONCONTROLANDTABS/SPACES

## ## Pearson's Chi-squared test## ## data: .## X-squared = 258.48, df = 18, p-value < 2.2e-16

Page 49: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 50: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Versioncontrolandsalary

Page 51: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 52: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 53: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 54: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

GitandSubversion

Page 55: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

WHYISVERSIONCONTROLSOIMPORTANT?

Page 56: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 57: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

github.com/evelinag/tabs-spaces-talk

Page 58: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

BUTCANWETRUSTTHEDATA?

Page 59: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Salarydistribution

Page 60: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 61: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 62: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 63: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

WHAT’SWRONG?

Page 64: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 65: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 66: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 67: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

MISSINGDATA

Page 68: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

Statisticsofmissingdatamissingcompletelyatrandommissingatrandommissingnotatrandom

Page 69: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

DATATRAPSmissingdatawrongdata

accidentallyordeliberately

Page 70: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 71: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 72: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

CANYOUTRUSTDATA?

Page 73: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 74: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

INTERPRETATIONMachinelearningasaservice

Page 75: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017
Page 76: Evelian Gabasova - The mysterious correlation: a detective story - Codemotion Milan 2017

EVELINAGABASOVAConsultingdatadetective

@evelgabevelinag.com