simple linear regression equation for a set of data p Use descriptive statistics to describe the relationship between X and Y p Determine whether a regression model is significant
confidence intervals for the regression coefficients p Interpret confidence intervals for a predicted value of Y p Check whether regression assumptions are satisfied p Check to see if the data contains unusual values (continued)
p Predict the value of a dependent variable based on the value of at least one independent variable p Explain the impact of changes in an independent variable on the dependent variable Dependent variable: the variable we wish to explain Independent variable: the variable used to explain the dependent variable
Linear component Population Linear Regression The population regression model: Population y intercept Population Slope Coefficient Random Error term, or residual Dependent Variable Independent Variable Random Error component
variable and the y variable is linear p The distribution of the errors has constant variability p Error values are normally distributed p Error values are independent (over time)
The sample regression line provides an estimate of the population regression line Estimated Regression Model Estimate of the regression intercept Estimate of the regression slope Estimated (or predicted) y value Independent variable
the value of x is zero p b1 is the estimated change in the average value of y as a result of a one-unit change in x Interpretation of the Slope and the Intercept
b1 will be found using computer software, such as Excel’s data analysis add-in or MegaStat p Other regression measures will also be computed as part of computer- based regression analysis
to examine the relationship between the selling price of a home and its size (measured in square feet) p A random sample of 10 houses is selected p Dependent variable (y) = house price in $1000 p Independent variable (x) = square feet
average value of Y when the value of X is zero (if x = 0 is in the range of observed x values) p Here, houses with 0 square feet do not occur, so b0 = 98.24833 just indicates the height of the line. feet) (square 0.10977 98.24833 price house + =
change in Y as a result of a one-unit increase in X feet) (square 0.10977 98.24833 price house + = Here, b1 = .10977 tells us that the average value of a house increases by . 10977($1000) = $109.77, on average, for each additional one square foot of size
by variability in X. Coefficient of Determination, R2 Note: In the single independent variable case, the coefficient of determination is where: R2 = Coefficient of determination r = Simple correlation coefficient 2 2 r R =
< R2 < 1, correlation is negative Weaker linear relationship between x and y: Some but not all of the variation in y is explained by variation in x 0 < R2 < 1, correlation is positive
explained by variation in square feet Regression Analysis r² 0.581 r 0.762 Std. Error 41.330 The correlation of .762 shows a fairly strong direct relationship. The typical error in predicting Price is 41.33($000) = $41,330
a population slope p Is there a linear relationship between x and y? p Null and alternative hypotheses p H0 : β1 = 0 (no linear relationship) p Ha : β1 ≠ 0 (linear relationship does exist) p Obtain p-value from ANOVA or across from the slope coefficient (they are the same in simple regression) p
312 1600 279 1700 308 1875 199 1100 219 1550 405 2350 324 2450 319 1425 255 1700 (sq.ft.) 0.1098 98.25 price house + = Estimated Regression Equation: The slope of this model is 0.1098 Does square footage of the house affect its sales price? Inference about the Slope: t Test (continued)
= 0 Ha : β1 ≠ 0 We can be 98.96% confident that square feet is related to house price. From Excel output: Reject H0 Coefficients Standard Error t Stat P-value Intercept 98.24833 58.03348 1.69296 0.12892 Square Feet 0.10977 0.03297 3.32938 0.01039 P-value Decision: Conclusion:
Excel Printout for House Prices: We can be 95% confident that house prices increase by between $33.74 and $185.80 for a 1 square foot increase. Coefficient s Standard Error t Stat P-value Lower 95% Upper 95% Intercept 98.24833 58.03348 1.69296 0.12892 -35.57720 232.07386 Square Feet 0.10977 0.03297 3.32938 0.01039 0.03374 0.18580
+ = + = Example: House Prices Predict the price for a house with 2000 square feet: The predicted price for a house with 2000 square feet is 317.85($1,000s) = $317,850 (continued)
for an individual house with 2,000 square feet Predicted Price Yi = 317.85 ($1,000s) = $317, 850 MegaStat will give both the predicted value as well as the lower and upper limits Prediction Interval Estimate for y|xp The prediction interval endpoints are from $215,503 to $420,065. We can be 95% confident that the price of a 2000 ft2 home will fall within those limits. Predicted values for: Price($000) 95% Confidence Interval 95% Prediction Interval Square feet Predicted lower upper lower upper 2,000 317.784 280.664 354.903 215.503 420.065
Check for the constant variability assumption for all levels of predicted Y p Check normal residuals assumption p Check for independence over time p Graphical Analysis of Residuals p Can plot residuals vs. x and predicted Y p Can create NPP of residuals to check for normality (or use Skewness/ Kurtosis) p Can check D-W statistic to confirm independence
to check for normality. If you see an approximate straight line residuals are acceptably normal. You can also use Skewness/Kurtosis. If both are within + 1 the residuals are acceptably normal Residual Analysis for Independence – Can check D-W statistic to confirm independence. If D-W statistic is greater than 1.3 the residuals are acceptably independent. Needed only if the data is collected over time.
predicted values (studentized and studentized deleted residuals do this; MegaStat highlights in blue) p Check for outliers on the X-axis; they are indicated by large leverage values; more than twice as large as the average leverage. MegaStat highlights in blue. p Check Cook’s Distance which measures the harmful influence of a data point on the equation by looking at residuals and leverage together. Cook’s D > 1 suggests potentially harmful data points and those points should be checked for data entry error. MegaStat highlights in blue based on F distribution values.
X and Y but not in pattern. The point is unlikely to alter regression line. p b). Outlier is extreme in both X and Y as well as in the overall pattern. This point will strongly influence regression line p c). Outlier is extreme for X nearly average for Y. The further it is away from the pattern the more it will change the regression. p d). Outlier extreme in Y not in X. The further it is away from the pattern the more it will change the regression. p e). Outlier extreme in pattern, but not in X or Y. Slope may not be changed much but intercept will be higher with this point included.
of individual values p Discussed residual analysis to address assumptions of regression and correlation p Discussed checks for unusual data points (continued)