Lesson 7: Linear Regression and Correlation
September 20, 2017
Review:
- Scatterplots
- Sum of Squares
- Assignments on Slack
- #latelesson1 channel for Lesson 1-5
- Use #lesson06 for Monday, use #lesson07 for today
- Don’t use direct messages or “Slackbot” to post
- For help, send direct message to Preston: @pdeherrera
Presentation:
- Linear regression (simple, bivariate)
- Video
- Calculate equation of the regression line
- y-hat = b1*x + bo
- b1 = “slope” of the line
- b0 = “y-intercept”
- b1 = SSxy/SSxx
- b0 = (∑y/n) – b1*(∑x/n)
- y-hat = b1*x + bo
- Example
- Beer party data: {(60,10), (70,12), (80,20), (90,40)}
- Calculate slope (b1) and y-intercept (b0) for linear equation
- Correlation
- Video
- Pearson Correlation Coefficient
- r = SSxy/√(SSxx*SSyy)
- R-Squared =(r)^2
- Example
- Beer party data: {(60,10), (70,12), (80,20), (90,40)}
- Calculate Pearson Correlation Coefficient (r)
- Calculate R-Squared
Assignment:
- Use this simple data set: {(2,12), (4,9), (7,6), (11,3)}
- Calculate the slope and y-intercept for the regression line.
- Calculate the Pearson Correlation Coefficient
- Calculate R-Squared
- Use data from Lesson 6, Problems 1 and 2.
- Calculate the slope and y-intercept for the regression line.
- Calculate the Pearson Correlation Coefficient
- Calculate R-Squared
Study:
- Read Ch. 2.2., pp. 101-105, Correlation
- Read Ch. 2.3., pp. 108-115, Least Squares Regression
- Read AgainstAllOdds_StudentGuide_Unit11
- Read AgainstAllOdds_StudentGuide_Unit12