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, 10), (2, 7), (3, 2), (4, 4), (5, 2), (6, 6), (7, 2)

Explanation:

Step1: Calculate sums

Let the points be \((x_i,y_i)\) for \(i = 1,\cdots,7\).
\(n=7\)
\(\sum_{i = 1}^{n}x_i=1 + 2+3 + 4+5 + 6+7=\frac{7\times(7 + 1)}{2}=28\)
\(\sum_{i = 1}^{n}y_i=10 + 7+2 + 4+2 + 6+2=33\)
\(\sum_{i = 1}^{n}x_i^2=1^2+2^2+3^2+4^2+5^2+6^2+7^2=\frac{7\times(7 + 1)\times(2\times7 + 1)}{6}=140\)
\(\sum_{i = 1}^{n}x_iy_i=1\times10+2\times7 + 3\times2+4\times4+5\times2+6\times6+7\times2\)
\(=10+14 + 6+16+10+36+14=106\)

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}\)
\(m=\frac{7\times106-28\times33}{7\times140 - 28^2}\)
\(=\frac{742-924}{980 - 784}=\frac{-182}{196}\approx - 0.93\)

Step3: Calculate 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}\)
\(b=\frac{33-(-0.93)\times28}{7}\)
\(=\frac{33 + 26.04}{7}=\frac{59.04}{7}\approx8.43\)

Answer:

The equation of the line of best - fit is \(y=-0.93x + 8.43\)