SlideShare a Scribd company logo
1 of 7
By : Sumit Pandey
LINEAR REGRESSION
Linear regression is a linear approach for modelling the relationship between a scalar response and one or more
explanatory variables.
The case of one explanatory variable is called simple linear regression; for more than one, the process is called
multiple linear regression.
Example :
You are a social researcher interested in the relationship between income and happiness. You survey 500 people
whose incomes range from $15k to $75k and ask them to rank their happiness on a scale from 1 to 10.
Your independent variable (income) and dependent variable (happiness) are both quantitative, so you can do a
regression analysis to see if there is a linear relationship between them.
The formula for a simple linear regression is:
• y is the predicted value of the dependent variable (y) for any given value of the independent variable (x).
• B0 is the intercept, the predicted value of y when the x is 0.
• B1 is the regression coefficient – how much we expect y to change as x increases.
• x is the independent variable ( the variable we expect is influencing y).
• e is the error of the estimate, or how much variation there is in our estimate of the regression coefficient.
SIMPLE LINEAR REGRESSION FORMULA
Linear regression finds the line of best fit line through your data by searching for the regression coefficient (B1) that
minimizes the total error (e) of the model.
Multiple linear regression is used to estimate the relationship between two or more
independent variables and one dependent variable.
You can use multiple linear regression to know :
1. How strong the relationship is between two or more independent variables and one
dependent
variable.
e.g. how rainfall, temperature, and amount of fertilizer added affect crop growth.
2. The value of the dependent variable at a certain value of the independent variables
e.g. the expected yield of a crop at certain levels of rainfall, temperature, and fertilizer
addition.
MULTIPLE LINEAR REGRESSION
The formula for a multiple linear regression is:
• y = the predicted value of the dependent variable
• B0 = the y-intercept (value of y when all other parameters are set to 0)
• B1X1= the regression coefficient (B1) of the first independent variable (X1) (a.k.a. the effect that
increasing the value of the independent variable has on the predicted y value)
• … = do the same for however many independent variables you are testing
• BnXn = the regression coefficient of the last independent variable
• e = model error (a.k.a. how much variation there is in our estimate of y)
MULTIPLE LINEAR REGRESSION FORMULA
To find the best-fit line for each independent variable, multiple linear regression calculates three things :
• The regression coefficients that lead to the smallest overall model error.
• The t-statistic of the overall model.
• The associated p-value (how likely it is that the t-statistic would have occurred by chance if the null
hypothesis of no relationship between the independent and dependent variables was true).
ASSUMPTIONS OF LINEAR REGRESSION
Linear regression is a parametric test, meaning that it makes certain assumptions about the data.
These assumptions are:
1. Homogeneity of variance (homoscedasticity): The size of the error in our prediction
doesn’t change significantly across the values of the independent variable.
2. Independence of observations: The observations in the dataset were collected
using statistically valid sampling methods, and there are no hidden relationships among
observations.
3. Normality: The data follows a normal distribution.
Linear regression makes one additional assumption:
The relationship between the independent and dependent variable is linear:
The line of best fit through the data points is a straight line (rather than a curve or some sort of
grouping factor).
Linear Regression | Machine Learning | Data Science

More Related Content

What's hot

Regression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha BaliRegression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha BaliAkanksha Bali
 
Linear regression
Linear regressionLinear regression
Linear regressionSreerajVA
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsAnirudha si
 
Correlation analysis notes
Correlation analysis notesCorrelation analysis notes
Correlation analysis notesJapheth Muthama
 
ML - Multiple Linear Regression
ML - Multiple Linear RegressionML - Multiple Linear Regression
ML - Multiple Linear RegressionAndrew Ferlitsch
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionVARUN KUMAR
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regressiondessybudiyanti
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regressionMohit Asija
 
Curve fitting of exponential curve
Curve fitting of exponential curveCurve fitting of exponential curve
Curve fitting of exponential curveDivyang Rathod
 
Regression analysis
Regression analysisRegression analysis
Regression analysissaba khan
 
Auto Correlation Presentation
Auto Correlation PresentationAuto Correlation Presentation
Auto Correlation PresentationIrfan Hussain
 
What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...Smarten Augmented Analytics
 
Linear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec domsLinear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec domsBabasab Patil
 
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...Edureka!
 
Simple linear regression (final)
Simple linear regression (final)Simple linear regression (final)
Simple linear regression (final)Harsh Upadhyay
 

