 # A linear regression equation has b = 3 and a = – 6. What is the predicted value of y for x = 4? The aim of this question is to learn the method of regression in general and linear regression in particular.

Regression is defined as a procedure in statistics that tries to find the mathematical relationship between two or more variables through the use of statistical data. One of these variables is called the dependent variable y while others are called independent variables xi. In short, we are trying to predict the value of y based on certain given values of xi.

Regression has wide applications in finance, data science, and many other disciplines. There are many types of regression based on the type of mathematical model (or equation ) used. The most common form of regression is linear regression.

In linear regression, we try to fit a straight line through the given data. Mathematically:

$\hat{ y } \ = \ a \ + \ b x_1 \ + \ c x_2 \ + \ … \ … \ … \$

where, $a, \ b, \ c, \ … \$ are the constants or weights.

Given:

$a \ = \ -6$

And:

$b \ = \ 3$

We can assume following linear regression model:

$\hat{ y } \ = \ a \ + \ b x$

Substituting values:

$\hat{ y } \ = \ -6 \ + \ 3 x$

Since we need to predict $y$ at:

$x \ = \ 4$

So the above model becomes:

$\hat{ y } \ = \ -6 \ + \ 3 ( 4 )$

$\Rightarrow \hat{ y } \ = \ -6 \ + \ 12$

$\Rightarrow \hat{ y } \ = \ 6$

## Numerical Result

$\hat{ y } |_{ x = 4 } \ = \ 6$

## Example

Using the same model given in the above question, predict values at:

$x \ = \ \{ \ 0, \ 1, \ 2, \ 3, \ 5, \ 6 \ \}$

Using the model:

$\hat{ y } \ = \ -6 \ + \ 3 x$

We have:

$\hat{ y } |_{ x = 0 } \ = \ -6 \ + \ 3 ( 0 ) \ = \ -6$

$\hat{ y } |_{ x = 1 } \ = \ -6 \ + \ 3 ( 1 ) \ = \ -3$

$\hat{ y } |_{ x = 2 } \ = \ -6 \ + \ 3 ( 2 ) \ = \ 0$

$\hat{ y } |_{ x = 3 } \ = \ -6 \ + \ 3 ( 3 ) \ = \ 3$

$\hat{ y } |_{ x = 5 } \ = \ -6 \ + \ 3 ( 5 ) \ = \ 9$

$\hat{ y } |_{ x = 6 } \ = \ -6 \ + \ 3 ( 6 ) \ = \ 12$