A data set is given as follows:
Please give the best fit using the least squares with the following functions
(1) y = ax + b;
(2) y = ax + b;
and draw their respective graphs.

(Probability and Statistics)​

A data set is given as follows Please give the best fit using the least squares with the following functions 1 y ax b 2 y ax b and draw their respective graphsP class=

Respuesta :

Entering the values obtained from the data in the table based on the

given functions of y = a·x + b, and y = a·|x| + b, we have;

(1) y = -0.0614·x + 1.58772

(2) y = 0.3824·x + 0.91168

How can the best fit lines be obtained?

The least squares regression formula is presented as follows;

[tex]a = \mathbf{\dfrac{\sum \left(x_i - \bar x\right) \times \left(y_i - \bar y\right) }{\sum \left(x_i - \bar x\right )^2 }}[/tex]

(1) From the data in the table, and by using MS Excel, we have;

[tex]\overline x[/tex] = -0.2

[tex]\overline y[/tex] = 1.6

[tex]\sum \left(x_i - \bar x\right) \times \left(y_i - \bar y\right)[/tex] = -1.4

[tex]\sum \left(x_i - \bar x\right )^2[/tex] = 22.8

Which gives;

[tex]a = \dfrac{-1.4}{22.8 } \approx \mathbf{-0.0614}[/tex]

1.6 ≈ b - 0.0614 × (-0.2)

b = 1.6 -  0.0614 × (0.2) = 1.58772

The equation of best fit for the function, y = a·x + b, is therefore;

  • y = -0.0614·x + 1.58772

(2) For the function, y = a·|x| + b, we have;

[tex]\overline x[/tex] = 1.8

[tex]\overline y[/tex] = 1.6

[tex]\sum \left(x_i - \bar x\right) \times \left(y_i - \bar y\right)[/tex] = 2.6

[tex]\sum \left(x_i - \bar x\right )^2[/tex] = 6.8

Which gives;

[tex]a = \dfrac{2.6}{6.8} \approx \mathbf{0.3824}[/tex]

1.6 ≈ b + 0.3824 × (1.8)

b = 1.6 -  0.3824 × (1.8) = 0.91168

The equation of best fit for the function, y = a·|x| + b, is therefore;

  • y = 0.3824·x + 0.91168

Learn more about the least squares regression line here:

https://brainly.com/question/15882801

Ver imagen oeerivona
Ver imagen oeerivona