SlideShare a Scribd company logo
1 of 10
Linear regression Ryan Sain, Ph.D.
Regression Introduced Regression is about prediction Predicting an unknown point based on observations (or measurements) Widgets sold based on advertising We can explore known relationships We can explore unknown relationships
The Variables Outcome Variable The thing we are predicting Number of widgets sold Predictor Variable (simple regression) The variables that you know about Advertising dollars Predictor Variables (multiple regression) We predict values of a dependent variable (outcome) using one or more independent variables (predictors)
The model Any prediction follows the basic formula: Outcomei = (model) + errori In regression our model contains several things: Slope of the line (that best fits the data measured) = b1 Intercept of the line (at the Y axis) b0  So our model = Yi = (b0 + b1Xi) + Errori Do you recognize this equation? The model is simply a line
So how do we calculate this line? The Method of Least Squares The line that is the closest to all the data points Residuals = Deviations (distance of actual data points to the line) Square these residuals to get rid of negatives Then sum them.
How well does this line fit? No line is perfect (there are always residuals) If our line is a good one it should be better than a basic line (significantly so) We compare our line to a basic line: Deviation = SUM (observed – model)2 This is basically a β€˜mean’ (model) The mean is an awful predictor No matter how much you spend on adverts – the sales of your widgets are the same
Fitness continued SSt = total sum of squared differences (using the mean) SSr= total residual sum of squares (using our best fit model) Represents a degree of inaccuracy SSm (model sum of squares) = SSt – SSr Large = our model is different than the simple model Proportion of improvement: R2 = SSm/ SSt Percentage of variation in the outcome that can be explained by our model
More fitness You can assess this using an F test as well F is simply systematic variance/unsystematic variance In regression that means: Improvement of the model (SSm - systematic) and the difference between the model and the observed data (SSr – unsystematic) But we need to look at mean squares Because we need to use the average sums of squares in an F test. So we divide by degrees of freedom For SSm = the number of variables in the model For SSr = number of observations – the number of parameters being estimated (number of beta coefficients or predictors) F = MSM / MSR
Individual Predictors The coefficient bis essentially the gradient of the line If the predictor is not valuable then it will predict no change in the outcome as it changes.  This would be b= 0  This is what the mean does If the predictor is valuable – then it will be significantly different than 0.
Individual Predictors cont. To test if b is different from 0 we will use a t-test. We are comparing how big the b value is in comparison to the amount of error in that estimate. We will then use the standard error of the bvalue.  t = bobserved – bexpected / SEb Since the expected value is 0 (no change) then we have to simply divide the observed b value by the standard error of b to get the t score. Degress of freedom is calculated using the following: N – p – 1 (p = number of predictors)

More Related Content

What's hot

12 13 h2_measurement_ppt
12 13 h2_measurement_ppt12 13 h2_measurement_ppt
12 13 h2_measurement_pptTan Hong
Β 
50g working with matricies
50g  working with matricies50g  working with matricies
50g working with matriciesEfrain Parizaca
Β 
2.2 measurements, estimations and errors(part 2)
2.2   measurements, estimations and errors(part 2)2.2   measurements, estimations and errors(part 2)
2.2 measurements, estimations and errors(part 2)Raechel Lim
Β 
1.2.3 solving linear equations (multiple unknowns)
1.2.3  solving linear equations (multiple unknowns)1.2.3  solving linear equations (multiple unknowns)
1.2.3 solving linear equations (multiple unknowns)janineryder
Β 
Gang-Of-Four State Pattern
Gang-Of-Four State PatternGang-Of-Four State Pattern
Gang-Of-Four State PatternMark Cheeseman
Β 

What's hot (7)

12 13 h2_measurement_ppt
12 13 h2_measurement_ppt12 13 h2_measurement_ppt
12 13 h2_measurement_ppt
Β 
50g working with matricies
50g  working with matricies50g  working with matricies
50g working with matricies
Β 
2.2 measurements, estimations and errors(part 2)
2.2   measurements, estimations and errors(part 2)2.2   measurements, estimations and errors(part 2)
2.2 measurements, estimations and errors(part 2)
Β 
1.2.3 solving linear equations (multiple unknowns)
1.2.3  solving linear equations (multiple unknowns)1.2.3  solving linear equations (multiple unknowns)
1.2.3 solving linear equations (multiple unknowns)
Β 
Chapter 2
Chapter 2Chapter 2
Chapter 2
Β 
Gang-Of-Four State Pattern
Gang-Of-Four State PatternGang-Of-Four State Pattern
Gang-Of-Four State Pattern
Β 
LISP: Errors In Lisp
LISP: Errors In LispLISP: Errors In Lisp
LISP: Errors In Lisp
Β 

