Docsity

1 Simple and Multiple Regression Analysis 1. Prepare a ..., Schemes and Mind Maps of Business

Toggle sidebar
bg1
1
Simple and Multiple Regression Analysis
Example: Explore the relationships among Month, Adv.$ and Sales $:
1. Prepare a scatter plot of these data. The scatter plots for Adv.$ versus Sales, and Month versus
Sales are given in the Figures below with Excel@ Insert/Scatter.
a. Do the data appear to be stationary or nonstationary? The data appear to be
nonstationary, it is not random, but with clear linear trend upward.
b. Do the data appear to have a trend? Yes, the data have clear up trend, that is as the
Adv.$ or Month increase, the Sales increase as well.
c. If we want to fit a straight line to the data, how many lines could we possibly fit? We can
fit infinite number of straight lines to the data. Each line is represented with a different
set of b0 (Y intercept), b1 (Slope for Month) and b2 (Slope for Adv.$) for this case.
d. Compute the coefficient of correlation r between Month, Adv.$ and Sales, respectively,
with =CORREL(Array1,Array2) and interpret the meanings. r(Adv versus Sales) = 0.901
and r(Month versus Sales) = 0.9722 indicate strong positive correlation between the Adv
and Sales, and Month and Sales, respectably.
(Regression.xls/Reg0)
2. What is the general linear model to be used to model linear trend? (Write out the model)
=+++ or
= +ℎ++
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download 1 Simple and Multiple Regression Analysis 1. Prepare a ... and more Schemes and Mind Maps Business in PDF only on Docsity!

Simple and Multiple Regression Analysis

Example: Explore the relationships among Month, Adv.$ and Sales $:

  1. Prepare a scatter plot of these data. The scatter plots for Adv.$ versus Sales, and Month versus Sales are given in the Figures below with Excel@ Insert/Scatter. a. Do the data appear to be stationary or nonstationary? The data appear to be nonstationary, it is not random, but with clear linear trend upward. b. Do the data appear to have a trend? Yes, the data have clear up trend, that is as the Adv.$ or Month increase, the Sales increase as well. c. If we want to fit a straight line to the data, how many lines could we possibly fit? We can fit infinite number of straight lines to the data. Each line is represented with a different set of b 0 (Y intercept), b 1 (Slope for Month) and b 2 (Slope for Adv.$) for this case. d. Compute the coefficient of correlation r between Month, Adv.$ and Sales, respectively, with =CORREL(Array1,Array2) and interpret the meanings. r (Adv versus Sales) = 0. and r (Month versus Sales) = 0.9722 indicate strong positive correlation between the Adv and Sales, and Month and Sales, respectably.

(Regression.xls/Reg0)

  1. What is the general linear model to be used to model linear trend? (Write out the model)

ᡑ〶 = ‐⡨ + ‐⡩ᡐ⡩〶 + ‐⡰ᡐ⡰〶 + –〶 or ᡅᡓᡤᡗᡱ〶 = ‐⡨ + ‐⡩ᠹᡧᡦᡲℎ〶 + ‐⡰ᠧᡖᡴ〶 + –〶

where Yi is the Sales in Month I with the amount of Adv.$ given in Month I , β 0 is the Y intercept, or the Sales at Month =0 and Adv.$ = 0, β 1 is the slope of the regression line drawn with Month as independent variable (X 1 ) and Sales as dependent variable (Y), it shows the marginal change (increase or decrease) in Sales when the variable Month changes one unit (increase or decrease) while keep no change for all of other variables, β 2 is the slope of the regression line drawn with Adv$ as independent variable (X 2 ) and Sales as dependent variable (Y), it shows the marginal change (increase or decrease) in Sales (Y) when the amount of the variable Adv$ (X 2 ) incrementally changes (increases or decreases ONE unit) while keep no change for all of other variables.

  1. Use FIVE possible ways in Excel@ to find b 0 , b 1 and b 2 in the linear regression model for Adv, Month and Sales data set, and predict Sales in Months 11 to 13. a. Use Excel@ Solver to Minimize ESS or SSE in order to get optimal values of b0, b 1 and b 2. 1) to assign arbitrary values for b 0 , b 1 and b 2 first, 2) compute Sales = b 0 + b 1 (Month) +b 2 (Adv), 3) compute SSE with =SUMXMY2(SalesRange,FcstRagne), 4) use Excel@ Solver to minimize SSE to get the optimal values of b0, b 1 and b 2.

