Stat 104 – Lecture 6 Correlation • Linear Association –How closely do the points on the scatter plot represent a straight line? –The correlation coefficient gives the direction of and quantifies the strength of the linear association between two quantitative variables. 1 Correlation • Standardize y • Standardize x zy = y− y sy zx = x−x sx 2 Standardized Bite Force Bite Force vs Body Mass of Canidae 3 2 1 0 -1 -1 0 1 2 Standardized Body Mass 3 3 1 Stat 104 – Lecture 6 Correlation Coefficient zx z y ∑ r= n −1 ( x − x )( y − y ) r=∑ (n − 1)s x s y 4 Correlation Coefficient • Body mass and Bite force zx z y ∑ r= n −1 = 26 .4796 27 • r = 0.9807 5 Correlation Coefficient • There is a very strong positive correlation, linear association, between the body mass and bite force for the various species of Canidae. 6 2 Stat 104 – Lecture 6 JMP • Analyze – Multivariate methods – Multivariate • Y, Columns – – Body mass BF ca (Bite force at the canine) 7 Multivariate Correlations Body Mass (kg) BFca (N) Body Mass (kg) 1.0000 0.9807 BFca (N) 0.9807 1.0000 Scatterplot Matrix 40 35 30 25 Body 20 Mass (kg) 15 10 5 500 400 300 BFca (N) 200 100 8 5 10 15 20 25 30 35 40 100 200 300 400 50 Correlation Properties • The sign of r indicates the direction of the association. • The value of r is always between –1 and +1. • Correlation has no units. • Correlation is not affected by changes of center or scale. 9 3 Stat 104 – Lecture 6 Algebra Review • The equation of a straight line • y = mx + b – m is the slope – the change in y over the change in x – or rise over run. – b is the y-intercept – the value where the line cuts the y axis. 10 y = 3x + 2 15 10 y 5 0 -5 -10 -15 -5 -4 -3 -2 -1 0 1 2 x 3 4 5 11 Review • y = 3x + 2 –x = 0 y = 2 (y-intercept) –x = 3 y = 11 –Change in y (+9) divided by the change in x (+3) gives the slope, 3. 12 4