This Week Continue with linear regression Begin multiple regression –Le 8.2 –C & S 9:A-E Handout: Class examples and assignment 3.

Slides:



Advertisements
Similar presentations
Test of (µ 1 – µ 2 ),  1 =  2, Populations Normal Test Statistic and df = n 1 + n 2 – 2 2– )1– 2 ( 2 1 )1– 1 ( 2 where ] 2 – 1 [–
Advertisements

Chapter 12 Simple Linear Regression
Forecasting Using the Simple Linear Regression Model and Correlation
Regression Analysis Module 3. Regression Regression is the attempt to explain the variation in a dependent variable using the variation in independent.
EPI 809/Spring Probability Distribution of Random Error.
Definition  Regression Model  Regression Equation Y i =  0 +  1 X i ^ Given a collection of paired data, the regression equation algebraically describes.
Chapter 12 Simple Linear Regression
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Creating Graphs on Saturn GOPTIONS DEVICE = png HTITLE=2 HTEXT=1.5 GSFMODE = replace; PROC REG DATA=agebp; MODEL sbp = age; PLOT sbp*age; RUN; This will.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Multiple regression analysis
Reading – Linear Regression Le (Chapter 8 through 8.1.6) C &S (Chapter 5:F,G,H)
Chapter 10 Simple Regression.
The Simple Regression Model
1 Review of Correlation A correlation coefficient measures the strength of a linear relation between two measurement variables. The measure is based on.
Chapter Topics Types of Regression Models
1 Regression Analysis Regression used to estimate relationship between dependent variable (Y) and one or more independent variables (X). Consider the variable.
Ch. 14: The Multiple Regression Model building
© 2000 Prentice-Hall, Inc. Chap Forecasting Using the Simple Linear Regression Model and Correlation.
Correlation and Regression Analysis
Chapter 7 Forecasting with Simple Regression
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS & Updated by SPIROS VELIANITIS.
Correlation & Regression
Introduction to Linear Regression and Correlation Analysis
CPE 619 Simple Linear Regression Models Aleksandar Milenković The LaCASA Laboratory Electrical and Computer Engineering Department The University of Alabama.
Simple Linear Regression Models
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Econ 3790: Business and Economics Statistics
OPIM 303-Lecture #8 Jose M. Cruz Assistant Professor.
1 1 Slide © 2007 Thomson South-Western. All Rights Reserved Chapter 13 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 15 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 1 Slide Simple Linear Regression Coefficient of Determination Chapter 14 BA 303 – Spring 2011.
Copyright © Cengage Learning. All rights reserved. 12 Simple Linear Regression and Correlation
1 1 Slide © 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
Lecture 8 Simple Linear Regression (cont.). Section Objectives: Statistical model for linear regression Data for simple linear regression Estimation.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
6-1 Introduction To Empirical Models Based on the scatter diagram, it is probably reasonable to assume that the mean of the random variable Y is.
ANOVA for Regression ANOVA tests whether the regression model has any explanatory power. In the case of simple regression analysis the ANOVA test and the.
Chapter 13 Multiple Regression
Regression Analysis Relationship with one independent variable.
STA 286 week 131 Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression.
Multiple Regression. Simple Regression in detail Y i = β o + β 1 x i + ε i Where Y => Dependent variable X => Independent variable β o => Model parameter.
Simple Linear Regression. Data available : (X,Y) Goal : To predict the response Y. (i.e. to obtain the fitted response function f(X)) Least Squares Fitting.
Simple linear regression Tron Anders Moger
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Simple Linear Regression Analysis Chapter 13.
Chapter 12 Simple Linear Regression n Simple Linear Regression Model n Least Squares Method n Coefficient of Determination n Model Assumptions n Testing.
1 1 Slide The Simple Linear Regression Model n Simple Linear Regression Model y =  0 +  1 x +  n Simple Linear Regression Equation E( y ) =  0 + 
1 Experimental Statistics - week 12 Chapter 11: Linear Regression and Correlation Chapter 12: Multiple Regression.
1 Experimental Statistics - week 11 Chapter 11: Linear Regression and Correlation.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
Lecture 11: Simple Linear Regression
Chapter 20 Linear and Multiple Regression
Statistics for Managers using Microsoft Excel 3rd Edition
Simple Linear Regression
Statistics for Business and Economics (13e)
Relationship with one independent variable
Quantitative Methods Simple Regression.
Slides by JOHN LOUCKS St. Edward’s University.
6-1 Introduction To Empirical Models
Simple Linear Regression
PENGOLAHAN DAN PENYAJIAN
Relationship with one independent variable
SIMPLE LINEAR REGRESSION
Simple Linear Regression
St. Edward’s University
Presentation transcript:

This Week Continue with linear regression Begin multiple regression –Le 8.2 –C & S 9:A-E Handout: Class examples and assignment 3

Linear Regression Investigate the relationship between two variables Dependent variable –The variable that is being predicted or explained Independent variable –The variable that is doing the predicting or explaining Think of data in pairs (x i, y i )

Linear Regression - Purpose Is there an association between the two variables –Is BP change related to weight change? Estimation of impact –How much BP change occurs per pound of weight change Prediction –If a person loses 10 pounds how much of a drop in blood pressure can be expected

Assumption for Linear Regression For each value of X there is a population of Y’s that are normally distributed The population means form a straight line Each population has the same variance  2 Note: The X’s do not need to be normally distributed, in fact the researcher can select these prior to data collection

Simple Linear Regression Equation n The simple linear regression equation is:  y =  0 +  1 x   0 is the mean when x=0  The mean increases by  1 for each increase of x by 1

Simple Linear Regression Model  The equation that describes how individual y values relate to x and an error term is called the regression model. y =  0 +  1 x +    reflects how individuals deviate from others with the same value of x

Estimated Simple Linear Regression Equation n The estimated simple linear regression equation is: b 0 is the estimate for  0 b 0 is the estimate for  0 b 1 is the estimate for  1 b 1 is the estimate for  1 is the estimated (predicted) value of y for a given x value. It is the estimated mean for that x. is the estimated (predicted) value of y for a given x value. It is the estimated mean for that x.

Least Squares Method  Least Squares Criterion: Choose    and    to minimize Of all possible lines pick the one that minimizes the sum of the distances squared of each point from that line S =  y i –  0  1 x i ) 2