(Regression.xls/Reg1)

Use Excel@ Solver to get optimal values of b0, b 1 and b 2 that will minimize SSE Objective Function: SSE Changing Cells: I5:I

e. Click any data point on the scatter plots for Month and Sales, or Adv and Sales, select Add Trendline / Display equations & Display R-Squared value on the charts. The Y and Xs are renamed to Month, Adv and Sales, respectively, for the regression lines.

  1. What are the values of b 0 , b 1 , and b 2 , and what is the estimated regression function? The values of b 0 , b 1 , and b 2 are 120.7428, 135.8275 and -6.862, respectively as given in the Table above.
  2. What are the meaning of b 0 , b 1 , and b 2? When in Month=0, and Adv=0, the Sales = b 0 =$120.7428, b 1 =$135.8275 shows the marginal change (increase or decrease) of $135.8275 in Sales when the variable Month changes one unit (increase or decrease) while keep no change for Adv., b 2 = –6.862 shows the marginal change (decrease or increase) of –$6.862 in Sales (Y) when the amount of the variable Adv$ (X 2 ) incrementally changes (increases or decreases ONE unit) while keep no change for Month.
  3. Use Excel@ =RSQ(Array Y,Array X) to compute the coefficient of Determination R^2 of the regression line for the data, and interpret the meaning of R^2 for the data?

(Regression.xls/Reg1) For the regression line for Month versus Sales, R^2 = 94.5% means 94.5% of the total variations in Sales are counted for or explained and 5.5% of the total variations are not counted for or not explained by the regression line between Month and Sales. For the regression line for Adv versus Sales, R^2 = 81.18% means 81.18% of the total variations in Sales are counted for or explained and 18.82%% of the total variations are not counted for or not explained by the regression line between the Adv and Sales.

  1. For the Summary Table from Data/Data Analysis, answer the following questions: a. R^2 , Adjusted R^2 , Number of Observations, b 0 , b 1 , p-value for b 0 , p-value for b 1. The values are as labeled in the above table from Regression.xls/Reg1SO. b. Use the p-value approach to test the population parameters β 0 , β 1 and β 2 with the p-values from the Summary Output of Data Analysis/Regression, and state your conclusion. Assume the significance coefficient α = 0.05.

(Regression.xls/Reg1SOa) Hypothesis Test for β 0 : i. What are the H 0 and H 1? H 0 : β 0 = 0 and H 1 : β 0 ≠ 0 ii. What are the decision rules? Decision Rules with p-value Approach: If p-value ≥ α (significance coefficient), then conclude H 0 or β 0 = 0; Otherwise, if p-value < α, then conclude Ha, or β 0 ≠0. iii. What is the conclusion? The p-value for β 0 = 0.082 as given in the Summary Output, it is greater than α = 0.05, therefore, we conclude H 0 : β 0 = 0 or fail to reject H 0 , i.e., we should not include the Y intercept term in the regression model for Sales.

Hypothesis Test for β 1 (Month): i. What are the H 0 and H 1? H 0 : β 1 = 0 and H 1 : β 1 ≠ 0 ii. What are the decision rules? Decision Rules with p-value Approach: If p-value ≥ α (significance coefficient), then conclude H 0 or β 1 = 0; Otherwise, if p-value < α, then conclude Ha, or β 1 ≠0. iii. What is the conclusion? The p-value for β 1 = 0.001 as given in the Summary Output, it is less than α = 0.05, therefore, we conclude H 1 : β 1 ≠0 or reject reject H 0 , i.e., we should include the variable Month in the regression model for Sales.

Hypothesis Test for β 2 (Adv): i. What are the H 0 and H 1? H 0 : β 2 = 0 and H 1 : β 2 ≠ 0 ii. What are the decision rules? Decision Rules with p-value Approach: If p-value ≥ α (significance coefficient), then conclude H 0 or β 2 = 0; Otherwise, if p-value < α, then conclude Ha, or β 2 ≠0. iii. What is the conclusion? The p-value for β 2 = 0.105 as given in the Summary Output, it is greater than α = 0.05, therefore, we conclude H 0 : β 0 = 0 or fail to reject H 0 , i.e., we should not include the variable Adv in the regression model for Sales.

