QUESTION IMAGE
Question
find the equation for the least squares regression line of the data described below.
amy owns a car wash and has noticed that her business fluctuates throughout the year. she is curious to know whether these fluctuations are related to changes in the local pigeon population.
over several mornings, amy counted the number of pigeons that were sitting on power lines in her neighborhood each day, x, and the number of car washes that were purchased during that day, y.
| pigeons counted | car washes |
|---|---|
| 18 | 44 |
| 20 | 50 |
| 24 | 29 |
| 29 | 46 |
Step1: Calculate the means of \(x\) and \(y\)
Let \(x = [14,18,20,24,29]\) and \(y=[3,44,50,29,46]\).
\(\bar{x}=\frac{14 + 18+20+24+29}{5}=\frac{105}{5}=21\)
\(\bar{y}=\frac{3 + 44+50+29+46}{5}=\frac{172}{5}=34.4\)
Step2: Calculate the numerator and denominator for the slope \(m\)
The formula for the slope \(m\) of the least - squares regression line is \(m=\frac{\sum_{i = 1}^{n}(x_{i}-\bar{x})(y_{i}-\bar{y})}{\sum_{i = 1}^{n}(x_{i}-\bar{x})^{2}}\)
\(\sum_{i = 1}^{5}(x_{i}-\bar{x})(y_{i}-\bar{y})=(14 - 21)(3-34.4)+(18 - 21)(44 - 34.4)+(20 - 21)(50 - 34.4)+(24 - 21)(29 - 34.4)+(29 - 21)(46 - 34.4)\)
\(=(-7)(-31.4)+(-3)(9.6)+(-1)(15.6)+(3)(-5.4)+(8)(11.6)\)
\(=219.8-28.8 - 15.6-16.2 + 92.8=252\)
\(\sum_{i = 1}^{5}(x_{i}-\bar{x})^{2}=(14 - 21)^{2}+(18 - 21)^{2}+(20 - 21)^{2}+(24 - 21)^{2}+(29 - 21)^{2}\)
\(=(-7)^{2}+(-3)^{2}+(-1)^{2}+(3)^{2}+(8)^{2}\)
\(=49 + 9+1+9+64 = 132\)
\(m=\frac{252}{132}=\frac{21}{11}\approx1.909\)
Step3: Calculate the y - intercept \(b\)
The formula for the y - intercept \(b\) of the least - squares regression line is \(b=\bar{y}-m\bar{x}\)
\(b = 34.4-\frac{21}{11}\times21\)
\(b=34.4-\frac{441}{11}=\frac{378.4 - 441}{11}=\frac{-62.6}{11}\approx - 5.691\)
The equation of the least - squares regression line is \(y=mx + b\), so \(y=\frac{21}{11}x-\frac{62.6}{11}\) or \(y\approx1.909x-5.691\)
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
\(y=\frac{21}{11}x-\frac{62.6}{11}\) (or \(y\approx1.909x - 5.691\))