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\n| x | 1 | 2 | 3 | 4 | 5 | 6 |\n| y | 105 | 124 | 136 | 157 | 179 | 204 |\nquestion help: video message instructor\nsubmit question
Answer
Explanation:
Step1: Calculate the means of x and y
$n = 6$ $\bar{x}=\frac{1 + 2+3+4+5+6}{6}=\frac{21}{6}=3.5$ $\bar{y}=\frac{105 + 124+136+157+179+204}{6}=\frac{905}{6}\approx150.83$
Step2: Calculate the numerator and denominator for slope m
$\sum_{i = 1}^{n}(x_i-\bar{x})(y_i - \bar{y})=(1 - 3.5)(105-150.83)+(2 - 3.5)(124 - 150.83)+(3 - 3.5)(136-150.83)+(4 - 3.5)(157-150.83)+(5 - 3.5)(179-150.83)+(6 - 3.5)(204-150.83)$ $=(- 2.5)(-45.83)+(-1.5)(-26.83)+(-0.5)(-14.83)+(0.5)(6.17)+(1.5)(28.17)+(2.5)(53.17)$ $=114.575 + 40.245+7.415 + 3.085+42.255+132.925$ $=340.5$ $\sum_{i = 1}^{n}(x_i-\bar{x})^2=(1 - 3.5)^2+(2 - 3.5)^2+(3 - 3.5)^2+(4 - 3.5)^2+(5 - 3.5)^2+(6 - 3.5)^2$ $=(-2.5)^2+(-1.5)^2+(-0.5)^2+(0.5)^2+(1.5)^2+(2.5)^2$ $=6.25+2.25 + 0.25+0.25+2.25+6.25$ $=17.5$ $m=\frac{\sum_{i = 1}^{n}(x_i-\bar{x})(y_i - \bar{y})}{\sum_{i = 1}^{n}(x_i-\bar{x})^2}=\frac{340.5}{17.5}\approx19.46$
Step3: Calculate the y - intercept b
$b=\bar{y}-m\bar{x}$ $b = 150.83-19.46\times3.5$ $b=150.83 - 68.11$ $b = 82.72$
Answer:
$y = 19.46x+82.72$