Try the fastest way to create flashcards
Question

# Find an equation of the least squares linear regression line of y and x for the given data, and sketch both the line and the data. Predict the value of y corresponding to x=3.5.$\begin{array}{ccccccc} x & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline y & 1 & 1.8 & 2 & 4 & 4.5 & 7 & 9 \end{array}$

Solution

Verified
Step 1
1 of 3

$\textbf{(a)}$ Recall that the linear regression line of $y$ on $x$ in the form $\hat y = a + bx$ with $y-$intercept $a$ and slope $b$ has the following formula for the linear coefficients $a$ and $b$:

\begin{align*} a &= \dfrac{\left(\sum_{i=1}^{n}x_i^2\right)\left(\sum_{i=1}^{n}y_i\right)-\left( \sum_{i=1}^{n}x_i \right) \left(\sum_{i=1}^{n}x_iy_i \right)}{n\sum_{i=1}^{n}x_i^2-\left( \sum_{i=1}^{n}x_i \right)^2} \\\\ b &= \dfrac{n\sum_{i=1}^{n}x_iy_i-\left( \sum_{i=1}^{n}x_i \right) \left(\sum_{i=1}^{n}y_i \right)}{n\sum_{i=1}^{n}x_i^2-\left( \sum_{i=1}^{n}x_i \right)^2} \end{align*}

We may use a spreadsheet in order to hasten the calculations. Based on this,

\begin{align*} &\sum_{i=1}^{n}x_i = 28 &&\sum_{i=1}^{n}y_i = 29.3\\ &\sum_{i=1}^{n}x_iy_i = 154.1 &&\sum_{i=1}^{n}x_i^2 = 140 \end{align*}

And using the formulas, we can calculate that $a=-1.0857$ and $b=1.3179$. Hence, $\boxed{\hat y = -1.0857+1.3179x}$.

## Recommended textbook solutions

#### Introductory Mathematical Analysis for Business, Economics, and the Life and Social Sciences

13th EditionISBN: 9780321643728 (4 more)Ernest F. Haeussler, Richard S. Paul, Wood
5,317 solutions

#### Mathematical Applications: For the Management, Life, and Social Sciences

8th EditionISBN: 9780618676910Andrew M. Rockett, Geoffrey C. Berresford

#### Brief Calculus and Mathematics for Business Analysis, Arizona State Custom Edition

5th EditionISBN: 9781111720025Stefan Waner

#### Math 118 Business Calculus Textbook taken from: Calculus and Its Applications

11th EditionISBN: 9781323192122David J. Ellenbogen, Marvin L. Bittinger, Scott Surgent