الشريحة 1 - An-Najah National University

Download Report

Transcript الشريحة 1 - An-Najah National University

CH.8
Forecasting
Learning objectives:
After completing this chapter, you should be able to:
1.Explain the importance of forecasting in
organization.
2.Describe the three major approaches to
forecasting.
3.Measure the accuracy of a forecast over time.
Summary
Decision maker rely on forecasting to reduce
uncertainty about the future, for this reason forecasts
play a vital role in planning.
Decision makers have a wide variety of forecasting
models to choose from, these can be classified as
qualitative, projection of historical pattern, and
explanatory models.
Glossary
Time series: A time- ordered sequence of observation.
Trend: A long- term movement in time series data, often
linear, but not necessarily.
CH.8
Forecasting
If there is considerable uncertainty , it is much more difficult to formulate
plans that will produce the desired results than when there is little or no
uncertainty involved.
That is
Forecasts provide decision makers with an improved picture of probable
future events.
So, forecasts are important because they, can help to reduce some of the
uncertainty?
In fact, forecasts are vital inputs for almost all planning processes.
Forecasts are used planning the system
Product and service design, process design, capacity planning, and equipment
investment decision.
As well as for planning the use of system
Advertising production and inventory planning and scheduling, purchasing,
planning the size of work force, budgeting and cost estimation.
Good forecasts are more likely to result using this process:
1. Determine the purpose of the forecast.
2. Determine the time horizon.
3. Select an appropriate technique.
4. Identify the necessary date.
5. Make the forecast.
6. Monitor forecast errors.
For forecasting we use
Qualitative forecasts
Quantitative forecasts
We will use this approach
Quantitative models
Time series models :
Associative models
1. Naïve
1. Simple regression.
2. Moving averages.
3. Exponential smoothing.
4. Trend.
Let’s go to example to see how we could apply each type
Forecasts that use
Time series
DATA
* Time series data are historical values of a variable that have been intervals.
Daily demand, weekly sales, quarterly revenues, annual demand.
Forecasting techniques that use time series data typically involve the assumption
that past experience reflects probable future experience.
So, what are the observed patterns in historical data?
These are :
Trends, seasonal variation, cyclical variations, and random variations.
Look at figures:
1
2
month
Demand
Demand
Random variation
around an average
average
0
Cyclical variation
0
3
1
2
year
3
4
Trend with random
Demand
Demand
Seasonal variation
0
1
2
3
0
Year
1
2
3
4
Year
Techniques for averaging
1. Naïve forecasts.
2. Moving averages.
3. Exponential smoothing.
Naïve forecasts
It’s is simple , for any period the previous periods actual value .
How?
If demand last week was 50 units the forecasts for the upcoming week is 50
units.
If the demand in the upcoming week turns to be 54 units, the forecast for the
following week would be 54 units.
Moving averages
Uses a number of the most recent actual data values in generating forecast.
The moving average forecast can be computed using the following equation:
MAn =
M
n
i= 1
Ai
n
Where :
i = the ‘age’ of the data I = 1,2,3,………..
n = the number of periods in the moving average.
Ai = actual value with age i.
Go to example
Example 1.
Compute a three-period moving average forecast given demand for shopping
product for the last 5 years:
Period
Age
Demand
1
5
40
2
4
44
3
3
36
4
2
42
5
1
40
MA3 = 36 + 42 + 40 = 38.33
3
If actual demand in period 6 turns out to be 41, the moving average forecast for
period 7 would be :
MA3 = 42 + 40 + 41 = 41.00
3
If we want to make a weight for each data used in computing moving average ?
Go to the example
Example 1.
WMA =
M M
Weighted MA.
Ai (w)
w
Period
Weight determined base number of period MA.
Weight
Demand
1
40
2
44
3
3
36
4
2
42
5
1
Weight
40
If we use:
WMA3 = 36(1) + 42(2) + 40(3) = 40.00
6
If actual demand in period 6 turns to be
40,the weighted MA forecast for period
7 would be :
WMA3 = 42(1) + 40(2) + 40(3) = 40.33
For 7
6
Note :- as we move forward we change the weighted ( it’s arrangement ).
Exponential smoothing model
Is an averaging technique that reduces difficulties associated the previous model .
The exponentially smoothed forecast can be computed using this equation:
Ft = F +
t-1
X ( A –
t-1
F )
t-1
Where :
Ft = the forecast for period (t) .
F t-1 = the forecast for period ( t-1 ) .
X
= smoothing constraint .
A t-1 = actual demand or sales for period ( t-1 ) .
Go to understanding smoothing constant, and how to use it ?
The smoothing constant
, represent a percentage of the forecast error .
Each new forecast is equal to the previous forecast plus a percentage of the
previous error.
For example: suppose the previous forecast was 100 units, actual demand was
90 units, and
= .10 . The new forecast would be computed as follows
Ft = 100 + .10 ( 90- 100 ) = 99
Then, if the next actual demand turns out to be 102, the next forecast would be:
Ft = 99 + .10 ( 102- 99 ) =99.3
For forecasting which a percentage to use low or high?
The sensitivity of forecast adjustment to error is determined by the smoothing
constant, alpha .
The closer its value (
) is to zero , the slower the forecast will be to adjust to
forecast errors ( the greater the smoothing ) conversely , the closer the value of
is to 1.00 the greater the sensitivity and the less the smoothing .
Selecting a smoothing constant is, basically, a matter of judgment and trial and
error.
If you want to be sure about that use
.05 and
Go to the example
.50
= .05
Period
= .50
A
Ft
Error
A
Ft
1
42
-
-
-
-
2
40
3
43
4
40
5
41
6
39
7
46
8
44
9
45
10
38
11
40
12
Ft = F
t-1
( A t-1 – F t-1 )
Error = A – Ft
Error
-
e
=
M
MAD =
M
For accuracy use mean absolute deviation ( MAD ) equation :
n
( A – Ft )
n
value with MAD less is the best for forecasting?
Suppose you have these info .
Alternative
MAD
1
26.3
2
18.2
3
37.0
Best accuracy
Complete the previous example to see that works.
Techniques for trend
Trend is a persistent upward or downward movement in a time series. The trend
may be linear or nonlinear.
We will focus on linear trends.
There are two important techniques that can be used to develop forecasts when
trend present.
1. Trend equation.
2. Trend- adjusted exponential smoothing.
Go to examples
Trend equation : a linear trend equation :
Yt = a + bt
Where :
t = a specified number of time periods from t=0
Yt = the forecast for period t .
a = value of Yt at t=0.
b = slope of the line .
The coefficient of the line, a and b , can be computed from historical data
using these two equation:
M
a= Y - b
y
M
M M
t
t2 - (
M
n
Ty -
M M
b=n
t)2
t
n
Where n the number of periods
Note :-
Consider the trend equation Yt = 45 + 5t .
The value of Yt when t = 0 is 45 , and the slope of the line is 5 , which means
that the value of Yt will increase by 5 units for each one unit increase in t.
If t = 10, the forecast, Yt, is 45 +5(10) = 95 units.
Example :
Month
Mar
Apr
May
Jun
Jul
Auq
Sept
Oct
Nov
Actual demand
112
125
120
133
136
146
140
155
152
1. Plot the data to determine if linear trend equation is appropriate.
2. Obtain a trend equation .
3. Forecast demand for the next two months.
Solution:
1. The data seem to show an upward, roughly linear trend .
150
140
130
120
110
3
Month
Mar
Apr
May
Jun
Jul
Auq
Sept
Oct
Nov
t = 45
4
5
t
1
2
3
4
5
6
7
8
9
6
7
8
9
Period
y
ty
112
112
125
250
120
360
133
532
136
660
146
876
140
980
155
1240
152
1360
y= 1218
Ty = 6398
M
2
M
1
M
Demand
160
t = 45 ,
M
n=9,
M
From the table
2
t = 285
b = 9 ( 6398 ) – 45 ( 1219 ) =
9 (285) – 45 ( 45 )
2727 = t 5.05
540
a = 1219 – 5,05 ( 45 ) = 110.19
9
Yt = 110.19 + 5.05 t
3. The next two months, t= 10 , t = 1 .
Y dec = 110.19 + 5.05 ( 10 ) = 160.69 .
Y jan = 110.19 + 5.05 ( 11 ) = 165.74 .
Trend- adjusted exponential smoothing
Note: we apply this technique when time series includes trend.
The equation for trend adjusted forecast is:
TAFt+1 = St + Tt
Where
St = smoothed error
Tt = current trend estimate.
And
( A t – TAF t )
St = TAF t +
Tt = T t-1 +
2
( TAF t – TAF t-1 – T t-1 )
Suppose a manager estimates a trend of + 10 units, based on observed
changes in the first four data, and uses a starting forecast of 250, and
=.5
and 2 = .4 if the next actual value is 255, TAF for the following period would be
computed in this manager:
St = 250 + .5 ( 255 – 250 ) = 252.5
Tt = 10 + .4 (0)*
* Since this is the initial forecast, no previous error is available, so the value zero
is used.
TAF = St + Tt = 252.5 + 10 = 262.5
If the next actual value is 265 the next TAF would be
St = 262.5 + 05 ( 265 – 262.5 ) = 263.75
Tt = 10+ .4 ( 262.5 – 250 – 10 ) = 11.00
TAF = 263.75 + 11.00 = 274.75
We can use another equation for TAF
FITL = F t + T t
Where :
FIT t forecast including trend
F t = new forecast simple smoothing .
T t = trend for period
For F t = F t-1 +
( A t-1 – F t-1 )
For T t = ( 1 – B ) T t-1 + B ( F t – F t-1 )
To compute FIT t follow these steps :
1. Find F t .
2. Compute T t
3. Find FIT t = 1 + 2 .
Go to example
Example
You have the following info:
Month
demand
1
12
2
17
3
20
4
19
5
24
6
26
7
31
8
32
9
36
M
1
2
3
4
5
6
7
8
9
d
12
17
20
19
24
26
31
32
36
F 2 = 11 + .2 ( 12 – 11 ) = 11.2
T 2 = ( 1 - .4) 0 + .4 ( 11.2 – 11.0 ) = .08
FIT 2 = 11.2 + .08 = 11.28
And so on for the other periods.
Assume the initial forecast for month first
was 11 unit
= .2
Ft
11
11.2
12.56
13.89
14.91
16.75
18.58
21.07
23.25
B = .4
Tt
FITt
0
.08
.51
.92
.96
1.30
1.52
1.91
2.02
11.28
12.87
14.81
15.87
18.03
20.10
22.98
25.27
Techniques for seasonality
Seasonal variation in time series data are regularly upward or downward
movements.
Weather variation and it’s impact on travel sports product.
To compute seasonal relative, use this model :
Centered moving average, which based on
Identical to a moving average forecast as are the resulting values. However the
values are not projected as in a forecast, but, instead, they are positioned in the
middle of the periods to compute average.
Go to example
Period
Demand
1
40
2
46
3
42
Three-period centered average
Average = 40 + 46 + 42
3
= 42.67
It would be positioned of period 2, the average representative of the series at that
point. The ratio of demand at period 2 to this centered average at period 2 is an
estimate of the seasonal relative at that point.
Because the ratio is 46 = 1.08 the series is about 8% above average at this
point.
42.67
What if both trend and seasonality appear in a series?
Trend + seasonality
Suppose a furniture manufacturer wants to predict quarterly demand for a
certain seat for period 15 and 16, which happen to be the second and third
quarters of a particular year. The series consists of both trend and seasonality.
The trend portion of demand can be projected the equation Yt= 124 + 7.5t .
Quarter relatives are :
Q1 = 1.20
Q2 = 1.10
Q3 = .75
Q4 = .95
Use the info. To predict demand for period 15 and 16.
Solution :
The trend values at t = 15 and t = 16
Y15 = 124 + 7.5 ( 15 ) = 235.5
Y 16 = 124 + 7.5 ( 16 ) = 244.0
Period 15
235.5 ( 1.10 ) = 259.05
Period 16
244.0 ( .75 ) = 183.00
Quarter relative
Forecasts that use explanatory model
These model incorporate one or more variables that are related to the variable of
interest and, therefore, they can be used to predict future values of that variable.
Are called regression models
We are going to use the simple linear regression.
* For multiple regression go to the computer?
Simple linear regression
Consists two variable
The variable to be forecasted is dependent variable ?
The other value used to explain or predict the dependent variable is called
independent variable ?
To make forecast , the two variables must be expressed in a linear equation of the
form :
Y = a + bx
Where :
Y = the dependent variable .
X = the independent variable.
N
A=
y - b
n
M
xy- x y
x2 - ( x )2
M
M
M M
b=n
M M
B = slope of the line .
x
=
y – bx
Note :
In order to successfully use this approach , it is necessary to be able to :
1. Identify an appropriate independent variable .
2. Obtain a sample of at least 10 observations.
3. Develop an equation .
4. Identify any restriction on prediction .
5. Measure accuracy in a given forecast .
Go to the example ??
Conceder, for example , 10 paired observations about sales and ads.
( millions of $ )
observation
1
2
3
4
5
6
7
8
9
10
Ads expenditure, x
1.1
1.4
1.4
2
0.9
1.6
2
1.7
1.2
0.8
Sales , y
7
8
10
10
7
10
11
11
9
6
You can plot the pairs to see if a linear relationship is appropriate,??
It appear / linear relationship
Solution :
Calculations for regression coefficients
observation
1
2
3
4
5
6
7
8
9
10
Ads expenditure, x
1.1
1.4
1.4
2
0.9
1.6
2
1.7
1.2
0.8
14.1
b = 10 ( 131.5 ) – 14.1 ( 89 ) =
10 ( 21.47 ) – 14.1 ( 14.1 )
a = 89 – 3.78 ( 14.1 )
10
y = 3.57 + 3.87
=
3.57
Sales , y
7
8
10
10
7
10
11
11
9
6
89
60.1 = + 3.78
15.89
xy
7.7
11.2
14.0
20.0
6.3
16.0
22.0
18.7
10.8
4.8
131.5
x2
1.21
1.96
1.69
4.00
0.81
2.56
4.00
2.89
1.44
0.64
21.47
y2
49
64
100
100
49
100
121
121
81
36
821
r=
M
X
n ( y2 ) - (
10 ( 131.5 ) -
M
2
x)
y
M
x2) - (
x
M
n(
xy M
n
M
r=
M
Before we go in prediction process ,we must measure the strength of the relationship
between the two variable . For that, we use correlation coefficient ?
2
y)
( 14.1 ) ( 89 )
10 (21.47 ) - ( 14.1 ) X
10 ( 821 ) - ( 89 )
= + .887
The same as the sign of b .
Relationship is good to use for prediction .
Square of the correlation coefficient, r 2, can be used as a measure of goodness of
fit : the closer the value is to 1.00 the better the fit, for Ads data r 2 = 0.787 this
means that .79 of the sum of the squared deviation of Y value around the mean of
the Y . We say that the independent variable explain .79 of the variation .
There are a number of important questions that must be answered if a regression
equation is to be used for forecasting ??
1. Is the relationship significant ?
2. How accurate will a particular forecast probably be ?
These questions and other depend on the extend to which the points scatter
around the regression line .
Se =
y -b
xy
M
y2 - a
M
M
This is measured by standard error of estimate, se,
n–2
n – 2 / because we have two coefficient a and b
For our example
Se =
821 – 3.57 (89) – 3.78 ( 131.5 )
= .880
10 – 2
Note : if the value of r 2 is less than , say .40 the computed relationship will not
be strong enough to yield acceptable forecast accuracy.
To test for the existence of relationship ( than the slope is non zero )
Compute the ration
T test =
b
Sb
Where
b = slope of regression line .
S b = Se
X
2
- ( x)
n
M
M
1
2
For our example
S b = .880
1
2
21.47 – ( 14.1 )
= .880
.629
= .698
10
T test = 3.78
.698
n
10
11
12
13
14
15
16
17
18
19
20
21
22
t
2.31
2.26
2.23
2.20
2.18
2.16
2.15
2.13
2.12
2.11
2.10
2.09
2.08
= 5.42
Compare this value with value of t .025 for n – 2 /
from the table of T test
If the test is greater than the table value, as it is in our
case ( 5.42 ), it can be concluded that the relationship is
significant.
Not due to the chance ??
How accurate will a given predication be ?
Here we should use the regression equation to compute expected value of the
dependent variable for a selected or given value of X the construct a 95%
confidence interval around that value .
Suppose expected value of X is 1.3 ?
Y + t S reg
Where Y = a + b x
t = from the T test table
2
x - (
M
1+ 1 +
n
2
(xg–x)
M
S reg =
n
X g = value of x to be used
x)
2
X = 1.3 ,
X = 14.1 = 1.41
10
S reg = .880
1+ 1 +
10
( 1.3 – 1.41
2
)
21.47
- (14.1)
2
= .926
10
For our case :
X g = 1.3 , 95% confidence interval
For the predicted value of y is
Y = a + b x = 3.57 + 3.78 (1.3) = 8.48
95% interval = 8.48 + 2.31 ( .926 )
= 8.48 + 2.14
or 6.34 to 10.62
for test table .