Linear Regression:

Linear regression helps us to study the relationship between the independent variable(features) and corresponding dependent variable(target). 

Example:

-- How does temperature affects ice cream sales ?

--How does money spent in advertising relates to a sales figure ?

--How does offer influence sales figure of a product ?

-- And so on ....


The variable which value we take under consideration while running regression is called independent variable(features) and the variable value which we try to predict is known as dependent variable(target). 

Formula of Linear Regression:


, where X is the explanatory variable and Y is the dependent variable.

The slope of the line is β , and α is the intercept

Parameter Estimators:

Example:

A large bank is planning on introducing a new word processing system to its secretarial staff. To learn about the amount of training that is needed to effectively implement the new system, the bank chose eight employees of roughly equal skill. These workers were trained for different amounts of time and were then individually put to work on a given project. The following data was thus collected.




 

What is the estimated regression line?

Predict the project completion time for a worker who receives 28 hours of training.

How about a worker who receives 50 hours of training?

Solution:

•       There are 8 data pairs, so n = 8.

•       SxY = -125.350,                    Sxx = 281.875

•       Therefore B = -125.350/281.875 = -0.4447,

                A = 18.850 – (-0.4447)*(19.375) = 27.4660

•       So the estimated regression line              

Y = 27.4660 – 0.4447 x

•       Best prediction of the project completion time if training time = 28 hours,

= 27.466 – 0.4447 * 28 = 15.014