Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

use the technique of linear regression to find the line of best fit for…

Question

use the technique of linear regression to find the line of best fit for the given points. round any intermediate calculations to no less than six decimal places, and round the coefficients to two decimal places. (1,2), (2,7), (3,2), (4,3), (5,9), (6,8), (7,9)

Explanation:

Step1: Calculate sums

Let the points be \((x_i,y_i)\) for \(i = 1,\cdots,7\).
\(n=7\)
\(\sum_{i = 1}^{7}x_i=1 + 2+3 + 4+5 + 6+7=28\)
\(\sum_{i = 1}^{7}y_i=2 + 7+2 + 3+9 + 8+9=40\)
\(\sum_{i = 1}^{7}x_i^2=1^2+2^2+3^2+4^2+5^2+6^2+7^2=1 + 4+9 + 16+25+36+49 = 140\)
\(\sum_{i = 1}^{7}x_iy_i=1\times2+2\times7+3\times2+4\times3+5\times9+6\times8+7\times9=2 + 14+6 + 12+45+48+63 = 190\)

Step2: Calculate slope \(m\)

The formula for the slope \(m\) of the line of best - fit is \(m=\frac{n\sum_{i = 1}^{n}x_iy_i-\sum_{i = 1}^{n}x_i\sum_{i = 1}^{n}y_i}{n\sum_{i = 1}^{n}x_i^2-(\sum_{i = 1}^{n}x_i)^2}\)
Substitute \(n = 7\), \(\sum_{i = 1}^{7}x_i = 28\), \(\sum_{i = 1}^{7}y_i = 40\), \(\sum_{i = 1}^{7}x_i^2 = 140\), \(\sum_{i = 1}^{7}x_iy_i = 190\) into the formula:
\[

$$\begin{align*} m&=\frac{7\times190-28\times40}{7\times140 - 28^2}\\ &=\frac{1330-1120}{980 - 784}\\ &=\frac{210}{196}\\ &\approx1.07 \end{align*}$$

\]

Step3: Calculate y - intercept \(b\)

The formula for the y - intercept \(b\) is \(b=\frac{\sum_{i = 1}^{n}y_i-m\sum_{i = 1}^{n}x_i}{n}\)
Substitute \(n = 7\), \(m\approx1.071429\), \(\sum_{i = 1}^{7}x_i = 28\), \(\sum_{i = 1}^{7}y_i = 40\) into the formula:
\[

$$\begin{align*} b&=\frac{40-1.071429\times28}{7}\\ &=\frac{40 - 30}{7}\\ &=\frac{10}{7}\\ &\approx1.43 \end{align*}$$

\]

Answer:

\(y = 1.43+1.07x\)