Вы находитесь на странице: 1из 85

Topic 2

Forecasting

1
What is Forecasting?

2
Forecast

• It involves structured planning activities

• Planning requires data pertaining to the feature

• Forecast: A statement about the future


– Not necessarily numerical
• Weather forecasts

3
Sale forecast

• Is forecast technique from potential customer


for certain time with some assumption.
• Technique of sale forecast :
a. qualitative technique
b. quantitative technique
c. forecast with special method

4
Uses of Forecasts

Accounting Cost/profit estimates

Finance Cash flow and funding

Human Resources Hiring/recruiting/training

Marketing Pricing, promotion, strategy

MIS IT/IS systems, services

Operations Schedules, MRP, workloads

Product/service design New products and services

5
I see that you will
REMARKS get an A this
semester.

• Assume a causal system


– Future resembles the past
• Forecasts rarely perfect because of randomness
• Forecasts more accurate for groups vs. individuals.
• Forecast accuracy decreases as time horizon for
forecasts increases
• Ex. I can forecast this year’s class average better
than next year’s class average

6
Elements of a Good Forecast

Timely

Reliable Accurate

Written

7
How do we Forecast?

8
Steps in the Forecasting Process

“The forecast”

Step 6 Monitor the forecast


Step 5 Prepare the forecast
Step 4 Gather and analyze data
Step 3 Select a forecasting technique
Step 2 Establish a time horizon
Step 1 Determine purpose of forecast

9
quantitative forecasting step:

• relevant data collecting


• analyze data pattern (trend, seasonal,
stationary, cyclic) with:
a. Scattergraph
b. Otocorelation analyze
• forecasting method election appropriate with
existing data pattern.
• forecasting error level calculation

10
Types of Forecasts
• Judgmental - subjective analysis

• Associative models - uses explanatory


variables to predict the future

• Time series - uses historical data assuming the


future will be like the past

• Special Method

11
Judgmental Forecasts

• Executive opinions (long-range planning)


– There are factors hard to quantify
• Sales force composite
– Retailer forecasts for the manufacturer
• Consumer surveys
– The guy at the mall who asks if you like cherry flavor in
your shampoo
• Outside opinion
– Financial and consulting gurus and companies
• Opinions of managers and staff
12
Quantitative Forecasting Methods
Quantitative
Forecasting

Time Series Associative


Forecasting Models

Naïve Averaging Trend Seasonality  Linear regression


 Multiple regression

 Moving Average  Trend Least Square  Additive


 Weighted Moving Trend Moment method  Multiplicative
Average
Trend Semi Average
 Exponential Method
smoothing
13
Associative Forecasting

14
Associative Forecasting

• Based on identification of related variables that can be used


to predict values of the variable of interest.
– Sales of mountain bikes in an area may be related to the percentage
of the young population living in that area.
– Sales of Harley-Davidson motorbikes is related to mid-aged men
population. Average age of H-D owners is 46.
– Ice cream sales can be related to temperature
– Home depot bases sales forecasts on mortgage refinancing rates,
smaller rates imply higher sales.
– Changes in Federal Reserve Board’s interest rate leads to certain
business activities
• House sales
• Industrial investments
– Increase in energy cost leads to price increases in products and
services
15
Associative Forecasting

• Find an association between the predictor and the


predicted
• Predictor variables - used to predict values of variable
interest, sometimes called independent variables
• Predicted variable - Dependent variable
• Regression - technique for fitting a line to a set of
points
• Linear regression is the most widely used form of
regression
– The objective is to obtain an equation of a straight line (least square line)
that minimizes the sum of squared vertical deviations of data points from
the line. 16
17
Linear Regression (cont.)

y = a + bx
Where
y = predicted (dependent) variable
x = predictor (independent) variable
b = slope of the line
a = value of y when x = 0 (the height of line
at the y intercept)

18
Computing a and b

Given n data points, find the intercept a and the slope b to


Minimize the sum of squared errors 
Minimize the sum of deviations from the line 
n
Minimize  t
( y
t 1
 a  bx t ) 2

n n n
n xt yt   xt  yt
n n

y t x t
b t 1 t 1 t 1
2 a t 1
b t 1
n
 n
 n n
n xt    xt 
2

t 1  t 1 
19
Linear Model Seems Reasonable
x y xy x2 y2
7 15 105 49 225 Computed
2 10 20 4 100
6 13 78 36 169 relationship
4 15 60 16 225
14 25 350 196 625 50

15 27 405 225 729 40


