## Related questions with answers

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$\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}$.

## Create a free account to view solutions

## Create a free account to view solutions

## Recommended textbook solutions

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

13th Edition•ISBN: 9780321643728 (4 more)Ernest F. Haeussler, Richard S. Paul, Wood#### Mathematical Applications: For the Management, Life, and Social Sciences

8th Edition•ISBN: 9780618676910Andrew M. Rockett, Geoffrey C. Berresford#### Brief Calculus and Mathematics for Business Analysis, Arizona State Custom Edition

5th Edition•ISBN: 9781111720025Stefan Waner#### Math 118 Business Calculus Textbook taken from: Calculus and Its Applications

11th Edition•ISBN: 9781323192122David J. Ellenbogen, Marvin L. Bittinger, Scott Surgent## More related questions

- computer science

1/4

- computer science

1/7