This is my first article which is about Linear regression. I hope you will like it you will appreciate ,guide and motivate me to write on more topics.

--

Linear Regression is a relation between dependent variable(Y) and one or more independent variable(X) .There are two types of linear regression simple linear regression and multiple linear regression.

1.Simple Linear Regression:

Case of one independent variable and one dependent variable is called as simple linear regression. In simple linear regression when independent variable changes dependent variable also changed accordingly. If there is increase in the value of independent variable dependent variable also increases and if independent variable is decreasing then dependent variable also decreasing.

The core idea is to get a line which best fit for the given data. Main aim is to get minimum total prediction error.

In regression analysis prediction error is the measure of how well the model predicts the response variable (dependent variable)

Example of simple linear regression:

Medical researcher always used linear regression to understand the relationship between drug dosage and blood pressure recovery rate of patient. Different dosage used to see the reaction of it on patient blood pressure and recovery rate, drug dosage used as an independent variable and blood pressure recovery rate is

used as dependent variable. Below diagram shows us a linear regression of dose and BP.

Relation between dosage and Blood Pressure

Formula:

Y=bX+a

In this b is slope and a is Y-intercept

The value of b and a must be chosen correctly so that it minimizes the error

Error Formula
Y-intercept

Note:

1. If value of b>0 then dependent and Independent variable have positive relation i.e. If independent variable increases value of dependent variable also increases.

2. If value of b<0 then dependent and independent variable have negative relation i.e. If independent variable increases dependent variable decreases.

2.Multiple Linear Regression:

If more than one independent variables are present it is called multiple linear regression, multiple linear regression is different than multivariate linear regression. In multivariate linear regression multiple correlated dependent variables are predicted. For each of m>1 dependent variable that share the same set of explanatory variables

Multivariate linear regression

Where observations are i=1,……,n & dependent variables indexed as j=1,……..,n

In multivariate data multiple independent variable predicts multiple dependent variable.

Example of multivariate regression:

In the analysis of multiple brain scans in scientific experiments where Y contains data from brain scanner X contains experimental design variable and components

In multiple linear regression more than one independent variables are use to predict quantitative dependent variable

Multiple linear regression

Yi=the predicted value of dependent variable

B0=the Y-intercept

B1Xi1=the regression coefficient B1 of the first independent variable

And so on

Ei=model error

Example:

How rainfall, temperature and amount of fertilizer added affect crop growth

Graphical representation

Use Cases:

Linear regression has many practical uses:

1. Prediction ,forecasting or error reduction

2. Regular analysis can be applied to quantify the strength of the relationship between the dependent and independent variables.

--

--

No responses yet