Presentation is loading. Please wait.

Presentation is loading. Please wait.

1.6 Linear Regression & the Correlation Coefficient.

Similar presentations


Presentation on theme: "1.6 Linear Regression & the Correlation Coefficient."— Presentation transcript:

1 1.6 Linear Regression & the Correlation Coefficient

2 Linear regression In data analysis, often want to determine if one variable (dependent/response) affected by another (independent/explanatory) Linear correlation –changes in Y tend to be proportional to changes in X Positive correlation –Y increases at constant rate while X increases Negative correlation –Y decreases at constant rate while X increases

3 Line of Best Fit Straight line that passes “as close as possible” to all the points on a scatterplot What does “as close as possible” mean? Linear regression –Analytic technique for determining relationship between Y and X –Usual method is least squares fit

4 Least Squares Fit Look at the square of the residual –Vertical distance between actual point and line of best fit Actual point Estimated point on line of best fit } Residual Want to minimize sum of the squares

5 Linear Regression Formulas y = ax + b Ick! We’ll let the computer calculate this for us

6 Linear Regression Use least squares to get equation of line of best fit The equation is a mathematical model of the relationship y = ax + b a is the slope, how y changes as x changes b is the y-intercept –Might be meaningless outside the data set

7 NOTE! Slope only tells you how Y varies with X on line of best fit Says nothing about strength of correlation The stronger the correlation, the more closely the data points cluster around the line of best fit How strong is strong?

8 The Correlation Coefficient, r r is quantitative measure of strength of linear relationship Related to product of deviations from means -1≤ r ≤1 r = 1 –Perfect positive correlation: all the points lie directly on the line of best fit r = -1 –Perfect negative correlation

9 The Correlation Coefficient, r When no correlation, Y equally likely to increase or decrease as X increases Deviations are randomly positive or negative Tend to cancel each other out r close to 0 if little or no correlation between variables

10 How r corresponds to strength of linear correlation -0.67 0 10.67-0.330.33 Correlation Coefficient, r Negative Linear Correlation StrongWeak Moderate StrongWeak Moderate Positive Linear Correlation

11 How to calculate r Ick! Get the computer to do it for you

12 Example A farmer records the following data: Open “1.6.1 Farmer example.ftm” Create a scatterplot and sketch at right Under Graph, use Least Squares Line Write the equation and the correlation coefficient Note: Fathom calculates r 2. How do you find r? What conclusion can you draw?

13 Solution y = r = Moderate positive linear correlation Slope: the yield goes up by 0.0618 tonnes per hectare for every degree increase in the mean temperature y-intercept: the yield is 1.66 tonnes per hectare at 0 ºC (does this make sense? Note: moderate correlation does not mean how fast Y varies with X 0.0618x + 1.66 0.467

14 Let’s go to the handouts!


Download ppt "1.6 Linear Regression & the Correlation Coefficient."

Similar presentations


Ads by Google