Suggested languages for you:

Americas

Europe

Q77.

Expert-verifiedFound in: Page 690

Book edition
7th Edition

Author(s)
James Stewart, Lothar Redlin, Saleem Watson

Pages
948 pages

ISBN
9781337067508

**The Least Squares Line**

**The least squares line or regression line is the line that best fits a set of points in the plane. We studied this line in the Focus on Modeling that follows Chapter 1 (see page $139$). By using calculus, it can be shown that the line that best fits the n data points $\left({x}_{1},{y}_{1}\right),\left({x}_{2},{y}_{2}\right),\dots ,\left({x}_{n},{y}_{n}\right)$ is the line $y=ax+b$, where the coefficients $a$ and $b$ satisfy the following pair of linear equations. (The notation $\sum _{k=1}^{n}{x}_{k}$ stands for the sum of all the $x\text{'}s$. See Section $12.1$ for a complete description of sigma $\sum $ notation.)**

** $\begin{array}{l}\left(\sum _{k=1}^{n}{x}_{k}\right)a+nb=\sum _{k=1}^{n}{y}_{k}\\ \left(\sum _{k=1}^{n}{x}_{k}^{2}\right)a+\left(\sum _{k=1}^{n}{x}_{k}\right)b=\sum _{k=1}^{n}{x}_{k}{y}_{k}\end{array}$**

**Use these equations to find the least squares line for the following data points.**

**$(1,3),(2,5),(3,6),(5,6),(7,9)$**

**Sketch the points and your line to confirm that the line fits these points well. If your calculator computes regression lines, see whether it gives you the same line as the formulas.**

Hence the line of best fit for the given points $(1,3),(2,5),(3,6),(5,6),(7,9)$ is $y=0.84x+2.76$

Given a set of points $(1,3),(2,5),(3,6),(5,6),(7,9)$ and we have been given two equations which are as follows:

$\begin{array}{l}\left(\sum _{k=1}^{n}{x}_{k}\right)a+nb=\sum _{k=1}^{n}{y}_{k}\\ \left(\sum _{k=1}^{n}{x}_{k}^{2}\right)a+\left(\sum _{k=1}^{n}{x}_{k}\right)b=\sum _{k=1}^{n}{x}_{k}{y}_{k}\end{array}$

A line used to describe the behaviour of a set of data or in other words, it gives the best trend of the given data is known as a regression line.

Using these two equations we have to find the values of both the variables which will give us the equation of the line of the best fit. Also, we have to plot the line of the best fit.

Let the given points are: $\left({x}_{1},{y}_{1}\right)$ be $(1,3),\left({x}_{2},{y}_{2}\right)$ be $(2,5),\left({x}_{3},{y}_{3}\right)$ be $(3,6),\left({x}_{4},{y}_{4}\right)$ be $(5,6),\left({x}_{5},{y}_{5}\right)$ be $(7,9)$

The simplified for the given points are:

$\begin{array}{l}y=ax+b\mathrm{....}\left(1\right)\\ \left({x}_{1}+{x}_{2}+{x}_{3}+{x}_{4}+{x}_{5}\right)a+5b=\left({y}_{1}+{y}_{2}+{y}_{3}+{y}_{4}+{y}_{5}\right)\mathrm{....}\left(2\right)\\ \left({x}_{1}^{2}+{x}_{2}^{2}+{x}_{3}^{2}+{x}_{4}^{2}+{x}_{5}^{2}\right)a+\left({x}_{1}+{x}_{2}+{x}_{3}+{x}_{4}+{x}_{5}\right)b=\left({x}_{1}{y}_{1}+{x}_{2}{y}_{2}+{x}_{3}{y}_{3}+{x}_{4}{y}_{4}+{x}_{5}{y}_{5}\right)\mathrm{....}\left(3\right)\end{array}$

We are substituting the points in the equation (2)

$\begin{array}{l}\left({1}^{2}+{2}^{2}+{3}^{2}+{5}^{2}+{7}^{2}\right)a+(1+2+3+5+7)b=(1\times 3+2\times 5+3\times 6+5\times 6+7\times 9)\\ (1+4+9+25+49)a+18b=(3+10+18+30+63)\\ 88a+18b=124\end{array}$

So, the system of equations are:

$\begin{array}{l}18a+5b=29\\ 88a+18b=124\end{array}$

Now graph 1 represents the graph of the above linear equation.

And from graph 1, we observe that both the equation intersect at $\left(0.84,2.76\right)$

So, the solution of the system of equation is:

$\begin{array}{l}a=0.84\\ b=2.76\end{array}$

Since we all know the value of the variable *a* and *b*.

Thus the equation of the line of best fit is:

$\begin{array}{l}y=ax+b\\ y=0.84x+2.76\end{array}$

Now we will plot the given points and the line of best fit as mentioned in the question (represented by the graph 2 ).

94% of StudySmarter users get better grades.

Sign up for free