Q u antif y ing the strength of bi v ariate relationships C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College
Correlation Correlation coe � cient bet w een -1 and 1 Sign —> direction Magnit u de —> strength CORRELATION AND REGRESSION IN R
Near perfect correlation CORRELATION AND REGRESSION IN R
Strong CORRELATION AND REGRESSION IN R
Moderate CORRELATION AND REGRESSION IN R
Weak CORRELATION AND REGRESSION IN R
Zero CORRELATION AND REGRESSION IN R
Negati v e CORRELATION AND REGRESSION IN R
Non - linear CORRELATION AND REGRESSION IN R
Non - linear correlation run10 %>% filter(divPlace <= 10) %>% ggplot(aes(x = age, y = pace, color = gender)) + geom_point() CORRELATION AND REGRESSION IN R
Pearson prod u ct - moment correlation CORRELATION AND REGRESSION IN R
Pearson prod u ct - moment correlation ( i x − ¯) ( i y − ¯) ∑ i =1 n x y r ( x , y ) = ¯ 2 ∑ i =1 ¯ 2 ( x − ) ⋅ ( y − ) √ ∑ i =1 n n x y i i CORRELATION AND REGRESSION IN R
Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R
The Anscombe dataset C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College
Anscombe ggplot(data = Anscombe, aes(x = x, y = y)) + geom_point() + facet_wrap(~ set) CORRELATION AND REGRESSION IN R
Anscombe 1 Anscombe %>% filter(set == 1) %>% ggplot(aes(x = x, y = y)) + geom_point() CORRELATION AND REGRESSION IN R
Anscombe 2 Anscombe %>% filter(set == 2) %>% ggplot(aes(x = x, y = y)) + geom_point() CORRELATION AND REGRESSION IN R
Anscombe 3 Anscombe %>% filter(set == 3) %>% ggplot(aes(x = x, y = y)) + geom_point() CORRELATION AND REGRESSION IN R
Anscombe 4 Anscombe %>% filter(set == 4) %>% ggplot(aes(x = x, y = y)) + geom_point() CORRELATION AND REGRESSION IN R
Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R
Interpretation of Correlation C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College
E x ercise and beer 1 So u rce : h � p ://w ell . blogs . n y times . com /2015/12/02/ the - close - ties - bet w een - e x ercise - and - beer / CORRELATION AND REGRESSION IN R
E x ercise and beer 1 So u rce : h � p ://w ell . blogs . n y times . com /2015/12/02/ the - close - ties - bet w een - e x ercise - and - beer / CORRELATION AND REGRESSION IN R
E x ercise and beer 1 So u rce : h � p ://w ell . blogs . n y times . com /2015/12/02/ the - close - ties - bet w een - e x ercise - and - beer / CORRELATION AND REGRESSION IN R
E x ercise and beer 1 So u rce : h � p ://w ell . blogs . n y times . com /2015/12/02/ the - close - ties - bet w een - e x ercise - and - beer / CORRELATION AND REGRESSION IN R
E x ercise and beer 1 So u rce : h � p ://w ell . blogs . n y times . com /2015/12/02/ the - close - ties - bet w een - e x ercise - and - beer / CORRELATION AND REGRESSION IN R
E x ercise and beer 1 So u rce : h � p ://w ell . blogs . n y times . com /2015/12/02/ the - close - ties - bet w een - e x ercise - and - beer / CORRELATION AND REGRESSION IN R
E x ercise and beer CORRELATION AND REGRESSION IN R
E x ercise and beer CORRELATION AND REGRESSION IN R
E x ercise and beer CORRELATION AND REGRESSION IN R
E x ercise and beer CORRELATION AND REGRESSION IN R
NFL arrests 1 So u rce : h � ps ://www. n y times . com /2014/09/13/u pshot /w hat - the - n u mbers - sho w- abo u t - n �- pla y er - arrests . html CORRELATION AND REGRESSION IN R
NFL arrests CORRELATION AND REGRESSION IN R
NFL arrests CORRELATION AND REGRESSION IN R
NFL arrests CORRELATION AND REGRESSION IN R
Correlation v s . regression 1 So u rce : h � p ://www. n y times . com /2012/11/02/ b u siness / q u estions - raised - on - w ithdra w al - of - congressional - research - ser v ices - report - on - ta x- rates . html CORRELATION AND REGRESSION IN R
Correlation v s . regression 1 So u rce : h � p ://www. n y times . com /2012/11/02/ b u siness / q u estions - raised - on - w ithdra w al - of - congressional - research - ser v ices - report - on - ta x- rates . html CORRELATION AND REGRESSION IN R
Correlation v s . regression 1 So u rce : h � p ://www. n y times . com /2012/11/02/ b u siness / q u estions - raised - on - w ithdra w al - of - congressional - research - ser v ices - report - on - ta x- rates . html CORRELATION AND REGRESSION IN R
Can y o u plot a correlation ? 1 So u rce : h � p :// heatst . com /w orld / no - correlation - bet w een -v oting - for - bre x it - and - racism - st u d y-� nds / CORRELATION AND REGRESSION IN R
Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R
Sp u rio u s correlations C OR R E L ATION AN D R E G R E SSION IN R Ben Ba u mer Assistant Professor at Smith College
Sp u rio u s o v er time CORRELATION AND REGRESSION IN R
Sp u rio u s o v er time CORRELATION AND REGRESSION IN R
Sp u rio u s o v er space CORRELATION AND REGRESSION IN R
Sp u rio u s for w hate v er reason CORRELATION AND REGRESSION IN R
Let ' s practice ! C OR R E L ATION AN D R E G R E SSION IN R
Recommend
More recommend