16 24 384 256 576 30
12 20 240 144 400 20
14 27 378 196 729
10
20 44 880 400 1936
0
15 34 510 225 1156 0 5 10 15 20 25

7 17 119 49 289
132 271 3529 1796 7159

12  3529  132  271 A straight line is fitted to a set


b  1.593
12 1796  132 2
of sample points.
271  1.593 132
a  5.06
12 20
Another Linear Regression Example
Variables: Weeks and Sales
t y
2
Week t Sales ty
1 1 150 150
2 4 157 314
3 9 162 486
4 16 166 664
5 25 177 885

 t = 15 t = 55  y = 812  ty = 2499


2
2
(t) = 225

21
Linear Trend Calculation

5 (2499) - 15(812) 12495-12180


b = = = 6.3
5(55) - 225 275 -225

812 - 6.3(15)
a = = 143.5
5

y = 143.5 + 6.3 t
Sales in week t = 143.5 + 6.3 t
22
Linear Regression
Remember from Statistics

• Correlation (r) between variables: The strength and


direction of relationships between two variables
– 1.00 means changes in one variable are always matched
by changes in the other
– A correlation close to zero means little linear relationship
– The square of the correlation coefficient provides a
measure of the percentage of variability in the values of y
that is explained by the independent variable.(80% or
more: the independent variable is a good predictor of the
values of dependent variable)

23
Time Series Data

24
Time series

• Time-ordered sequence of observations taken at regular


intervals over a period of time
• Future values of the series can be estimated from past values.

Types of Variations in Time Series Data


• Trend - long-term movement in data
• Seasonality - short-term regular variations in data
• Cycles – wavelike variations of long-term
• Irregular variations - caused by unusual circumstances
• Random variations - caused by chance

25
Forecast Variations

Irregular
variation
Figure 3-1
Trend

Cyclical
Cycles

Year 01
00
99
Seasonal variations

26
Time Series Data
- Naïve Method

27
Naïve Forecast
Uh, give me a minute....
We sold 250 wheels last
week.... Now, next week we
should sell....

The forecast for any period


=
The previous period’s actual value.

28
Naïve Forecasts
• Uses a single previous value of a time series as the basis
of a forecast.
• Virtually no cost
• Data analysis is nonexistent
• Easily understandable
• Cannot provide high accuracy
– If it were true, future will always be the same as the past

Some notation: Forecast at time t is F(t)


Actual observation at time t is A(t)
Today’s temperature is 98 F, A(Today)=98
F(Tomorrow)=98
F(Day after)=98
29
Example 1: Naïve Forecasts
• Forecast for period i is the actual value for period
i-1: Fi = Ai-1.
Period i Actual Forecast
Demand
1 42
2 40
3 43
4 40
5 41
6 39
7 46
8 44
9 45
10 38
11 40
12 - 30
Solution to Example 1

Period i Actual Demand Forecast


1 42 -
2 40 42
3 43 40
4 40 43
5 41 40
6 39 41
7 46 39
8 44 46
9 45 44
10 38 45
11 40 38
12 - 40

31
Time Series Data
- Averaging

32
Techniques for Averaging

• Moving averages (MA)


– Naïve methods just trace the actual data with a lag of
one period, F(t)=A(t-1)
– They don’t smooth
– MA uses a number of the most recent actual data to
smooth
• Weighted moving averages

• Exponential smoothing
33
Moving Average
• Moving average – A technique that
averages a number of recent actual values,
updated as new values become available.
n

 Ai
Ft = MAn = i=1

Where n
i = an index that corresponds to periods.
n = Number of periods (data points) in the moving
average period.
Ai = Actual value in period i.
MAn = Forecast based on most-recent n periods.
Ft = Forecast for time period t.
34
Example 2: Moving Average

• Find moving average with n = 5.


Period i Actual Demand Forecast
1 42
2 40
3 43
4 40
5 41
6 39
7 46
8 44
9 45
10 38
11 40
12 -
35
Solution to Example 2
• Start from F6 (forecast for period 6).
Period Actual Forecas
i Demand t
1 42 -
2 40 -
3 43 -
4 40 - 43+40+41+39+46
5 41 - =
5
6 39 41.2
7 46 40.6
8 44 41.8
9 45 42.0
10 38 43.0
11 40 42.4 46+44+45+38+40
=
12 - 42.6 5
36
Smooth and Lag

37
Weighted moving average

Moving Average
• Advantage=Easy to compute and easy to
understand
• Disadvantage=All values in the average are
weighted equally

Weighted Moving Average


