How to Calculate the Correlation Coefficient. • Let (x1, y1),…,(xn, yn

Section 7.1 ­ Correlation
How closely related are two variables? Is the relationship linear? Data collected are bivariate. The correlation coefficient measures the strength of the LINEAR relationship between two variables.
We look at the direction and strength of the relationship and then we can find a line that best fits the data...the Least­Squares Line.
How to Calculate the Correlation Coefficient.
• Let (x1, y1),…,(xn, yn) represent n points on a scatterplot.
• Compute the means and the standard deviations of the x's and y’s.
• Then convert each x and y to standard units. • Average the products of the z­scores, divide by n – 1 instead of n. Example: Given (x, y): (1, 3) (7, 5) (13, 7), calculate the correlation coefficient.
How does the correlation coefficient measure the strength of the linear relationship?
Correlation Facts: • r is always between • Positive values of r indicate
• Negative values of r indicate • If r is close to ­1 or 1 • If r is close to 0 • When r is equal to ­1 or 1
• If r ≠ 0, then x and y • If r = 0, then x and y There could still be a relationship...just not a linear one.
Important Notes About Correlation:
• r is unitless. • r remains unchanged if...
• Outliers can greatly distort r
• Correlation is not causation. Just because two variables are correlated, that does not mean one causes the other. In fact, there could be a third variable correlated with both of the variables making it appear that they are correlated. Confounding
When a third variable is correlated with both of the variables of interest...
Read examples 7.1 and 7.2 on pages 509 through 511.
When a third variable is correlated with both of the variables of interest, then the variables will appear correlated. Experiments should be designed to eliminate confounding as much as possible...but that is a topic for another class.
In the homework for section 7.1 do problems 7 and 8 together. One problem shows the effects of confounding and the other shows none.