What's hot (20)

Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Regression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha BaliRegression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha Bali
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
Correlation analysis notes
Correlation analysis notesCorrelation analysis notes
Correlation analysis notes
 
ML - Multiple Linear Regression
ML - Multiple Linear RegressionML - Multiple Linear Regression
ML - Multiple Linear Regression
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Simple Linier Regression
Simple Linier RegressionSimple Linier Regression
Simple Linier Regression
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Multiple regression
Multiple regressionMultiple regression
Multiple regression
 
Curve fitting of exponential curve
Curve fitting of exponential curveCurve fitting of exponential curve
Curve fitting of exponential curve
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Auto Correlation Presentation
Auto Correlation PresentationAuto Correlation Presentation
Auto Correlation Presentation
 
Linear regression
Linear regressionLinear regression
Linear regression
 
What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...What is Binary Logistic Regression Classification and How is it Used in Analy...
What is Binary Logistic Regression Classification and How is it Used in Analy...
 
Linear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec domsLinear regression and correlation analysis ppt @ bec doms
Linear regression and correlation analysis ppt @ bec doms
 
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
Logistic Regression in Python | Logistic Regression Example | Machine Learnin...
 
Simple linear regression (final)
Simple linear regression (final)Simple linear regression (final)
Simple linear regression (final)
 

Similar to Linear Regression | Machine Learning | Data Science

STATISTICAL REGRESSION MODELS
STATISTICAL REGRESSION MODELSSTATISTICAL REGRESSION MODELS
STATISTICAL REGRESSION MODELSAneesa K Ayoob
 
A presentation for Multiple linear regression.ppt
A presentation for Multiple linear regression.pptA presentation for Multiple linear regression.ppt
A presentation for Multiple linear regression.pptvigia41
 
Regression & correlation coefficient
Regression & correlation coefficientRegression & correlation coefficient
Regression & correlation coefficientMuhamamdZiaSamad
 
Lesson 16 Data Analysis Ii
Lesson 16 Data Analysis IiLesson 16 Data Analysis Ii
Lesson 16 Data Analysis Iivinod
 
Simple Linear Regression detail explanation.pdf
Simple Linear Regression detail explanation.pdfSimple Linear Regression detail explanation.pdf
Simple Linear Regression detail explanation.pdfUVAS
 
Dependance Technique, Regression & Correlation
Dependance Technique, Regression & Correlation Dependance Technique, Regression & Correlation
Dependance Technique, Regression & Correlation Qasim Raza
 
Simple Linear Regression explanation.pptx
Simple Linear Regression explanation.pptxSimple Linear Regression explanation.pptx
Simple Linear Regression explanation.pptxUVAS
 
Correlation analysis
Correlation analysisCorrelation analysis
Correlation analysisAwais Salman
 
Linear regression.pptx
Linear regression.pptxLinear regression.pptx
Linear regression.pptxssuserb8a904
 
A Topic on REGRESSION Analysis conducted pptx
A Topic on REGRESSION Analysis conducted pptxA Topic on REGRESSION Analysis conducted pptx
A Topic on REGRESSION Analysis conducted pptxzeusrex4815162342
 
correlation and regression
correlation and regressioncorrelation and regression
correlation and regressionFaiezah Zulkifli
 
how to select the appropriate method for our study of interest
how to select the appropriate method for our study of interest how to select the appropriate method for our study of interest
how to select the appropriate method for our study of interest NurFathihaTahiatSeeu
 
PPT Correlation.pptx
PPT Correlation.pptxPPT Correlation.pptx
PPT Correlation.pptxMahamZeeshan5
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regressionAntony Raj
 
Correlationanalysis
CorrelationanalysisCorrelationanalysis
CorrelationanalysisLibu Thomas
 

Similar to Linear Regression | Machine Learning | Data Science (20)

STATISTICAL REGRESSION MODELS
STATISTICAL REGRESSION MODELSSTATISTICAL REGRESSION MODELS
STATISTICAL REGRESSION MODELS
 
A presentation for Multiple linear regression.ppt
A presentation for Multiple linear regression.pptA presentation for Multiple linear regression.ppt
A presentation for Multiple linear regression.ppt
 
BRM-lecture-11.ppt
BRM-lecture-11.pptBRM-lecture-11.ppt
BRM-lecture-11.ppt
 
Regression & correlation coefficient
Regression & correlation coefficientRegression & correlation coefficient
Regression & correlation coefficient
 