Viewers also liked

[iOS] Data Storage
[iOS] Data Storage[iOS] Data Storage
[iOS] Data StorageNikmesoft Ltd
Β 
iOS: Overview, Architecture, Development & Versions
iOS: Overview, Architecture, Development & Versions iOS: Overview, Architecture, Development & Versions
iOS: Overview, Architecture, Development & Versions Sandra Kerbage
Β 
[iOS] Navigation
[iOS] Navigation[iOS] Navigation
[iOS] NavigationNikmesoft Ltd
Β 
[iOS] Multiple Background Threads
[iOS] Multiple Background Threads[iOS] Multiple Background Threads
[iOS] Multiple Background ThreadsNikmesoft Ltd
Β 
iOS Basics: Introducing the iPad, iPhone, and iCloud
iOS Basics: Introducing the iPad, iPhone, and iCloudiOS Basics: Introducing the iPad, iPhone, and iCloud
iOS Basics: Introducing the iPad, iPhone, and iCloudSt. Petersburg College
Β 
[iOS] Introduction to iOS Programming
[iOS] Introduction to iOS Programming[iOS] Introduction to iOS Programming
[iOS] Introduction to iOS ProgrammingNikmesoft Ltd
Β 
[iOS] Networking
[iOS] Networking[iOS] Networking
[iOS] NetworkingNikmesoft Ltd
Β 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersRyanISI
Β 
Pentesting iOS Applications
Pentesting iOS ApplicationsPentesting iOS Applications
Pentesting iOS Applicationsjasonhaddix
Β 
[iOS] Basic UI Elements
[iOS] Basic UI Elements[iOS] Basic UI Elements
[iOS] Basic UI ElementsNikmesoft Ltd
Β 
Ios operating system
Ios operating systemIos operating system
Ios operating systemKhaja Moiz Uddin
Β 

Viewers also liked (14)

[iOS] Data Storage
[iOS] Data Storage[iOS] Data Storage
[iOS] Data Storage
Β 
iOS: Overview, Architecture, Development & Versions
iOS: Overview, Architecture, Development & Versions iOS: Overview, Architecture, Development & Versions
iOS: Overview, Architecture, Development & Versions
Β 
[iOS] Navigation
[iOS] Navigation[iOS] Navigation
[iOS] Navigation
Β 
[iOS] Multiple Background Threads
[iOS] Multiple Background Threads[iOS] Multiple Background Threads
[iOS] Multiple Background Threads
Β 
iOS Basics: Introducing the iPad, iPhone, and iCloud
iOS Basics: Introducing the iPad, iPhone, and iCloudiOS Basics: Introducing the iPad, iPhone, and iCloud
iOS Basics: Introducing the iPad, iPhone, and iCloud
Β 
A seminar report on i cloud
A  seminar report on i cloudA  seminar report on i cloud
A seminar report on i cloud
Β 
[iOS] Introduction to iOS Programming
[iOS] Introduction to iOS Programming[iOS] Introduction to iOS Programming
[iOS] Introduction to iOS Programming
Β 
[iOS] Networking
[iOS] Networking[iOS] Networking
[iOS] Networking
Β 
iOS Application Penetration Testing
iOS Application Penetration TestingiOS Application Penetration Testing
iOS Application Penetration Testing
Β 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
Β 
Pentesting iOS Applications
Pentesting iOS ApplicationsPentesting iOS Applications
Pentesting iOS Applications
Β 
[iOS] Basic UI Elements
[iOS] Basic UI Elements[iOS] Basic UI Elements
[iOS] Basic UI Elements
Β 
Ios operating system
Ios operating systemIos operating system
Ios operating system
Β 
Apple iOS
Apple iOSApple iOS
Apple iOS
Β 