Therefore the final regression model for Sales becomes: Sales = b 1 (Month). We have to go through additional procedures below to find out the value of b 1 when the Y intercept b 0 is zero.

For reference: Decision Rules with Confidence Interval Approach: If the given CI spans zero (with zero as part of CI), conclude H 0 Otherwise, if the given CI does not span zero, then conclude Ha

  1. What are the forecasts for the next two years (11 to 12) with the regression line? Because the hypothesis tests reveal only β 1 is significant and should be included in the model, we further run the models with Adv only and Month only with the results in the following two tables.

(Regression.xls/Reg1SOb)

(Regression.xls/Reg1SOc)

b. Use Excel@ =TREND(Y-RANGE,X-RANGE,X-VALUE)

(Regression.xls/Reg1)

c. What is the assumption you made when you develop forecasts for the next two years? The crucial assumption made for using linear regression is that the linear trend for Sales is going to continue in Months 11 and 12 with the b 2 = 96.3974. Thus any forecasts made outside out the original ranges of independent variable Xs in the historical data may not be valid.

  1. What is the difference between standard error (Se) and the standard prediction error (Sp)?

Standard Error of Estimate (ᡅ〦〥 ᡧᡰ Se):

= 㒖^

Se measures the variation of the actual data around the estimated regression line, where k is the number of independent variables in the model.

Standard prediction error (Sp): thus the Sp is always larger than Se.

(1–α)% Prediction Interval for individual response Y:

ᡑ㕒〶〵 = ᡔ⡨ + ᡔ⡩ᡐ〶〵 and ᡑ㕒〶〵 ± ᡲ(⡩⡹㌨ ㄘ;ぁ⡹⡰)

(Regression.xls/Reg1SOd)

The following results are in Regsssion.xls/Reg2.

  1. What is the margin of error for an approximate 95% prediction interval individual response for Month=11? The margin of prediction error for Month=11 is 252.
  2. What is the 95% mean prediction interval for Month=11?

939.603 Lw Lmt of 95% Mean Pred CI for Month= 1181.140 Up Lmt of 95% Mean Pred CI for Month=

  1. What is the 95% prediction intervals individual response for the Month = 11?

807.391 Lw Lmt of 95% Pred CI for Month= 1313.352 Up Lmt of 95% Pred CI for Month=

867.577 Appro Lw Lmt of 95% Pred CI for Month = 11 1253.17 Appro Up Lmt of 95% Pred CI for Month = 11

Topics to be covered:

  1. Regression as a method in business analytics ᡑ = ᡘ(ᡐ⡩, ᡐ⡰, ᜐ , ᡐ〸) + – a. Simple Linear Regression (SLP) ᡑ = ᡘ(ᡐ) + – or ᡑ〶 = ‐⡨ + ‐⡩ᡐ〶 + –〶 and ᡔ⡨ and ᡔ⡩as estimates for ‐⡨, ᡓᡦᡖ ‐⡩ ᡑ㕒〶 = ᡔ⡨ + ᡔ⡩ᡐ〶 to min ᠱᡅᡅ = ∑^ ぁ〶⢀⡩( ᡑ〶 − ᡑ㕒〶 )⡰^ = ∑^ ぁ〶⢀⡩䙰 ᡑ〶 − (ᡔ⡨ + ᡔ⡩ᡐ〶 )䙱⡰^ and the method of least squares b. Simple Linear Regression with Time as Independent Variable ᡑ = ᡘ(ᡆ) + ‵ or ᡑ〶 = ‐⡨ + ‐⡩ᡆ〶 + –〶 c. Multiple Regression ᡑ = ᡘ(ᡐ⡩, ᡐ⡰, ᜐ , ᡐ〸) + –, where f(.) describes systematic variations and ε describers unsystematic variations of the system.
  2. Assumptions for Regression
  1. Using Excel@ to do Regression analysis

ᡑ㕒 = ᡔ⡨ + ᡔ⡩ᡐ ᡑ㍤^ • ᡐ〶 ᡑ〶 − ᡑ㍤^ ᡑ〶 − ᡑ㕒〶 ᡑ㕒〶 ᡑ㕒〶 − ᡑ㍤

Decomposition of the Total Error: ᡑ〶 − ᡑ㍤ = (ᡑ〶 − ᡑ㕒〶 ) + (ᡑ㕒〶 − ᡑ㍤)

ぁ

