Example: bachelor of science

Simple Linear Regression Models

14-1 2008 Raj JainCSE567 MWashington University in St. LouisSimple Linear Simple Linear Regression ModelsRegression ModelsRaj Jain Washington University in Saint LouisSaint Louis, MO slides are available on-line at: ~jain/cse567-08/14-2 2008 Raj JainCSE567 MWashington University in St. of a Good of model of deviation of Intervals for Regression Intervals for Tests for verifying Regression Assumption14-3 2008 Raj JainCSE567 MWashington University in St. LouisSimple Linear Regression ModelsSimple Linear Regression Models ! Regression model : Predict a response for a given set of predictor variables.!Response Variable: Estimated variable!Predictor Variables: Variables used to predict the response. predictors or factors! Linear Regression Models : Response is a Linear function of predictors. ! Simple Linear Regression Models : Only one predictor14-4 2008 Raj JainCSE567 MWashington University in St. LouisDefinition of a Good ModelDefinition of a Good ModelxyxyxyxyGoodGoodBad14-5 2008 Raj JainCSE567 MWashington University in St.

Linear Regression Models: Response is a linear function of predictors. ! Simple Linear Regression Models: Only one predictor. 14-4 Washington University in St. Louis CSE567M ©2008 Raj Jain ... All tests for independence simply try to find dependence. 14-41 Washington University in St. Louis CSE567M ©2008 Raj Jain Independent Errors (Cont) 2 ...

Tags:

  Linear, Model, Simple, Regression, Independence, Simple linear regression models

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Simple Linear Regression Models

1 14-1 2008 Raj JainCSE567 MWashington University in St. LouisSimple Linear Simple Linear Regression ModelsRegression ModelsRaj Jain Washington University in Saint LouisSaint Louis, MO slides are available on-line at: ~jain/cse567-08/14-2 2008 Raj JainCSE567 MWashington University in St. of a Good of model of deviation of Intervals for Regression Intervals for Tests for verifying Regression Assumption14-3 2008 Raj JainCSE567 MWashington University in St. LouisSimple Linear Regression ModelsSimple Linear Regression Models ! Regression model : Predict a response for a given set of predictor variables.!Response Variable: Estimated variable!Predictor Variables: Variables used to predict the response. predictors or factors! Linear Regression Models : Response is a Linear function of predictors. ! Simple Linear Regression Models : Only one predictor14-4 2008 Raj JainCSE567 MWashington University in St. LouisDefinition of a Good ModelDefinition of a Good ModelxyxyxyxyGoodGoodBad14-5 2008 Raj JainCSE567 MWashington University in St.

2 LouisGood model (Cont)Good model (Cont)! Regression Models attempt to minimize the distance measured vertically between the observation point and the model line (or curve).!The length of the line segment is called residual, modeling error, or simply error. !The negative and positive errors should cancel out Zero overall error Many lines will satisfy this 2008 Raj JainCSE567 MWashington University in St. LouisGood model (Cont)Good model (Cont)!Choose the line that minimizes the sum of squares of the errors. where, is the predicted response when the predictor variable is x. The parameter b0and b1are fixed Regression parameters to be determined from the data.!Given nobservation pairs {(x1, y1), .., (xn, yn)}, the estimated response for the ith observation is:!The error is:14-7 2008 Raj JainCSE567 MWashington University in St. LouisGood model (Cont)Good model (Cont)!The best Linear model minimizes the sum of squared errors (SSE):subject to the constraint that the mean error is zero:!

