Chapter 6 (cont.) Regression Estimation
Simple Linear Regression: review of least squares procedure 2
Introduction n We will examine the relationship between quantitative variables x and y via a mathematical equation. n x: explanatory variable n y: response variable n Data: 3
The Model 4 House size House Cost Most lots sell for $25,000 Building a house costs about $75 per square foot. House cost = (Size) The model has a deterministic and a probabilistic component
The Model 5 House cost = (Size) House size House Cost Most lots sell for $25,000 However, house costs vary even among same size houses! Since cost behave unpredictably, we add a random component.
The Model n The first order linear model y = response variable x = explanatory variable 0 = y-intercept 1 = slope of the line = error variable 6 x y 00 Run Rise = Rise/Run 0 and 1 are unknown population parameters, therefore are estimated from the data.
Estimating the Coefficients n The estimates are determined by –drawing a sample from the population of interest, –calculating sample statistics. –producing a straight line that cuts into the data. 7 Question: What should be considered a good line? x y
The Least Squares (Regression) Line 8
9 3 3 (1,2) 2 2 (2,4) (3,1.5) Sum of squared differences =(2 - 1) 2 +(4 - 2) 2 +( ) 2 + (4,3.2) ( ) 2 = 6.89 Sum of squared differences =(2 -2.5) 2 +( ) 2 +( ) 2 +( ) 2 = Let us compare two lines The second line is horizontal The smaller the sum of squared differences the better the fit of the line to the data.
The Estimated Coefficients 10 To calculate the estimates of the slope and intercept of the least squares line, use the formulas: The least squares prediction equation that estimates the mean value of y for a particular value of x is:
Example: Consumer’s Union recently evaluated 26 brands of frozen pizza based on taste (y) We will examine the taste scores (y) and the corresponding fat content (x). 11 Simple Linear Regression
The Simple Linear Regression Line (example, cont.) 12 Solution –Solving by hand: Calculate a number of statistics where n = 26.
The Simple Linear Regression Line (example, cont.) 13 Solution – continued –Using the computer 1. Scatterplot 2. Trend function 3. Data tab > Data Analysis > Regression
Regression Statistics Multiple R R Square Adjusted R Square Standard Error Observations26 ANOVA dfSSMSFSignificance F Regression E-05 Residual Total CoefficientsStandard Errort StatP-valueLower 95%Upper 95% Intercept E Fat E The Simple Linear Regression Line (example, cont.) 14
The Simple Linear Regression Line (example, cont.) 15
Regression estimator of a population mean y