## lexber one year ago how do i make a line of best fit?

1. anonymous

You can use the method of least squares to find a regression line: https://en.wikipedia.org/wiki/Least_squares

2. anonymous

Of course it depends on what kind of "best fit" you're looking for. Do you have a data set you're trying to model with linear function?

3. lexber

i need to make a line of best fit out of this and write the approximate slope but im not understanding how to do it.

4. anonymous

You're looking for a line of the form $$\hat{y}=\beta_0+\beta_1x$$, and $$\beta_1$$ is the slope you want in the end. I don't know where you're at in terms of the theory behind regression, so for the sake brevity, you can determine the slope of the regression line using this formula: $\beta_1=\frac{\displaystyle\sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{\displaystyle\sum_{i=1}^n(x_i-\bar{x})^2}$where $$\bar{x}=\displaystyle\frac{1}{n}\sum_{i=1}^nx_i$$ (the average of all the x-coordinates of the given points). The same goes for $$\bar{y}$$, just replace $$x_i$$ with $$y_i$$. The plot gives you the points $$(x_i,y_i)$$ you need to compute the averages. So for example, the three bottom-leftmost points are $$(2.5,1)$$, $$(5,2)$$, and $$(7.5,2)$$. Your averages would be $\bar{x}=\frac{2.5+5+7.5}{3}=5\quad\quad\quad\bar{y}=\frac{1+2+2}{3}\approx1.67$ Then the best fit line FOR THESE THREE POINTS ONLY would be \begin{align*}\beta_1&=\frac{(2.5-5)(1-1.67)+(5-5)(2-1.67)+(7.5-5)(2-1.67)}{(2.5-5)^2+(5-5)^2+(7.5-5)^2}\\[1ex] &=0.2\end{align*} You have 17 points to account for, but this is basically a template for what you have to do.