Similar to Understanding linear regression models

Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)Abhimanyu Dwivedi
Β 
Regression Analysis presentation by Al Arizmendez and Cathryn Lottier
Regression Analysis presentation by Al Arizmendez and Cathryn LottierRegression Analysis presentation by Al Arizmendez and Cathryn Lottier
Regression Analysis presentation by Al Arizmendez and Cathryn LottierAl Arizmendez
Β 
Detail Study of the concept of Regression model.pptx
Detail Study of the concept of  Regression model.pptxDetail Study of the concept of  Regression model.pptx
Detail Study of the concept of Regression model.pptxtruptikulkarni2066
Β 
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?Smarten Augmented Analytics
Β 
Chapter 14 Part I
Chapter 14 Part IChapter 14 Part I
Chapter 14 Part IMatthew L Levy
Β 
Structural equation modeling in amos
Structural equation modeling in amosStructural equation modeling in amos
Structural equation modeling in amosBalaji P
Β 
HRUG - Linear regression with R
HRUG - Linear regression with RHRUG - Linear regression with R
HRUG - Linear regression with Regoodwintx
Β 
Building a Regression Model using SPSS
Building a Regression Model using SPSSBuilding a Regression Model using SPSS
Building a Regression Model using SPSSZac Bodner
Β 
statistical learning theory
statistical learning theorystatistical learning theory
statistical learning theoryHarshKumar943076
Β 
Gradient Decent in Linear Regression.pptx
Gradient Decent in Linear Regression.pptxGradient Decent in Linear Regression.pptx
Gradient Decent in Linear Regression.pptxalphaomega55
Β 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepDan Wellisch
Β 
Interpreting Regression Results - Machine Learning
Interpreting Regression Results - Machine LearningInterpreting Regression Results - Machine Learning
Interpreting Regression Results - Machine LearningKush Kulshrestha
Β 
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsData Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsDerek Kane
Β 
Statistics for ess
Statistics for essStatistics for ess
Statistics for essMichael Smith
Β 
Linear functions and modeling
Linear functions and modelingLinear functions and modeling
Linear functions and modelingIVY SOLIS
Β 

Similar to Understanding linear regression models (20)

Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
Β 
Regression Analysis presentation by Al Arizmendez and Cathryn Lottier
Regression Analysis presentation by Al Arizmendez and Cathryn LottierRegression Analysis presentation by Al Arizmendez and Cathryn Lottier
Regression Analysis presentation by Al Arizmendez and Cathryn Lottier
Β 
Detail Study of the concept of Regression model.pptx
Detail Study of the concept of  Regression model.pptxDetail Study of the concept of  Regression model.pptx
Detail Study of the concept of Regression model.pptx
Β 
SEM
SEMSEM
SEM
Β 
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
What is Isotonic Regression and How Can a Business Utilize it to Analyze Data?
Β 
Chapter 14 Part I
Chapter 14 Part IChapter 14 Part I
Chapter 14 Part I
Β 
Structural equation modeling in amos
Structural equation modeling in amosStructural equation modeling in amos
Structural equation modeling in amos
Β 
HRUG - Linear regression with R
HRUG - Linear regression with RHRUG - Linear regression with R
HRUG - Linear regression with R
Β 
MF Presentation.pptx
MF Presentation.pptxMF Presentation.pptx
MF Presentation.pptx
Β 
Building a Regression Model using SPSS
Building a Regression Model using SPSSBuilding a Regression Model using SPSS
Building a Regression Model using SPSS
Β 
statistical learning theory
statistical learning theorystatistical learning theory
statistical learning theory
Β 
Gradient Decent in Linear Regression.pptx
Gradient Decent in Linear Regression.pptxGradient Decent in Linear Regression.pptx
Gradient Decent in Linear Regression.pptx
Β 
Linear Regression
Linear RegressionLinear Regression
Linear Regression
Β 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
Β 
Multiple Linear Regression
Multiple Linear Regression Multiple Linear Regression
Multiple Linear Regression
Β 
Interpreting Regression Results - Machine Learning
Interpreting Regression Results - Machine LearningInterpreting Regression Results - Machine Learning
Interpreting Regression Results - Machine Learning
Β 
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsData Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Β 
Statistics for ess
Statistics for essStatistics for ess
Statistics for ess
Β 
Linear functions and modeling
Linear functions and modelingLinear functions and modeling
Linear functions and modeling
Β 
Unit 03 - Consolidated.pptx
Unit 03 - Consolidated.pptxUnit 03 - Consolidated.pptx
Unit 03 - Consolidated.pptx
Β 

More from Ryan Sain

