Presentation on theme: "Chapter 7 Forecasting with Simple Regression"— Presentation transcript:
1 Chapter 7 Forecasting with Simple Regression Business ForecastingChapter 7Forecasting with Simple Regression
2 Chapter Topics Types of Regression Models Determining the Simple Linear Regression EquationMeasures of VariationAssumptions of Regression and CorrelationResidual AnalysisMeasuring AutocorrelationInferences about the Slope
3 Chapter Topics Correlation—Measuring the Strength of the Association (continued)Correlation—Measuring the Strength of the AssociationEstimation of Mean Values and Prediction of Individual ValuesPitfalls in Regression and Ethical Issues
4 Purpose of Regression Analysis Regression Analysis is Used Primarily to Model Causality and Provide PredictionPredict the values of a dependent (response) variable based on values of at least one independent (explanatory) variable.Explain the effect of the independent variables on the dependent variable.
5 Types of Regression Models Positive Linear RelationshipRelationship NOT LinearNegative Linear RelationshipNo Relationship
6 Linear Regression Equation Sample regression line provides an estimate of the population regression line as well as a predicted value of Y.Sample Y InterceptSample Slope CoefficientResidualSimple Regression Equation(Fitted Regression Line, Predicted Value)
7 Simple Linear Regression: Example You wish to examine the linear dependency of the annual sales of produce stores on their sizes in square footage. Sample data for seven stores were obtained. Find the equation of the straight line that best fits the data.Annual Store Square Sales Feet ($1000), ,681, ,395, ,653, ,543, ,318, ,563, ,760
9 Simple Linear Regression Equation: Example From Excel Printout:
10 Graph of the Simple Linear Regression Equation: Example Yi = Xi
11 Interpretation of Results: Example The slope of means that, for each increase of one unit in X, we predict the average of Y to increase by an estimated units.The equation estimates that, for each increase of 1 square foot in the size of the store, the expected annual sales are predicted to increase by $1,487.
12 Simple Linear Regression in Excel In Excel, use | Regression …EXCEL Spreadsheet of Regression Sales on Square Footage
13 Measures of Variation: The Sum of Squares SST = SSR SSETotal Sample Variability=Unexplained VariabilityExplained Variability+
14 The ANOVA Table in Excel dfSSMSFSignificanceRegressionkSSRMSR=SSR/kMSR/MSEP-value ofthe F TestResidualsn−k−1SSEMSE=SSE/(n−k−1)Totaln−1SST
15 Measures of Variation The Sum of Squares: Example Excel Output for Produce StoresDegrees of freedomRegression (explained) dfSSRError (residual) dfSSETotal dfSST
16 The Coefficient of Determination Measures the proportion of variation in Y that is explained by the independent variable X in the regression model.
17 Measures of Variation: Produce Store Example Excel Output for Produce StoresSyxr2 = 0.9494% of the variation in annual sales can be explained by the variability in the size of the store as measured by square footage.
18 Linear Regression Assumptions NormalityY values are normally distributed for each X.Probability distribution of error is normal.2. Homoscedasticity (Constant Variance)3. Independence of Errors
19 Residual Analysis Purposes Graphical Analysis of Residuals Examine linearityEvaluate violations of assumptionsGraphical Analysis of ResidualsPlot residuals vs. X and time
20 Residual Analysis for Linearity XXeeXXNot LinearLinear
21 Residual Analysis for Homoscedasticity XXSRSRXXHomoscedasticityHeteroscedasticity
22 Residual Analysis: Excel Output for Produce Stores Example
23 Residual Analysis for Independence The Durbin–Watson StatisticUsed when data are collected over time to detect autocorrelation (residuals in one time period are related to residuals in another period).Measures the violation of the independence assumptionShould be close to 2.If not, examine the model for autocorrelation.
24 Durbin–Watson Statistic in Minitab Minitab | Regression | Simple Linear Regression …Check the box for Durbin–Watson Statistic
25 Obtaining the Critical Values of Durbin–Watson Statistic Finding the Critical Values of Durbin–Watson Statistic
26 Using the Durbin–Watson Statistic : No autocorrelation (error terms are independent).: There is autocorrelation (error terms are not independent).InconclusiveReject H0 (positive autocorrelation)Reject H0 (negative autocorrelation)Accept H0 (no autocorrelation)dLdU24-dU4-dL4
27 Residual Analysis for Independence Graphical ApproachNot IndependentIndependenteeTimeTimeCyclical PatternNo Particular PatternResidual is plotted against time to detect any autocorrelation
28 Inference about the Slope: t Test t Test for a Population SlopeIs there a linear dependency of Y on X ?Null and Alternative HypothesesH0: = 0 (No Linear Dependency)H1: 0 (Linear Dependency)Test Statisticdf = n - 2
29 Example: Produce Store Data for Seven Stores:Estimated Regression Equation:Annual Store Square Sales Feet ($000), ,681, ,395, ,653, ,543, ,318, ,563, ,760The slope of this model isDoes Square Footage Affect Annual Sales?
30 Inferences about the Slope: t Test Example Test Statistic:Decision:Conclusion:H0: = 0H1: 0 0.05df = 5Critical Value(s):From Excel PrintoutReject H0RejectReject0.0250.025There is evidence that square footage affects annual sales.t−2.57062.5706
31 Inferences about the Slope: F Test F Test for a Population SlopeIs there a linear dependency of Y on X ?Null and Alternative HypothesesH0: = 0 (No Linear Dependency)H1: 0 (Linear Dependency)Test StatisticNumerator df=1, denominator df=n-2
32 Relationship between a t Test and an F Test Null and Alternative HypothesesH0: = 0 (No Linear Dependency)H1: 0 (Linear Dependency)
33 Inferences about the Slope: F Test Example Test Statistic:Decision:Conclusion:H0: = 0H1: 0 0.05numeratordf = 1denominatordf 7 − 2 = 5From Excel PrintoutReject H0Reject = 0.05There is evidence that square footage affects annual sales.6.61
34 Purpose of Correlation Analysis (continued)Population Correlation Coefficient (rho) is used to measure the strength between the variables.Sample Correlation Coefficient r is an estimate of and is used to measure the strength of the linear relationship in the sample observations.
35 Sample of Observations from Various r Values YYYXXXr = −1r = −0.5r = 0YYXXr = 0.5r = 1
36 Features of r and r Unit Free Range between −1 and 1 The Closer to −1, the Stronger the Negative Linear Relationship.The Closer to 1, the Stronger the Positive Linear Relationship.The Closer to 0, the Weaker the Linear Relationship.
37 Pitfalls of Regression Analysis Lacking an Awareness of the Assumptions Underlining Least-squares Regression.Not Knowing How to Evaluate the Assumptions.Not Knowing What the Alternatives to Least-squares Regression are if a Particular Assumption is Violated.Using a Regression Model Without Knowledge of the Subject Matter.
38 Strategy for Avoiding the Pitfalls of Regression Start with a scatter plot of X on Y to observe possible relationship.Perform residual analysis to check the assumptions.Use a normal probability plot of the residuals to uncover possible non-normality.
39 Strategy for Avoiding the Pitfalls of Regression (continued)If there is violation of any assumption, use alternative methods (e.g., least absolute deviation regression or least median of squares regression) to least-squares regression or alternative least-squares models (e.g., curvilinear or multiple regression).If there is no evidence of assumption violation, then test for the significance of the regression coefficients and construct confidence intervals and prediction intervals.
40 Chapter Summary Introduced Types of Regression Models. Discussed Determining the Simple Linear Regression Equation.Described Measures of Variation.Addressed Assumptions of Regression and Correlation.Discussed Residual Analysis.Addressed Measuring Autocorrelation.
41 Chapter Summary Described Inference about the Slope. (continued)Described Inference about the Slope.Discussed Correlation—Measuring the Strength of the Association.Discussed Pitfalls in Regression and Ethical Issues.