3 This is equivalent to minimizing the variance of errors (see Exercise).14-8 2008 Raj JainCSE567 MWashington University in St. LouisEstimation of model ParametersEstimation of model Parameters! Regression parameters that give minimum error variance are:!where,and14-9 2008 Raj JainCSE567 MWashington University in St. LouisExample !The number of disk I/O's and processor times of seven programs were measured as: (14, 2), (16, 5), (27, 7), (42, 9), (39, 10), (50, 13), (83, 20)!For this data: n=7, xy=3375, x=271, x2=13,855, y=66, y2=828, = , = Therefore,!The desired Linear model is:14-10 2008 Raj JainCSE567 MWashington University in St. LouisExample (Cont)Example (Cont)14-11 2008 Raj JainCSE567 MWashington University in St. LouisExample 14. (Cont)Example 14. (Cont)!Error Computation14-12 2008 Raj JainCSE567 MWashington University in St. LouisDerivation of Regression ParametersDerivation of Regression Parameters!The error in the ith observation is:!For a sample of n observations, the mean error is:!

4 Setting mean error to zero, we obtain:!Substituting b0 in the error expression, we get:14-13 2008 Raj JainCSE567 MWashington University in St. LouisDerivation of Regression Parameters (Cont)Derivation of Regression Parameters (Cont)!The sum of squared errors SSE is:14-14 2008 Raj JainCSE567 MWashington University in St. LouisDerivation (Cont)Derivation (Cont)!Differentiating this equation with respect to b1and equating the result to zero:!That is,14-15 2008 Raj JainCSE567 MWashington University in St. LouisAllocation of VariationAllocation of Variation!Error variance without Regression = Variance of the responseand14-16 2008 Raj JainCSE567 MWashington University in St. LouisAllocation of Variation (Cont)Allocation of Variation (Cont)!The sum of squared errors without Regression would be:!This is called total sum of squaresor (SST). It is a measure of y's variability and is called variationof y. SST can be computed as follows:!Where, SSY is the sum of squares of y(or y2). SS0 is the sum of squares of and is equal to.

5 14-17 2008 Raj JainCSE567 MWashington University in St. LouisAllocation of Variation (Cont)Allocation of Variation (Cont)!The difference between SST and SSE is the sum of squares explained by the Regression . It is called SSR:or!The fraction of the variation that is explained determines the goodness of the Regression and is called the coefficient of determination, R2:14-18 2008 Raj JainCSE567 MWashington University in St. LouisAllocation of Variation (Cont)Allocation of Variation (Cont)!The higher the value of R2, the better the Regression . R2=1 Perfect fit R2=0 No fit!Coefficient of Determination = {Correlation Coefficient (x,y)}2!Shortcut formula for SSE:14-19 2008 Raj JainCSE567 MWashington University in St. LouisExample !For the disk I/O-CPU time data of Example :!The Regression explains 97% of CPU time's variation. 14-20 2008 Raj JainCSE567 MWashington University in St. LouisStandard Deviation of ErrorsStandard Deviation of Errors!Since errors are obtained after calculating two Regression parameters from the data, errors have n-2degrees of freedom!

6 SSE/(n-2) is called mean squared errorsor (MSE). !Standard deviation of errors = square root of MSE. !SSY has ndegrees of freedom since it is obtained from nindependent observations without estimating any parameters.!SS0 has just one degree of freedom since it can be computed simply from !SST has n-1degrees of freedom, since one parameter must be calculated from the data before SST can be computed. 14-21 2008 Raj JainCSE567 MWashington University in St. LouisStandard Deviation of Errors (Cont)Standard Deviation of Errors (Cont)!SSR, which is the difference between SST and SSE, has the remaining one degree of freedom.!Overall,!Notice that the degrees of freedom add just the way the sums of squares do. 14-22 2008 Raj JainCSE567 MWashington University in St. LouisExample !For the disk I/O-CPU data of Example , the degrees of freedom of the sums are:!The mean squared error is:!The standard deviation of errors is:14-23 2008 Raj JainCSE567 MWashington University in St. LouisConfidence Intervals for Regression ParamsConfidence Intervals for Regression Params!