Psyc 321_14 surveys
Psyc 321_14 surveysPsyc 321_14 surveys
Psyc 321_14 surveysRyan Sain
Β 
Psyc 321_13 ethics
Psyc 321_13 ethicsPsyc 321_13 ethics
Psyc 321_13 ethicsRyan Sain
Β 
Psyc 321_12 small n research
Psyc 321_12 small n researchPsyc 321_12 small n research
Psyc 321_12 small n researchRyan Sain
Β 
Psyc 321_11 quasi experimentation
Psyc 321_11 quasi experimentationPsyc 321_11 quasi experimentation
Psyc 321_11 quasi experimentationRyan Sain
Β 
psyc 321_10 experimental ecology
psyc 321_10 experimental ecologypsyc 321_10 experimental ecology
psyc 321_10 experimental ecologyRyan Sain
Β 
Psyc 321_09 within groups
Psyc 321_09 within groupsPsyc 321_09 within groups
Psyc 321_09 within groupsRyan Sain
Β 
Psyc 321_07 control
Psyc 321_07 controlPsyc 321_07 control
Psyc 321_07 controlRyan Sain
Β 
psyc 321_06 threats to validity and control
psyc 321_06 threats to validity and controlpsyc 321_06 threats to validity and control
psyc 321_06 threats to validity and controlRyan Sain
Β 
Psyc 321_05 introduction to stats
Psyc 321_05 introduction to statsPsyc 321_05 introduction to stats
Psyc 321_05 introduction to statsRyan Sain
Β 
Psyc 321_04 numerical description
Psyc 321_04 numerical descriptionPsyc 321_04 numerical description
Psyc 321_04 numerical descriptionRyan Sain
Β 
Psyc 321_03 hypotheses
Psyc 321_03 hypothesesPsyc 321_03 hypotheses
Psyc 321_03 hypothesesRyan Sain
Β 
Psyc 321_02 methods of_science
Psyc 321_02 methods of_sciencePsyc 321_02 methods of_science
Psyc 321_02 methods of_scienceRyan Sain
Β 
Psyc 321_01 what is science
Psyc 321_01 what is sciencePsyc 321_01 what is science
Psyc 321_01 what is scienceRyan Sain
Β 
324 12 3 special topics tool use language
324 12 3 special topics tool use language324 12 3 special topics tool use language
324 12 3 special topics tool use languageRyan Sain
Β 
324 12 2 special topics timing
324 12 2 special topics timing324 12 2 special topics timing
324 12 2 special topics timingRyan Sain
Β 
324 12 part 1 special topics food caching
324 12 part 1 special topics food caching324 12 part 1 special topics food caching
324 12 part 1 special topics food cachingRyan Sain
Β 
324 10 observational learning
324 10 observational learning324 10 observational learning
324 10 observational learningRyan Sain
Β 
324 09 avoidance
324 09 avoidance324 09 avoidance
324 09 avoidanceRyan Sain
Β 
324 7 part 2 extinction
324 7 part 2 extinction 324 7 part 2 extinction
324 7 part 2 extinction Ryan Sain
Β 
324 06 stimulus control
324 06 stimulus control324 06 stimulus control
324 06 stimulus controlRyan Sain
Β 

More from Ryan Sain (20)

Psyc 321_14 surveys
Psyc 321_14 surveysPsyc 321_14 surveys
Psyc 321_14 surveys
Β 
Psyc 321_13 ethics
Psyc 321_13 ethicsPsyc 321_13 ethics
Psyc 321_13 ethics
Β 
Psyc 321_12 small n research
Psyc 321_12 small n researchPsyc 321_12 small n research
Psyc 321_12 small n research
Β 
Psyc 321_11 quasi experimentation
Psyc 321_11 quasi experimentationPsyc 321_11 quasi experimentation
Psyc 321_11 quasi experimentation
Β 
psyc 321_10 experimental ecology
psyc 321_10 experimental ecologypsyc 321_10 experimental ecology
psyc 321_10 experimental ecology
Β 
Psyc 321_09 within groups
Psyc 321_09 within groupsPsyc 321_09 within groups
Psyc 321_09 within groups
Β 
Psyc 321_07 control
Psyc 321_07 controlPsyc 321_07 control
Psyc 321_07 control
Β 
psyc 321_06 threats to validity and control
psyc 321_06 threats to validity and controlpsyc 321_06 threats to validity and control
psyc 321_06 threats to validity and control
Β 
Psyc 321_05 introduction to stats
Psyc 321_05 introduction to statsPsyc 321_05 introduction to stats
Psyc 321_05 introduction to stats
Β 
Psyc 321_04 numerical description
Psyc 321_04 numerical descriptionPsyc 321_04 numerical description
Psyc 321_04 numerical description
Β 
Psyc 321_03 hypotheses
Psyc 321_03 hypothesesPsyc 321_03 hypotheses
Psyc 321_03 hypotheses
Β 
Psyc 321_02 methods of_science
Psyc 321_02 methods of_sciencePsyc 321_02 methods of_science
Psyc 321_02 methods of_science
Β 
Psyc 321_01 what is science
Psyc 321_01 what is sciencePsyc 321_01 what is science
Psyc 321_01 what is science
Β 
324 12 3 special topics tool use language
324 12 3 special topics tool use language324 12 3 special topics tool use language
324 12 3 special topics tool use language
Β 
324 12 2 special topics timing
324 12 2 special topics timing324 12 2 special topics timing
324 12 2 special topics timing
Β 
324 12 part 1 special topics food caching
324 12 part 1 special topics food caching324 12 part 1 special topics food caching
324 12 part 1 special topics food caching
Β 
324 10 observational learning
324 10 observational learning324 10 observational learning
324 10 observational learning
Β 
324 09 avoidance
324 09 avoidance324 09 avoidance
324 09 avoidance
Β 
324 7 part 2 extinction
324 7 part 2 extinction 324 7 part 2 extinction
324 7 part 2 extinction
Β 
324 06 stimulus control
324 06 stimulus control324 06 stimulus control
324 06 stimulus control
Β 