Lesson 16 Data Analysis Ii
Lesson 16 Data Analysis IiLesson 16 Data Analysis Ii
Lesson 16 Data Analysis Ii
 
Simple Linear Regression detail explanation.pdf
Simple Linear Regression detail explanation.pdfSimple Linear Regression detail explanation.pdf
Simple Linear Regression detail explanation.pdf
 
Dependance Technique, Regression & Correlation
Dependance Technique, Regression & Correlation Dependance Technique, Regression & Correlation
Dependance Technique, Regression & Correlation
 
Simple Linear Regression explanation.pptx
Simple Linear Regression explanation.pptxSimple Linear Regression explanation.pptx
Simple Linear Regression explanation.pptx
 
Correlation analysis
Correlation analysisCorrelation analysis
Correlation analysis
 
Regression
RegressionRegression
Regression
 
Linear regression.pptx
Linear regression.pptxLinear regression.pptx
Linear regression.pptx
 
IDS.pdf
IDS.pdfIDS.pdf
IDS.pdf
 
A Topic on REGRESSION Analysis conducted pptx
A Topic on REGRESSION Analysis conducted pptxA Topic on REGRESSION Analysis conducted pptx
A Topic on REGRESSION Analysis conducted pptx
 
correlation and regression
correlation and regressioncorrelation and regression
correlation and regression
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
how to select the appropriate method for our study of interest
how to select the appropriate method for our study of interest how to select the appropriate method for our study of interest
how to select the appropriate method for our study of interest
 
2-20-04.ppt
2-20-04.ppt2-20-04.ppt
2-20-04.ppt
 
PPT Correlation.pptx
PPT Correlation.pptxPPT Correlation.pptx
PPT Correlation.pptx
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Correlationanalysis
CorrelationanalysisCorrelationanalysis
Correlationanalysis
 

More from Sumit Pandey

EDA | Exploratory Data Analysis | Machine Learning | Data Science
EDA | Exploratory Data Analysis | Machine Learning | Data ScienceEDA | Exploratory Data Analysis | Machine Learning | Data Science
EDA | Exploratory Data Analysis | Machine Learning | Data ScienceSumit Pandey
 
Conflicts | Professionalism | Business
Conflicts | Professionalism | BusinessConflicts | Professionalism | Business
Conflicts | Professionalism | BusinessSumit Pandey
 
Social Media Writing | English
Social Media Writing | EnglishSocial Media Writing | English
Social Media Writing | EnglishSumit Pandey
 
Types of keys in database | SQL
Types of keys in database | SQLTypes of keys in database | SQL
Types of keys in database | SQLSumit Pandey
 
Recursion | C++ | DSA
Recursion | C++ | DSARecursion | C++ | DSA
Recursion | C++ | DSASumit Pandey
 
Kernel | Operating System
Kernel | Operating SystemKernel | Operating System
Kernel | Operating SystemSumit Pandey
 
Unix architecture | Operating System
Unix architecture | Operating SystemUnix architecture | Operating System
Unix architecture | Operating SystemSumit Pandey
 
Simple past tense | English Grammar
Simple past tense | English GrammarSimple past tense | English Grammar
Simple past tense | English GrammarSumit Pandey
 
NETWORK SECURITY AND VIRUSES
NETWORK SECURITY AND VIRUSESNETWORK SECURITY AND VIRUSES
NETWORK SECURITY AND VIRUSESSumit Pandey
 
ERADICATION OF CORRUPTION IN GOVERNMENT ESTABLISHMENTS
ERADICATION OF CORRUPTION IN  GOVERNMENT ESTABLISHMENTSERADICATION OF CORRUPTION IN  GOVERNMENT ESTABLISHMENTS
ERADICATION OF CORRUPTION IN GOVERNMENT ESTABLISHMENTSSumit Pandey
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCEARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCESumit Pandey
 
GST - Good Service Tax
GST - Good Service TaxGST - Good Service Tax
GST - Good Service TaxSumit Pandey
 

More from Sumit Pandey (12)

EDA | Exploratory Data Analysis | Machine Learning | Data Science
EDA | Exploratory Data Analysis | Machine Learning | Data ScienceEDA | Exploratory Data Analysis | Machine Learning | Data Science
EDA | Exploratory Data Analysis | Machine Learning | Data Science
 
Conflicts | Professionalism | Business
Conflicts | Professionalism | BusinessConflicts | Professionalism | Business
Conflicts | Professionalism | Business
 
Social Media Writing | English
Social Media Writing | EnglishSocial Media Writing | English
Social Media Writing | English
 