Slope: The Least Squares Estimates Intercept:

 An Estimate of  2 The mean square error (MSE) provides the estimate of  2, and the notation s 2 is also used. s 2 = MSE = SSE/(n-2) s 2 = MSE = SSE/(n-2)where: Estimating the Variance If points are close to the regression line then SSE will be small If points are far from the regression line then SSE will be large

Estimating   An Estimate of   To estimate  we take the square root of  2.  The resulting s is called the root mean square error.

Hypothesis Testing for   H o :  1 = 0 no relation between x and y H a :  1 ≠  0 relation between x and y Test Statistic: t = b 1 /SE(b 1 ) SE(b 1 ) depends on Sample size How well the estimated line fits the points How spread out the range of x values are

n Rejection Rule Reject H 0 if t t  where: t  is based on a t distribution with n - 2 degrees of freedom with n - 2 degrees of freedom Testing for Significance: t Test

Confidence Interval for  1 is cutoff value from t-distribution with n-2 df CLM option in SAS on model statement

Estimating the Mean for a Particular X  Simply plug in your value of x in the estimated regression equation Want to estimate the mean BP for persons aged 50 Suppose b 0 = 100 and b 1 = 0.80 Estimate = *50 = 140 mmHg  Can compute 95% CI for the estimate using SAS CLM option on model statement

The Coefficient of Determination  Relationship Among SST, SSR, SSE SST = SSR + SSE where: SST = total sum of squares SST = total sum of squares SSR = sum of squares due to regression SSR = sum of squares due to regression SSE = sum of squares due to error SSE = sum of squares due to error ^^

n The coefficient of determination is: r 2 = SSR/SST where: SST = total sum of squares SST = total sum of squares SSR = sum of squares due to regression SSR = sum of squares due to regression r 2 = proportion of variability explained by X (must be between 0 and 1) The Coefficient of Determination

Residuals  How far off (distance) an individual point is from the estimated regression line residual = predicted value – observed value

SAS CODE FOR REGRESSION ; PROC REG DATA=datasetname SIMPLE; MODEL depvar = indvar(s); PLOT depvar * indvar ; RUN; Several options on model and plot statements.

OPTIONS ON MODEL STATEMENT ; MODEL depvar = indvar(s)/options OptionWhat it does clb95% CI for  1 pPredicted values rResiduals clm95% CI for the mean at value of x

OUTPUT FROM PROC REG Dependent Variable: quarsales Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 1 SSR <.0001 Error 8 SSE Corrected Total 9 SST Root MSE R-Square Dependent Mean Coeff Var Coefficient of Determination 14200/15730 MSE

Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept studentpop <.0001 REGRESSION EQUATION : Y = *X QUARSALES = *STUDENTPOP b1 SE(b1)