• Similar to moving average
• It assigns more weight to the most recent values in
a time series
– Idea: most recent observations must be better indicators
of the future than older observations

38
Example 3: Weighted Moving Average
• Find weighted moving average using
Fi =0.4Ai-1 + 0.3Ai-2 + 0.2Ai-3 + 0.1Ai-4.
Period i Actual Demand Forecast
1 42
2 40
3 43
4 40
5 41
6 39
7 46
8 44
9 45
10 38
11 40
12 - 39
Solution to Example 3
• Start from F5 (forecast for period 5).
Period i Actual Forecast
Demand
1 42 -
2 40 -
3 43 -
4 40 -
5 41 41.1 = 0.1(42)+.2(40)+.3(43)+.4(40)
6 39 41.0
7 46 40.2
8 44 42.3
9 45 43.3
10 38 44.3
= 0.1(39)+.2(46)+.3(44)+.4(45)
11 40 42.1
12 - 40.8
40
Shown solutions of Example 1, 2, and 3
48

46

44

42

40

38

36
Observed
34 MA
32 WMA

30
1 2 3 4 5 6 7 8 9 10 11 12

41
Exponential Smoothing
• Current forecast = Previous forecast + α(Actual
- Previous forecast)

Ft = Ft-1 + (At-1 - Ft-1)


where
Ft = Forecast for period t
Ft-1 = Forecast for period t-1
α = Smoothing constant
At-1 =Actual demand or sales for period t-1

42
Example 4: Exponential Smoothing
Period (t) Actual (At) Ft (α = 0.1) Error (A-F) Ft ( α = 0.4) Error (A-F)
1 42
2 40
3 43
4 40
5 41
6 39
7 46
8 44
9 45
10 38
11 40
12

43
Solution to Example 4
Ft = Ft-1 + (At-1 - Ft-1) = (1 – )Ft-1 +  At-1
• For example: α = 0.1
• A1 = 42 → F2 = 42 (Naïve)
• A2 = 40 → F3 = F2 + α (A2 - F2)
= 42 + 0 .1 × (40 - 42) = 41.8
• A3 = 43 → F4 = F3 + α (A3 - F3)
= 41.8 + 0 .1 × (43 - 41.8) = 41.92

44
Solution to Example 4 (Cont.)
Ft = Ft-1 + (At-1 - Ft-1)
Period (t) Actual (At) Ft (α = 0.1) Error (A-F) Ft ( α = 0.4) Error (A-F)
1 42
2 40 42 -2.00 42 -2
3 43 41.8 1.20 41.2 1.8
4 40 41.92 -1.92 41.92 -1.92
5 41 41.73 -0.73 41.15 -0.15
6 39 41.66 -2.66 41.09 -2.09
7 46 41.39 4.61 40.25 5.75
8 44 41.85 2.15 42.55 1.45
9 45 42.07 2.93 43.13 1.87
10 38 42.36 -4.36 43.88 -5.88
11 40 41.92 -1.92 41.53 -1.53
12 41.73 40.92

45
Picking a Smoothing Constant α
Actual
50
.4
 .1
45
Demand

40

35
1 2 3 4 5 6 7 8 9 10 11 12

Period
46
Time Series Data
- Trend – Least Square Method

47
Linear Trend Equation (Least Square)
Ft

Ft = a + b t

0 1 2 3 4 5 t

• Ft = Forecast for period t


• t = Specified number of time periods from t = 0
• a = Value of Ft at t = 0
• b = Slope of the line
48
Calculating a and b
n  (xy) -  x y
b = 2 2
n  x - (  x)

 y - b x
a =
n

• n = Number of periods
• y = Value of the time series
• t = Specified number of time periods from t = 0

49
Example 5:
• Calculate sales for a Purwokerto-based firm over
the last 10 weeks are shown in the following table.
Week (x) y xy x2
1 700 700 1
2 724 1448 4
3 720 2160 9
4 728 2912 16
5 740 3700 25
6 742 4452 36
7 758 5306 49
8 750 6000 64
9 770 6930 81
10 775 7750 100
 55 7407 41358 385
50
Solution to Example 5

1. Plot the data, and visually check to see if a


linear trend line would be appropriate.
2. n = 10,  x = 55,  y =7407,  xy = 41358, x2 =
385 - 55(7407) -
b = 10(41358) 413580 407385
= ≈ 7.51
10(385) - 55(55) 3850 - 3025

7407 - 7.51(55)
a = ≈ 699.40
10