〶⢀⡩

ぁ

〶⢀⡩

− ᡑ㕒〶 )⡰^ + 㔳(ᡑ㕒〶

ぁ

〶⢀⡩

TSS = ESS + RSS

Or Total Sum of Squared Errors (TSS) = Error Sum of Squares (ESS) + Regression Sum of Squares (RSS)

ᡄ⡰^ = 〙〠〠〡〠〠 = 1 − 〆〠〠〡〠〠, and 0 ≤ R^2 ≤ 1

R^2 refers to the percentage of the total variation of Y around its mean that is explained or counted for by the estimated regression line or how well the regression line fits the data. 1-R^2 is the percentage of the total variation of Y around its mean that is unexplained or uncounted for by the regression line.

Equations to compute b 0 and b 1 :

䙰∑^ ぁ〶⢀⡩ ᡐ〶䙱䙰∑^ ぁ〶⢀⡩ ᡑ〶䙱

ぁ 〶⢀⡩

∑ ぁ〶⢀⡩ ᡐ〶⡰−

⡰

ᡦ

ᡔ⡨ = ᡑ㍤ − ᡔ⡩ᡐ㍤

Statistical Tests for β 0 , β 1 , ᜐ, βk with F-Statistic, p-value and t-statistic:

  • How to get the regression line in Excel@? o =INTERCEPT(Y-RANGE,X-RANGE) and =SLOPE(Y-RANGE,X-RANGE) o =TREND(Y-RANGE,X-RANGE,X-VALUE) o In Excel@ Data/Data Analysis/Regression o In Excel@, insert/scatter plot, Click any data points in the scatter plot, select Add Trendline / Display equations & Display R-Squared value on chart o Use Excel Solver to Minimize ESS

What are the meanings of the slope(β 1 , … βn) and the intercept(β 0 )? Meanings of b 0 and b 1 : o b 0 is the intercept or Y value as X = 0 (e.g. Fixed cost) o b 1 is the slope or marginal change in Y with unit change in X o b 1 is similar to the slope. However, since it is calculated with the variability of the data in mind, its formulation is not as straight-forward as our usual notion of slope.

  • How to statistically test whither β 0 , β 1 , … βn equals zero (in the Null Hypothesis H 0 )? o Use the p-value approach because p-values will be in Summary Output. Decision Rule is: if p-value is less than α value (Type I error, not the one in Exponential smoothing forecasting), then conclude β 0 , β 1 , … βn not equal to zero. o Only include b 0 , b 1 , …, bn in the equation if β 0 , β 1 , … βn not equal to zero. Exclude the zero ones
  • How to interpret R^2? Percentage of total variations explained by the regression line. (1-R2) is the percentage of total variations not explained by the regression line.
  • How to develop forecasts with given b 0 , b 1 , …, bn? o ᡑ㕒〶〵 = ᡔ⡨ + ᡔ⡩ᡐ〶〵 + ᡔ⡰ᡐ〶ぉ for each value of X and could be X 1 , X 2 , …, and Xn.

o Predictions made using an estimated regression function may have little or no validity for values of the independent variables that are substantially different from those represented in the sample. o Avoid multicollinearity when more than one independent variables are in the model.

  • How to estimate the prediction confidence intervals? o The approximate prediction confidence interval, ᡑ㕒〶 ± 2 ᡅ〲, where Se is the standard error given in the Summary Output beneath the Adjusted R^2. o The prediction confidence interval for the mean response is given by ᡑ㕒〶 ± ᡲ ᡅ〲ᡕᡧᡦᡱᡲ o The prediction confidence interval for individual response is given by ᡑ㕒〶 ± ᡲ ᡅぃ, where Sp is the standard prediction error and Sp is always larger than Se.
  • How to develop forecasting with Trend, Seasonal and Random components with the multiplicative model Y = T.S.I? o Use regression or centered moving average to take out the trend component – deTrend o Use S.I = Y/T to get the percentage of Trend o Compute Seasonal Relatives by average the percentages of Trend in the same season o Adjust the Seasonal Relatives to the whole number (Quarterly seasonality in a year will be 4, Weekly seasonality will be 7, etc.) to get the Seasonal Index. o Attached the Seasonal Index to each season o Develop the trend forecast with regression or other methods o Use the Seasonal Index to multiply the previous forecasts to develop the final seasonally adjusted forecast.