Respuesta :
Answer:
[tex]m=\dfrac{3}{2}[/tex]
Step-by-step explanation:
Given points are: ( 1 , 3 ) , ( 2 , 3 ) and ( 3 , 6 )
The average of x-coordinate will be:
[tex]\overline{x} = \dfrac{x_1+x_2+x_3}{\text{number of points}}[/tex]
1) Finding [tex](\overline{x},\overline{y})[/tex]
- Average of the x coordinates:
[tex]\overline{x} = \dfrac{1+2+3}{3}[/tex]
[tex]\overline{x} = 2[/tex]
- Average of the y coordinates:
similarly for y
[tex]\overline{y} = \dfrac{3+3+6}{3}[/tex]
[tex]\overline{y} = 4[/tex]
2) Finding the line through [tex](\overline{x},\overline{y})[/tex] with slope m.
Given a point and a slope, the equation of a line can be found using:
[tex](y-y_1)=m(x-x_1)[/tex]
in our case this will be
[tex](y-\overline{y})=m(x-\overline{x})[/tex]
[tex](y-4)=m(x-2)[/tex]
[tex]y=mx-2m+4[/tex]
this is our equation of the line!
3) Find the squared vertical distances between this line and the three points.
So what we up till now is a line, and three points. We need to find how much further away (only in the y direction) each point is from the line.
- Distance from point (1,3)
We know that when x=1, y=3 for the point. But we need to find what does y equal when x=1 for the line?
we'll go back to our equation of the line and use x=1.
[tex]y=m(1)-2m+4[/tex]
[tex]y=-m+4[/tex]
now we know the two points at x=1: (1,3) and (1,-m+4)
to find the vertical distance we'll subtract the y-coordinates of each point.
[tex]d_1=3-(-m+4)[/tex]
[tex]d_1=m-1[/tex]
finally, as asked, we'll square the distance
[tex](d_1)^2=(m-1)^2[/tex]
- Distance from point (2,3)
we'll do the same as above here:
[tex]y=m(2)-2m+4[/tex]
[tex]y=4[/tex]
vertical distance between the two points: (2,3) and (2,4)
[tex]d_2=3-4[/tex]
[tex]d_2=-1[/tex]
squaring:
[tex](d_2)^2=1[/tex]
- Distance from point (3,6)
[tex]y=m(3)-2m+4[/tex]
[tex]y=m+4[/tex]
vertical distance between the two points: (3,6) and (3,m+4)
[tex]d_3=6-(m+4)[/tex]
[tex]d_3=2-m[/tex]
squaring:
[tex](d_3)^2=(2-m)^2[/tex]
3) Add up all the squared distances, we'll call this value R.
[tex]R=(d_1)^2+(d_2)^2+(d_3)^2[/tex]
[tex]R=(m-1)^2+4+(2-m)^2[/tex]
4) Find the value of m that makes R minimum.
Looking at the equation above, we can tell that R is a function of m:
[tex]R(m)=(m-1)^2+4+(2-m)^2[/tex]
you can simplify this if you want to. What we're most concerned with is to find the minimum value of R at some value of m. To do that we'll need to derivate R with respect to m. (this is similar to finding the stationary point of a curve)
[tex]\dfrac{d}{dm}\left(R(m)\right)=\dfrac{d}{dm}\left((m-1)^2+4+(2-m)^2\right)[/tex]
[tex]\dfrac{dR}{dm}=2(m-1)+0+2(2-m)(-1)[/tex]
now to find the minimum value we'll just use a condition that [tex]\dfrac{dR}{dm}=0[/tex]
[tex]0=2(m-1)+2(2-m)(-1)[/tex]
now solve for m:
[tex]0=2m-2-4+2m[/tex]
[tex]m=\dfrac{3}{2}[/tex]
This is the value of m for which the sum of the squared vertical distances from the points and the line is small as possible!
