220k views
1 vote
Consider the following table.

x 1 3 5 7 9

y 9 7 7 3 2

(a) Find the equation of the least-squares line for the data.

1 Answer

4 votes

Answer:

y = -0.9x+10.1

Explanation:

The equation of the line is:


y=mx+b

You have been asked to stimate m and b. To do so, first find the product between each pair of x and y and the value of x squared:


\left[\begin{array}{cccc}x&y&x*y&x^2\\1&9&9&1\\3&7&21&9\\5&7&35&25\\7&3&21&49\\9&2&18&81\end{array}\right]

Then calculate the total sum of all columns:


\left[\begin{array}{cccc}x&y&x*y&x^2\\1&9&9&1\\3&7&21&9\\5&7&35&25\\7&3&21&49\\9&2&18&81\\\bold{25}&\bold{28}&\bold{104}&\bold{165}\end{array}\right]

m can be calculated following the next equation:


m=\frac{\frac{\sum{xy}-\sum{y}}{n}}{\sum{x^2}-\frac{(\sum{x})^2}{n}}

where n is the number of (x, y) couples (5 in our case).

Replacing the values calculated previously:


m=(104-(25*28)/(5) )/(165-(25^2)/(5) )=(104-(700)/(5) )/(165-(625)/(5) ) = (104-140)/(165-125 ) = (-36)/(40) = -0.9

For b:


b=\bar{y}- m\bar{x}=\frac{\sum{y}}{n}-m\frac{\sum{x}}{n}=(28)/(5)-(-0.9)(25)/(5)= (28)/(5)+(22.5)/(5)=(50.5)/(5)=10.1

In the figure attached you can see the points given and the stimated line.

Consider the following table. x 1 3 5 7 9 y 9 7 7 3 2 (a) Find the equation of the-example-1
User Chad Schultz
by
4.4k points