Types of keys in database | SQL
Types of keys in database | SQLTypes of keys in database | SQL
Types of keys in database | SQL
 
Recursion | C++ | DSA
Recursion | C++ | DSARecursion | C++ | DSA
Recursion | C++ | DSA
 
Kernel | Operating System
Kernel | Operating SystemKernel | Operating System
Kernel | Operating System
 
Unix architecture | Operating System
Unix architecture | Operating SystemUnix architecture | Operating System
Unix architecture | Operating System
 
Simple past tense | English Grammar
Simple past tense | English GrammarSimple past tense | English Grammar
Simple past tense | English Grammar
 
NETWORK SECURITY AND VIRUSES
NETWORK SECURITY AND VIRUSESNETWORK SECURITY AND VIRUSES
NETWORK SECURITY AND VIRUSES
 
ERADICATION OF CORRUPTION IN GOVERNMENT ESTABLISHMENTS
ERADICATION OF CORRUPTION IN  GOVERNMENT ESTABLISHMENTSERADICATION OF CORRUPTION IN  GOVERNMENT ESTABLISHMENTS
ERADICATION OF CORRUPTION IN GOVERNMENT ESTABLISHMENTS
 
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCEARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
 
GST - Good Service Tax
GST - Good Service TaxGST - Good Service Tax
GST - Good Service Tax
 

Recently uploaded

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

Linear Regression | Machine Learning | Data Science

  • 1. By : Sumit Pandey
  • 2. LINEAR REGRESSION Linear regression is a linear approach for modelling the relationship between a scalar response and one or more explanatory variables. The case of one explanatory variable is called simple linear regression; for more than one, the process is called multiple linear regression. Example : You are a social researcher interested in the relationship between income and happiness. You survey 500 people whose incomes range from $15k to $75k and ask them to rank their happiness on a scale from 1 to 10. Your independent variable (income) and dependent variable (happiness) are both quantitative, so you can do a regression analysis to see if there is a linear relationship between them.
  • 3. The formula for a simple linear regression is: • y is the predicted value of the dependent variable (y) for any given value of the independent variable (x). • B0 is the intercept, the predicted value of y when the x is 0. • B1 is the regression coefficient – how much we expect y to change as x increases. • x is the independent variable ( the variable we expect is influencing y). • e is the error of the estimate, or how much variation there is in our estimate of the regression coefficient. SIMPLE LINEAR REGRESSION FORMULA Linear regression finds the line of best fit line through your data by searching for the regression coefficient (B1) that minimizes the total error (e) of the model.
  • 4. Multiple linear regression is used to estimate the relationship between two or more independent variables and one dependent variable. You can use multiple linear regression to know : 1. How strong the relationship is between two or more independent variables and one dependent variable. e.g. how rainfall, temperature, and amount of fertilizer added affect crop growth. 2. The value of the dependent variable at a certain value of the independent variables e.g. the expected yield of a crop at certain levels of rainfall, temperature, and fertilizer addition. MULTIPLE LINEAR REGRESSION
  • 5. The formula for a multiple linear regression is: • y = the predicted value of the dependent variable • B0 = the y-intercept (value of y when all other parameters are set to 0) • B1X1= the regression coefficient (B1) of the first independent variable (X1) (a.k.a. the effect that increasing the value of the independent variable has on the predicted y value) • … = do the same for however many independent variables you are testing • BnXn = the regression coefficient of the last independent variable • e = model error (a.k.a. how much variation there is in our estimate of y) MULTIPLE LINEAR REGRESSION FORMULA To find the best-fit line for each independent variable, multiple linear regression calculates three things : • The regression coefficients that lead to the smallest overall model error. • The t-statistic of the overall model. • The associated p-value (how likely it is that the t-statistic would have occurred by chance if the null hypothesis of no relationship between the independent and dependent variables was true).
  • 6. ASSUMPTIONS OF LINEAR REGRESSION Linear regression is a parametric test, meaning that it makes certain assumptions about the data. These assumptions are: 1. Homogeneity of variance (homoscedasticity): The size of the error in our prediction doesn’t change significantly across the values of the independent variable. 2. Independence of observations: The observations in the dataset were collected using statistically valid sampling methods, and there are no hidden relationships among observations. 3. Normality: The data follows a normal distribution. Linear regression makes one additional assumption: The relationship between the independent and dependent variable is linear: The line of best fit through the data points is a straight line (rather than a curve or some sort of grouping factor).