## Lesson 17: Linear Regression

November 5, 2019

Review:

- Scatterplots
- Sum of Squares

Presentation:

- Video
- Linear regression (simple, bivariate)
- Calculate equation of the regression line
- y-hat = b1*x + bo
- b1 = “slope” of the line
- b0 = “y-intercept”

- Calculate Sum of Squares: SSxx, SSyy, SSxy
- 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
- Estimate Beer consumption when temperature is 75 degrees
- Download Complete Example

- Calculate equation of the regression line

Activity: **Submit this work before leaving class**!!

- Forecast 2020 voter turnout in Pueblo County using the data below
- Create a Scatterplot
- Calculate Sum of Squares: SSxx, SSyy, SSxy
- Calculate slope and intercept for the regression line and write the linear equation
- Use the regression equation to forecast Ballots Cast in 2020
- Hints
- Use Time Period as the independent (x) variable
- Use Ballots Cast as the dependent (y) variable
- To forecast 2020 turnout, solve for y-hat when x = 5

- Hints

Presidential Election Year | Time Period | Ballots Cast |

2004 | 1 | 68,371 |

2008 | 2 | 73,881 |

2012 | 3 | 77,671 |

2016 | 4 | 78,652 |

Assignment:

- Study for Quiz on Monday covering Scatterplots, Sum of Squares and Linear Regression