Wk5 LecNotes Regression and Forecasting(1)

Embed Size (px)

Citation preview

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    1/30

    Forecasting1

    Regression and Forecasting

    Prof Narayan Janakiraman

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    2/30

    Forecasting2

    Forecasting Techniques

    Markets

    Products

    Existing

    Existing

    New

    New

    Time Series AnalysisRegression Analysis

    Delphi Technique

    Diffusion ModelsCustomer Survey

    Sales Force Composite

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    3/30

    Forecasting3

    For existing companies the need is to determinehow much of the current product they are likely to

    sell..

    Markets

    Products

    Existing

    Existing

    Time Series AnalysisRegression Analysis

    New

    New

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    4/30

    Forecasting4

    Time Series

    Simplest Method is EXTRAPOLATION

    Time

    Volume

    of Sales

    PresentPast Future

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    5/30

    Forecasting5

    Typical Time Series Data

    Set of evenly spaced numerical data Obtained by observing response

    variable at regular time periods

    Forecast based only on past values Assumes that factors influencing

    past and present will continueinfluence in future

    Year Sales

    1996 37

    1997 40

    1998 41

    1999 372000 45

    2001 50

    2002 43

    2003 47

    2004 56

    2005 52

    2006 55

    2007 54

    2008

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    6/30

    Forecasting6

    What would a plot of the data tell you?

    Year Sales

    1996 37

    1997 40

    1998 411999 37

    2000 45

    2001 50

    2002 43

    2003 472004 56

    2005 52

    2006 55

    2007 54

    2008

    Chart Title

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    7/30Forecasting7

    Plot data and connect the dots

    Year Sales

    1996 37

    1997 40

    1998 41

    1999 37

    2000 45

    2001 50

    2002 43

    2003 472004 56

    2005 52

    2006 55

    2007 54

    2008

    Chart Title

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    8/30

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    9/30Forecasting9

    Lets try moving averages, lag functions

    Chart TitleYear Sales 3 year

    1996 37

    1997 40

    1998 41 39.331999 37 39.33

    2000 45 41.00

    2001 50 44.00

    2002 43 46.00

    2003 47 46.672004 56 48.67

    2005 52 51.67

    2006 55 54.3

    2007 54 53.7

    2008

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    10/30Forecasting10

    Weighted Average

    Weighted Avg'Period Year Sales

    1 1996 372 1997 40

    3 1998 41 39.9

    4 1999 37 38.8

    5 2000 45 41.8

    6 2001 50 45.9

    7 2002 43 45.5

    8 2003 47 46.4

    9 2004 56 50.7

    10 2005 52 52.2

    11 2006 55 54.3

    12 2007 54 53.9

    13 2008

    Moving Average weights all previousdata equally

    What would happen if you differentiallyweighted the data?

    t-1 0.5

    t-2 0.3

    t-3 0.2

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    11/30Forecasting11

    Exponential Smoothing

    Sophisticated weighted average

    Forecast =

    last period forecast + alpha * (last perioddemand - last period's forecast)

    ExpSmoothYear Sales

    1996 37 37

    1997 40 37.01998 41 39.7

    1999 37 40.9

    2000 45 37.4

    2001 50 44.2

    2002 43 49.4

    2003 47 43.6

    2004 56 46.7

    2005 52 55.1

    2006 55 52.3

    2007 54 54.7

    2008 54.1

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    12/30Forecasting12

    12

    Exponential Smoothing Tool

    The image part with relationship ID rId3 was not found in the file.

    Single-parameter exponential smoothing is easy with Excels ToolPak.

    Click on Tools on the menu bar, select the Data Analysis option, and then

    in the Data Analysis dialog box, click on Exponential Smoothing.

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    13/30

    Forecasting1313

    Single-ParameterExponential Smoothing (Figure 7-4 )

    The image part with relationship ID rId3 was not found in the file.

    12

    3

    4

    5

    6

    7

    8

    9

    10

    1112

    13

    14

    15

    16

    17

    18

    19

    20

    2122

    23

    24

    25

    26

    27

    28

    29

    30

    31

    A B C D E F

    = 0.2

    Period Actual Forecast

    Month t Sales, Yt Sales, Ft

    January 2000 1 4,890

    February 2 4,910 4890.0

    March 3 4,970 4894.0

    April 4 5,010 4909.2

    May 5 5,060 4929.4

    June 6 5,100 4955.5July 7 5,050 4984.4

    August 8 5,170 4997.5

    September 9 5,180 5032.0

    October 10 5,240 5061.6

    November 11 5,220 5097.3

    December 12 5,280 5121.8

    January 2001 13 5,330 5153.5

    February 14 5,380 5188.8

    March 15 5,440 5227.0

    April 16 5,460 5269.6May 17 5,520 5307.7

    June 18 5,490 5350.2

    July 19 5,550 5378.1

    August 20 5,600 5412.5

    September 21 5450.0

    MSE = 24,254

    Forecast of Blitz Beer Sales by Single-Parameter Smoothing

    28

    D

    =SUMXMY2(D7:D25,E7:E25)/COUNT(E7:E25)

    1. Enter the

    smoothingconstant in D2.

    2. Enterproblem

    information inrange. NoticeD26 does not

    have a valuebecause it is to

    be forecast.

    3. Click on Tool,Data Analysis,

    and the

    ExponentialSmoothing to

    get theExponentialSmoothingdialog boxshown next.

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    14/30

    Forecasting1414

    Exponential Smoothing DialogBox

    1. In the InputRange line enterthe range of thedata. The result

    shown is $D$6:$D$25

    2. Enter theDamping factor.

    It is 1 - .

    3. In the OutputRange enter thelocation of the

    results.

    4. Click the OK button to get the

    results shown previously in Figure 7-4.

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    15/30

    Forecasting15

    Forecast usingRegression Models

    Regression

    Models

    LinearNon-

    Linear

    2+ ExplanatoryVariables

    Simple

    Non-Linear

    Multiple

    Linear

    1 ExplanatoryVariable

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    16/30

    Forecasting16

    Linear Regression

    ( )( )

    =

    XXX

    YXXYb

    2

    Identifydependent (y) andindependent (x) variables

    Develop your equation for thetrend line

    Y = a + bX

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    17/30

    Forecasting17

    Interpretation of Coefficients

    Slope (b) Estimated Ychanges by b for each 1 unit increase in X Ifb = 2, then sales (Y) is expected to increase by 2 for each 1 unit increase in

    advertising (X)

    Y-intercept (a) Average value ofYwhen X= 0 Ifa = 4, then average sales (Y) is expected to be 4 when advertising (X) is 0

    17

    Y = a+ bX

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    18/30

    Forecasting18

    Regression is to understandrelationships

    b< 0b > 0Y

    X

    Y

    X

    E(Y) = a + bXi

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    19/30

    Forecasting19

    A maker of golf shirts has been tracking sales andadvertising dollars.

    Predict sales for $53,000 advertising

    Y = 92.9 +1.15X

    Sales $ (Y) Adv.$(X)

    1 130 32

    2 151 52

    3 150 50

    4 158 55

    5 ? 53

    Y5 = 92.9+1.15 53( ) =153.85

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    20/30

    Forecasting2020

    Regression

    Regression is easy with Excels Regression Tool. Click on

    Tools on the menu bar, select the Data Analysis option, and

    then in the Data Analysis dialog box select Regression. This

    yields the Regression dialog box shown next.

    3 Click on the1 In the Input Y

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    21/30

    Forecasting2121

    Regression Dialog Box

    3. Click on theOK button to getthe Regression

    Summary Outputshown next.

    2. In the Input XRange line enterthe range of the

    X data. The

    result hereshown is $B

    $7:$B$16

    1. In the Input YRange line enter therange of the Y data.

    The result shownhere is $C$7:$C$16

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    22/30

    Forecasting2222

    Excels Regression Tool

    1

    2

    3

    4

    5

    6

    7

    8

    9

    1011

    12

    13

    14

    15

    16

    A B C D E F G

    Fitting Trend Line to BriDent Toothpaste Sales Using Regression

    Year in Unit

    Transformed Sales

    Units (thousands)

    Year X Y

    1992 0 72.9

    1993 1 74.4

    1994 2 75.9

    1995 3 77.91996 4 78.6

    1997 5 79.1

    1998 6 81.7

    1999 7 84.4

    2000 8 85.9

    2001 9 84.8

    SUMMARY OUTPUT

    Regression Statist ics

    Multiple R 0.98

    R Square 0.96

    Adjusted R Square 0.96

    Standard Er ror 0.90

    Observat ions 10

    ANOVA

    df SS MS F Significance F Regression 1 177.47 177.47 219.86 0.00

    Resi dual 8 6.46 0.81

    Total 9 183.92

    Coeff ic ients Standard Er ror t Stat

    Inter cept 72.96 0.53 138.17

    X 1.47 0.10 14.83

    The slope and intercept are read from E15:E16 and yield the

    regression equation below. The multiple R, R squared, adjusted R,

    standard error, and F and t statistics are shown also.

    XY 47.196..72 +=

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    23/30

    Forecasting23

    What if you had data like this?

    Y

    X1

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    24/30

    Forecasting24

    Second-Order Model

    E(Y) = a + bX1i+ cX

    1i

    2

    Linear

    effect

    Curvilinear

    effect

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    25/30

    Forecasting25

    Second-Order Model Worksheet

    Case, i Yi X1i X1i2

    1 1 1 1

    2 4 8 643 1 3 9

    4 3 5 25

    : : : :

    Create X12 column.

    Run regression with Y,X1,X12.

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    26/30

    Forecasting26

    Non Linear Regression

    26

    5

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    27/30

    Forecasting27

    Multiple Regression Example: Toy Manufacturer Sales Hypothesis How is weekly toy sales affected by

    changes in levels of advertising, the use of sales reps vs. agents for calling on retailers, and local school enrollments?

    Toy Sales = Advertising(X1)+ sales rep/agent(X2)+ school enrollment(X3) + eTo do this, we need to dummy code: sales rep = 1 or agent = 0.

    Y = 102.18 + 3.87X1 + 115.2X2 + 6.73X3

    So what does this mean?

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    28/30

    Forecasting2828

    Multiple Regression

    12

    3

    4

    5

    6

    7

    8

    9

    10

    11

    1213

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    2425

    26

    27

    28

    29

    30

    31

    32

    33

    34

    3536

    A B C D E F G

    Monthly

    Monthly Floorspace Advertising

    Sales (square feet) Expenditure

    Store Y X1 X2

    1 20,100 3,050 350

    2 14,900 1,300 980

    3 16,800 1,890 830

    4 9,100 1,750 760

    5 15,500 1,010 930

    6 26,700 2,690 7707 34,600 4,210 440

    8 7,200 1,950 570

    9 21,800 2,830 310

    10 23,400 2,030 920

    SUMMARY OUTPUT

    Regression Statistics

    Multiple R 0.89332611

    R Square 0.798031538

    Adjusted R Sq 0.740326264

    Standard Error 4168.371133Observations 10

    ANOVA

    df SS MS F Significance F

    Regression 2 480581774.7 240290887.3 13.8294383 0.003702478

    Residual 7 121627225.3 17375317.9

    Total 9 602209000

    Coefficients Standard Error t Stat P-value Lower 95% Upper 95%

    Intercept -22979 10546.50 -2.18 0.07 -47917.10 1959.87

    X1 11.42 2.29 4.98 0.00 5.99 16.84X2 23.41 8.64 2.71 0.03 2.99 43.84

    Multiple Regression for the Deuce Hardware Store Excelsregression toolcan be used to

    do multipleregression. Just

    list ALL the X

    variables whendesignating theInput X Range;C7:D16 in this

    example.

    21 41.2342.11979,22 XXY ++

    =

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    29/30

    Forecasting29Advanced Marketing BiMBA 2006

    Model-based forecasting methods

    Regression with other factors Sales = a intercept + b (advertising) + c (price) Develop model on half of past data Test model on other half of data

  • 7/28/2019 Wk5 LecNotes Regression and Forecasting(1)

    30/30

    F ti 30

    PROS AND CONS?

    Markets

    Products

    Existing

    Existing

    Time Series AnalysisRegression Analysis

    New

    New