Recently uploaded

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
Β 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
Β 
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
Β 
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
Β 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
Β 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
Β 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
Β 
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
Β 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
Β 
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
Β 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
Β 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
Β 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
Β 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
Β 

Recently uploaded (20)

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
Β 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Β 
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
Β 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
Β 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
Β 
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈcall girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
call girls in Kamla Market (DELHI) πŸ” >ΰΌ’9953330565πŸ” genuine Escort Service πŸ”βœ”οΈβœ”οΈ
Β 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
Β 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Β 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
Β 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.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
Β 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
Β 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Β 
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
Β 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
Β 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Β 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
Β 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
Β 

Understanding linear regression models

  • 2. Regression Introduced Regression is about prediction Predicting an unknown point based on observations (or measurements) Widgets sold based on advertising We can explore known relationships We can explore unknown relationships
  • 3. The Variables Outcome Variable The thing we are predicting Number of widgets sold Predictor Variable (simple regression) The variables that you know about Advertising dollars Predictor Variables (multiple regression) We predict values of a dependent variable (outcome) using one or more independent variables (predictors)
  • 4. The model Any prediction follows the basic formula: Outcomei = (model) + errori In regression our model contains several things: Slope of the line (that best fits the data measured) = b1 Intercept of the line (at the Y axis) b0 So our model = Yi = (b0 + b1Xi) + Errori Do you recognize this equation? The model is simply a line
  • 5. So how do we calculate this line? The Method of Least Squares The line that is the closest to all the data points Residuals = Deviations (distance of actual data points to the line) Square these residuals to get rid of negatives Then sum them.
  • 6. How well does this line fit? No line is perfect (there are always residuals) If our line is a good one it should be better than a basic line (significantly so) We compare our line to a basic line: Deviation = SUM (observed – model)2 This is basically a β€˜mean’ (model) The mean is an awful predictor No matter how much you spend on adverts – the sales of your widgets are the same
  • 7. Fitness continued SSt = total sum of squared differences (using the mean) SSr= total residual sum of squares (using our best fit model) Represents a degree of inaccuracy SSm (model sum of squares) = SSt – SSr Large = our model is different than the simple model Proportion of improvement: R2 = SSm/ SSt Percentage of variation in the outcome that can be explained by our model
  • 8. More fitness You can assess this using an F test as well F is simply systematic variance/unsystematic variance In regression that means: Improvement of the model (SSm - systematic) and the difference between the model and the observed data (SSr – unsystematic) But we need to look at mean squares Because we need to use the average sums of squares in an F test. So we divide by degrees of freedom For SSm = the number of variables in the model For SSr = number of observations – the number of parameters being estimated (number of beta coefficients or predictors) F = MSM / MSR
  • 9. Individual Predictors The coefficient bis essentially the gradient of the line If the predictor is not valuable then it will predict no change in the outcome as it changes. This would be b= 0 This is what the mean does If the predictor is valuable – then it will be significantly different than 0.
  • 10. Individual Predictors cont. To test if b is different from 0 we will use a t-test. We are comparing how big the b value is in comparison to the amount of error in that estimate. We will then use the standard error of the bvalue. t = bobserved – bexpected / SEb Since the expected value is 0 (no change) then we have to simply divide the observed b value by the standard error of b to get the t score. Degress of freedom is calculated using the following: N – p – 1 (p = number of predictors)