 Suggested languages for you:

Europe

Answers without the blur. Sign up and see all textbooks for free! Q77.

Expert-verified Found in: Page 690 ### Precalculus Mathematics for Calculus

Book edition 7th Edition
Author(s) James Stewart, Lothar Redlin, Saleem Watson
Pages 948 pages
ISBN 9781337067508 # The Least Squares LineThe 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.$\left(1,3\right),\left(2,5\right),\left(3,6\right),\left(5,6\right),\left(7,9\right)$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 $\left(1,3\right),\left(2,5\right),\left(3,6\right),\left(5,6\right),\left(7,9\right)$ is $y=0.84x+2.76$ See the step by step solution

## Step 1. Given information

Given a set of points $\left(1,3\right),\left(2,5\right),\left(3,6\right),\left(5,6\right),\left(7,9\right)$ 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}$

## Step 2. Concept used

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.

## Step 3. Calculation

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

The simplified for the given points are:

$\begin{array}{l}y=ax+b....\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)....\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)....\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+\left(1+2+3+5+7\right)b=\left(1×3+2×5+3×6+5×6+7×9\right)\\ \left(1+4+9+25+49\right)a+18b=\left(3+10+18+30+63\right)\\ 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 ).  ### Want to see more solutions like these? 