y = 699.40 + 7.51x
51
Solution to Example 5 (Cont.)

3. Then determine the equation of the trend


line, and predict sales for weeks 11 and 12.
y11 =699.40 + 7.51(11) = 782.01
y12 =699.40 + 7.51(12) = 789.51

52
Exercise : Calculate sales for a Purwokerto-based firm, the
last 5 years data are shown in the following table
Note : 1. start point early year (2001) as based year

Years (x) Sales y x x2 xY


2001 140 0
2002 148 1
2003 157 2
2004 160 3
2005 169 4
5 774 10

2. Calculate if middle point years as based year !

53
start point as based year

n(XY )  (X ) ( Y )
b
n ( X 2 )  (X ) 2

Y  b (X )
a
n

Ŷt = a + bx

54
middle point as based year
In this case the data is divided into two groups. For amounts
of data:
Even, then its score value of X is ..., -5, -3, -1,1,3,5, ...
Odd, then the value of X of his score is ..., -2, -1,0,1,2, ...

Furthermore, the coefficients a and b searched with the


following formula:

a
 Y
b
 XY
n X 2

Y = a + bx

55
• Coefficient of 'b' shows an increase (if positive)
or decrease (if negative) on the value of the
variable Y per unit of time.
• For data that the number of odd time period,
the value of 'b' indicates the increase / decrease
in the value of 'Y' per period (per year, per
semester, per quarter or per month).
• For a period of time the amount of data is even,
then the value 'b' indicates the increase /
decrease of the value of 'Y' per half period (per
half year, per half of the semester, per quarter
or per half a half months). 56
Time Series Data
-Trend – Moment method
-Semi Average
57
6. Moment Method

Year Y X XY X2

2001 140 0 0 0

2002 148 1 148 1

2003 157 2 314 4

2004 160 3 480 9

2005 169 4 676 16

Total 774 10 1618 30


Coefficient for a dan b:
Y  n.a  b. X
 XY  a. X  b  X 2

n = 5.
I. 774 = 5.a + b(10) ……… 1.548 = 10a + 20b
II. 1.618 =10.a + b(30) ……….. 1.618 = 10a + 30b (-)
-70 = -10b
b=7
Substitution:
b=7 774 = 5a + 10(7)
5a = 774 – 70 = 704
a = 704/5 = 140,8

• So the equation: Y’ = 140,8 + 7x


• sales forecast for 2006 : Y2006 = 140,8 + 7 (5)
7. Semi Average Method

In this method:
1. The data is devided into two groups.
2. Basic year is in the middle of the first group.
3. In each group determine the score for X, semi total, and semi
average.
4. The hint is in the first group. If the first group consist of total
odd numbers, so score x = …-4,-3,-2,-1,0,1,2,3,4….but if the
first group consist of total whole even numbers, score x =
.….-5,-3,-1,1,3,5…..
5. Total score x in the first group has to be nil.
6. Then, score for the second group just continue the
first group*.

*except the odd numbers of total data, where the first


score for second group must repeat the lastest score
from first group.
7. Arrange the equation and forecast Y.
a = average first group.
b = difference first and second group then
devided by the number total data (n).
example: n=6
Sales PT.RADAR year 2005 – 2010
sales (Y)
year in million
unit
2005 140
2006 148
2007 157
2008 157
2009 160
2010 169
calculation:

sales (Y) Semi


year X Semiaverage
in million unit Total

2005 140 -1
2006 148 0 445 445/3=148,33

2007 157 1

2008 157 2
2009 160 3 486 486/3=162

2010 169 4
a = 148,33
b = 162 148,33  4,5567
3

So the equation is:


Y’ = 148,33 + 4,5567 x
Y’2011 = 148,33 + 4,5567(5) =171,11
Y’2012= 148,33 + 4,5567(6) =175,67
Example: data for 8 years
• Seles for product A in AYU company 2004 – 2011

Year Sales (unit)


2004 105
2005 115
2006 120
2007 125
2008 135
2009 150
2010 160
2011 175
calculation:

Year Y X Semitotal Semiaverage


2004 105 -3 465

2005 115 -1 465/4=116,25

2006 120 1

2007 125 3

2008 135 5 620

2009 150 7 620/4=155

2010 160 9

