linear regression\nuse linear regression to find the equation for the linear function that best fits this…

linear regression\nuse linear regression to find the equation for the linear function that best fits this data. round both numbers to two decimal places. write your final answer in a form of an equation y = mx + b\nx 1 2 3 4 5 6\ny 82 108 130 144 174 187\nquestion help: video message instructor\nsubmit question
Answer
Explanation:
Step1: Calculate sums
Let $n = 6$. $\sum_{i = 1}^{n}x_{i}=1 + 2+3 + 4+5 + 6=21$ $\sum_{i = 1}^{n}y_{i}=82 + 108+130 + 144+174 + 187 = 825$ $\sum_{i = 1}^{n}x_{i}^{2}=1^{2}+2^{2}+3^{2}+4^{2}+5^{2}+6^{2}=1 + 4+9 + 16+25 + 36 = 91$ $\sum_{i = 1}^{n}x_{i}y_{i}=1\times82+2\times108 + 3\times130+4\times144+5\times174+6\times187$ $=82+216+390+576+870+1122 = 3256$
Step2: Calculate slope $m$
The formula for $m$ is $m=\frac{n\sum_{i = 1}^{n}x_{i}y_{i}-\sum_{i = 1}^{n}x_{i}\sum_{i = 1}^{n}y_{i}}{n\sum_{i = 1}^{n}x_{i}^{2}-(\sum_{i = 1}^{n}x_{i})^{2}}$ Substitute the values: $m=\frac{6\times3256-21\times825}{6\times91 - 21^{2}}$ $=\frac{19536-17325}{546 - 441}=\frac{2211}{105}\approx21.06$
Step3: Calculate intercept $b$
The formula for $b$ is $b=\frac{\sum_{i = 1}^{n}y_{i}-m\sum_{i = 1}^{n}x_{i}}{n}$ Substitute $m\approx21.06$, $\sum_{i = 1}^{n}x_{i}=21$ and $\sum_{i = 1}^{n}y_{i}=825$ and $n = 6$ $b=\frac{825-21.06\times21}{6}$ $=\frac{825 - 442.26}{6}=\frac{382.74}{6}=63.79$
Answer:
$y = 21.06x+63.79$