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

question 8\nuse linear regression to find the equation for the linear function that best fits this data. round to two decimal places.\ny = \nhint
Answer
Explanation:
Step1: Calculate sums
Let $n = 6$. $\sum_{i = 1}^{n}x_i=1 + 2+3 + 4+5 + 6=\frac{6\times(6 + 1)}{2}=21$ $\sum_{i = 1}^{n}y_i=801+832 + 839+836+876+899 = 5083$ $\sum_{i = 1}^{n}x_i^2=1^2+2^2+3^2+4^2+5^2+6^2=\frac{6\times(6 + 1)\times(2\times6 + 1)}{6}=91$ $\sum_{i = 1}^{n}x_iy_i=1\times801+2\times832+3\times839+4\times836+5\times876+6\times899$ $=801+1664+2517+3344+4380+5394 = 18090$
Step2: Calculate slope $m$
The formula for the slope $m$ of the regression - line is $m=\frac{n\sum_{i = 1}^{n}x_iy_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: $n\sum_{i = 1}^{n}x_iy_i=6\times18090 = 108540$ $\sum_{i = 1}^{n}x_i\sum_{i = 1}^{n}y_i=21\times5083 = 106743$ $n\sum_{i = 1}^{n}x_i^2=6\times91 = 546$ $(\sum_{i = 1}^{n}x_i)^2=21^2 = 441$ $m=\frac{108540-106743}{546 - 441}=\frac{1797}{105}\approx17.11$
Step3: Calculate intercept $b$
The formula for the intercept $b$ is $b=\overline{y}-m\overline{x}$, where $\overline{x}=\frac{\sum_{i = 1}^{n}x_i}{n}=\frac{21}{6}=3.5$ and $\overline{y}=\frac{\sum_{i = 1}^{n}y_i}{n}=\frac{5083}{6}\approx847.17$ $b = 847.17-17.11\times3.5$ $b = 847.17-59.89$ $b\approx787.28$
Answer:
$y = 17.11x+787.28$