2011 175 11
a = 116,25
b = 155  116,25= 4,84
2( 4)
equation: Y = 116,25 + 4,84 X
Forecst 2012 (X = 13)
Y2012 = 116,25 + 4,84 (13) = 179 unit.
If the trend line will be shown in graph, the data as follow:
Y2004 = 116,25 + 4,84 (-3) = unit.
Y2005 = 116,25 + 4,84 (-1) = unit.
Y2006 = 116,25 + 4,84 (1) = unit.
Y2007 = 116,25 + 4,84 (3) = unit.
Y2008 = 116,25 + 4,84 (5) = unit.
Y2009 = 116,25 + 4,84 (7) = unit.
Y2010 = 116,25 + 4,84 (9) = unit.
Y2011= 116,25 + 4,84 (11) = unit.
Example for 7 years data
sales for MINA company

Year sales (unit)


2001 120
2002 125
2003 130
2004 145
2005 150
2006 160
2007 165
Example sales forecating
semi average method MINA company

Year Y X Semitotal Semiaverage


2001 120 -3 520

2002 125 -1 520/4=130

2003 130 1

2004#) 145 3

2004 145 3 620

2005 150 5 620/4=155

2006 160 7

2007 165 9
• a = 130
• b = 155  130 = 3,125
2( 4)
• Equation trend: Y = 130 + 3,125X
• For 2008 , X = 11
• Y2008 = 130 + 3,125 (11) = 164,375
Determine trend

• In choosing a method, the accuracy is the


measurement.
• Measurement, is how tools for forecasting
accurate for estimating the real.
• Tools used for measure, the smallest
∑(Y – Y’)2
Correlation and Regression Analysis
• It shows correlation one variable to another.
• The aim of this method in forecasting is to estimate base on
relation between variables. Correlation analysis is used to
know correlation one variable to another.
• Regression analysis is used to know the influence
independent variable to dependent variable.
• So, by regression analysis, we know how much changes
variable when other factors influence that variable is
changed.
• coefficient a and b :

n(XY )  (X ) ( Y )
b
n ( X 2 )  (X ) 2

Y  b (X )
a
n
Year X Y XY X2 Y2

2001 9 140 1.260 81 19.600

2002 12 148 1.776 144 21.904

2003 14 157 2.198 196 24.649

2004 15 160 2.400 225 25.600

2005 17 169 2.873 289 28.561

Total 67 774 10.507 935 120.314


• Coefficient a and b:

5(10.507)  (67) (774)


b  3,64
5( 935)  (67) 2

774  3,64 (67)


a  106,02
5

So, Y = 106,02 + 3,64X


Sales Forecast base on industry analysis
Demand industry and sales for lastest 7 years ( thousand Kw)

Year Demand industry Demand company


2009 12000 1200
2010 11000 990
2011 13000 1560
2012 14000 1750
2013 13000 1430
2014 15000 1800
2015 16000 2080
Questions:
a. Determine demand industry for 2016 with Ordinary Least
Square method. (middle point as based year)
b. Determine company’s sales 2016 if company satisfied by
the lastest 3 years market share average.
Forecasting for demand industry

Demand
Year x xy x
industry
2009 12.000 -3 -36.000 9
2010 11.000 -2 -22.000 4
2011 13.000 -1 -13.000 1
2012 14.000 0 0 0
2013 13.000 1 13.000 1
2014 15.000 2 30.000 4
2015 16.000 3 48.000 9
total 94000 0 20.000 28
ΣY ΣXY
a  b
n ΣX 2

calculation :
94.000
a 13.428,57143  13.428.571 kw
7
20.000
b  714,2857143  714.286 kw
28

Y’ = a + bx
Y’= 13.428.571 + 714.286x
forecast for industry’s demand :
Y’2016 = 13.428.571 + 714.286(4) = 16.285.715 kw.
Forecast for company’s sales
If company satisfied with averge market share within the
lastest 3 years:
• 2013 = 1.430.000 : 13.000.000 = 0,11
• 2014 = 1.800.000 : 15.000.000 = 0,12
• 2015 = 2.080.000 : 16.000.000 = 0,13
Total MS = 0,36
Average MS = 0,12
forecast company’s sales 2016:
=0,12 X 16.285.715 kw
= 1.954.285,8 kw = 1.954.286 kw.
Exercise : Calculate the sales forecast for 2015 with Least
Square Methode.
The last 5 years data are shown in the following table
Note : 1. start point early year (2010) as based year

Sales (Y)
Year (in unit)

2010 108

2011 119

2012 110

2013 122

2014 130

total

84
Calculate the forecast for 2016 if middle point years
as based year !
(Trend Least Square Methode)

Sales (Y)
Year (in unit)

2010 108

2011 119

2012 110

2013 122

2014 130

2015 131

total
85

Вам также может понравиться