7 Regression coefficients b0and b1are estimates from a single sample of size n Random Using another sample, the estimates may be different. If 0and 1are true parameters of the population. That is,!Computed coefficients b0and b1are estimates of 0and 1, respectively. 14-24 2008 Raj JainCSE567 MWashington University in St. LouisConfidence Intervals (Cont)Confidence Intervals (Cont)!The 100(1- )% confidence intervals for b0and b1can be be computed using t[1- /2; n-2]--- the 1- /2 quantile of a t variate with n-2 degrees of freedom. The confidence intervals are:And!If a confidence interval includes zero, then the Regression parameter cannot be considered different from zero at the at 100(1- )% confidence level. 14-25 2008 Raj JainCSE567 MWashington University in St. LouisExample !For the disk I/O and CPU data of Example , we have n=7, = , =13,855, and se= !Standard deviations of b0and b1are:14-26 2008 Raj JainCSE567 MWashington University in St. LouisExample (Cont)Example (Cont)!

8 From Appendix Table , the of a t-variate with 5 degrees of freedom is 90% confidence interval for b0is:!Since, the confidence interval includes zero, the hypothesis that this parameter is zero cannot be rejected at significance level. b0is essentially zero.!90% Confidence Interval for b1is:!Since the confidence interval does not include zero, the slope b1is significantly different from zero at this confidence 2008 Raj JainCSE567 MWashington University in St. LouisCase Study : Remote Procedure CallCase Study : Remote Procedure Call14-28 2008 Raj JainCSE567 MWashington University in St. LouisCase Study (Cont)Case Study (Cont)!UNIX:14-29 2008 Raj JainCSE567 MWashington University in St. LouisCase Study (Cont)Case Study (Cont)!ARGUS:14-30 2008 Raj JainCSE567 MWashington University in St. LouisCase Study (Cont)Case Study (Cont)!Best Linear Models are:!The regressions explain 81% and 75% of the variation, ARGUS takes larger time per byte as well as a larger set up time per call than UNIX?

9 14-31 2008 Raj JainCSE567 MWashington University in St. LouisCase Study (Cont)Case Study (Cont)!Intervals for intercepts overlap while those of the slopes do not. Set up times are not significantly different in the two systems while the per byte times (slopes) are different. 14-32 2008 Raj JainCSE567 MWashington University in St. LouisConfidence Intervals for PredictionsConfidence Intervals for Predictions!This is only the mean value of the predicted response. Standard deviation of the mean of a future sample of m observations is:!m =1 Standard deviation of a single future observation:14-33 2008 Raj JainCSE567 MWashington University in St. LouisCI for Predictions (Cont)CI for Predictions (Cont)!m = Standard deviation of the mean of a large number of future observations at xp:!100(1- )% confidence interval for the mean can be constructed using a t quantile read at n-2degrees of freedom. 14-34 2008 Raj JainCSE567 MWashington University in St. LouisCI for Predictions (Cont)CI for Predictions (Cont)!

10 Goodness of the prediction decreases as we move away from the 2008 Raj JainCSE567 MWashington University in St. LouisExample !Using the disk I/O and CPU time data of Example , let us estimate the CPU time for a program with 100 disk I/O's. !For a program with 100 disk I/O's, the mean CPU time is:14-36 2008 Raj JainCSE567 MWashington University in St. LouisExample (Cont)Example (Cont)!The standard deviation of the predicted mean of a large number of observations is:!From Table , the of the t-variate with 5 degrees of freedom is 90% CI for the predicted mean14-37 2008 Raj JainCSE567 MWashington University in St. LouisExample (Cont)Example (Cont)!CPU time of a single future program with 100 disk I/O's:!90% CI for a single prediction:14-38 2008 Raj JainCSE567 MWashington University in St. LouisVisual Tests for Regression AssumptionsVisual Tests for Regression AssumptionsRegression true relationship between the response variable yand the predictor variable xis predictor variable xis non-stochastic and it is measured without any model errors are statistically errors are normally distributed with zero mean and a constant standard 2008 Raj JainCSE567 MWashington University in St.


Related search queries