01 forecasting methods (1)

62
  Demand Forecasting 1 Sasadhar Bera, IIM Ranchi

Upload: swadha-awasthi

Post on 08-Oct-2015

7 views

Category:

Documents


0 download

DESCRIPTION

operations

TRANSCRIPT

  Nature of Demand
 Smoothing Methods
  Trend Projection
Forecasting is simply a prediction what happen in the
future.
methods are used to do future prediction. A reasonable
assumption is that the pattern of the past will continue
in future.
future prediction. 
The long-run success of an organization depends on how well
management is able to anticipate the future and develop
appropriate strategies. Forecasts are vital input for almost all
 planning process.
Forecast are used to  planning the system (e. g. product and
service design, process design, capacity planning and
equipment investment decisions) as well as for  planning the
use of system  (e. g. production, inventory planning and
scheduling, raw material purchasing, advertising plan,
budgeting and cost estimation).
makers to plan accordingly.
deterministic or probabilistic.
Independent demand  is the demand for an item that is
unrelated to the demand for other items and needs to be
forecast. This type of demand is directly to the market
demand. Finished goods have independent demand.
Items are said to have dependent demand  if their demand is
directly related to the demand of other items and can be
calculated without needing to be forecast. The demand for
cars is independent demand. However, if an automobile
manufacturer plan to produce ten thousand cars, then it
needs forty thousand wheel and tires etc. Thus demand of
wheels and tires depends on the production of number of
cars.
demand uncertainty in not included in its characterization. We
assume that the demand is known in future and not subject to
fluctuations. Historical averages are used as forecasts.
Static demand: Deterministic demand may be stable over
time. For example, demand of milk might range from 900 litre
to 950 litre per day in a particular city.
Dynamic demand: Deterministic demand that varies over time
is referred to as dynamic demand. For example, the demand
of airline passengers between metro city, vary throughout the
year, reaching peak during festival seasons, summer and
winter holidays.
probability distribution to characterize the nature of demand.
If a quantitative model incorporates the actual probability
distribution, then it is a probabilistic demand model.
Stationary demand: Demand probability density function
remains unchanged over time.
changes with time.
1) All forecasts are wrong, …but good ones are less
wrong.
the forecast value.
Moving Average
11 Sasadhar Bera, IIM Ranchi
A Time Series is a set of observations generated sequentially in
time. If the set is continuous the time series is said to be
continuous. If the set is discrete, the time series is said to be
discrete.
series may arrived in two ways:
1. By sampling a continuous time series: Output data
collection from a continuous heating gas furnace at an
interval of 15 minutes. Hence there will be four
observations per hour.
 
Time series methods can be classified into two categories:
Deterministic Models: In this type of model future values of a
time series are exactly determined by some mathematical
function. No probability distribution is considered to describe
the time series data.
Probabilistic or Stochastic Models: If the future values can be
described only in terms of a probability distribution, the time
series is said to be statistical time series. A statistical
phenomenon that evolves in time according to probabilistic
laws is called stochastic process. In analyzing a stochastic time
series we incorporate uncertainty by using probability
distribution to characterize the stochastic process.
 
2) Exponential Smoothing
3) Trend Projection
2) GARCH: Generalized Autoregressive Conditional
Heteroscadastic
 
Time series data are usually affected by four
components:
 
15 Sasadhar Bera, IIM Ranchi
Trend component (Tt): The trend component accounts for
the gradual shifting (increases or decreases) over a long
period of time.
Duration: Many years  – Systematic 
year after year.
16 Sasadhar Bera, IIM Ranchi
Seasonal component (St): A seasonal component is a
pattern that is repeated throughout a time series and has
a recurrence period of at most one year .
Possible Causes: Weather, social and religious, customs… 
Duration: Repeats every year (4 seasons, 12 months, or 52
weeks depending on Periods being analyzed)  – systematic. 
Example: Sales of woolen cloth, umbrella, lawn movers,
suntan lotions.
17 Sasadhar Bera, IIM Ranchi
Cyclical component (Ct): Repetitive fluctuations usually
occur in more than one year   and varying both in length
and intensity  in the long-term.
Possible Causes: Business or economic conditions.
Duration: Periods longer than one year  – systematic. 
Example: Economic cycles of growth or contraction,
inflation, recession, etc.
18 Sasadhar Bera, IIM Ranchi
Random component (It): Unpredictable, short term,
non-recurring random variations  in the time-series data.
One unable to predict its impact on the time series in
advance.
strikes, etc.
Duration: Short, non-repeating  – Unsystematic, random. 
 
Multiplicative Model: A time series model is called a
multiplicative model if we define the time series as the product
of its components i. e. Yt = Tt  St  Ct  It 
Tt  = Trend component, St  = Seasonal component, Ct  = Cyclical
component, It = random component
In case of multiplicative model, the magnitude of the seasonal
fluctuation increases as the series goes up, and decreases as the
series goes down. Amplitude is proportional to the average level
(mean) of the series. Most of the time series exhibit such type of
pattern.
Additive Model: A time series model is called an additive model
if we define the time series as the sum of its components i. e.
Yt = Tt + St + Ct + It 
In case of additive model, the magnitude of the seasonal
fluctuation does not depend on the average level (mean) of the
series.
 
 
Seasonal variation in time series data shows repetitive
upward and downward movements in time series plot.
Seasonality is the pattern that repeats itself over fixed
interval of time (daily, weekly or quarterly or monthly or
yearly etc.).
A seasonal plot enables the underlying seasonal pattern
to be seen more clearly, and also allows to observe any
substantial departure from seasonal pattern.
Example: Number of traffics during rush hour (morning
9-11 AM, Evening 5-7 PM), Sales of clothes during winter
and summer time, Visitors at a tourist spot during
vacation time, Customers at a restaurant during week
end, Airlines tickets sales during festival time.
 
The above time series shows seasonal pattern and
repetition of pattern occurs fixed interval of 4 data
points. Hence seasonality of this time series is 4.
Seasonal Plot
Seasonal Indices measures the amount of fluctuation for
each seasonal period with respect to average over all
seasonal periods.
quarterly sales data.
There are different measures of forecast accuracy. The
following three are commonly use in practice.
Yt = Actual value at time period t
Ft  = Forecast value at time period t
n = number of observations used to measure accuracy
Mean Square Error (MSE):
Mean Absolute Deviation(MAD):

Moving average (MA) model is generally selected when
data does not have any trend component. There are
three types of moving average models:
1) Simple Moving Average (SMA)
2) Centered Moving Average (CMA)
3) Weighted Moving Average (WMA)
 
The simple moving average method compute an average based
on past few data values of a time series using span length. The
span length (w) is the number of observation used to calculate
the average value. A simple way to carry out a smoothing
method is to use a moving average. The calculated average value
is used as a forecast for the next time period.
Let Y1, Y2, . . . Yn-1, Yn are the n number of observations. The
simple moving average of span length w at time t is defines as:
Mt  = Smooth value at time t
Forecast value at time (t+1) = Ft+1  = Mt 
w
 
 
30 Sasadhar Bera, IIM Ranchi
 
31 Sasadhar Bera, IIM Ranchi
 
32
all previous observations. The weighted moving average
technique allows for different weights to be assigned to
previous observations. Hence, we have to know span length
(w) and weights (vi).
Mt = v1 Yt + v2 Yt-1 + + . . . + vw Yt-w+1 
where weight (vi) value lies between 0 and 1 and = 1
Forecasted value at time (t+1) = Ft+1  = Mt 

There is no general method exists to determine the
moving average span length (w). The following can be
used
Non-Seasonal time series: It is common to use short span.
Seasonal time series: Span length is equal to seasonality.
 
To determine the trend component of a time series trend
analysis is performed. If a time series exhibits a linear
trend, the method of least squares may be used to
determine future forecasts by extrapolating (projection)
the fitted trend line.
The dependent variable is the actual observed value (Yt)
and independent variable is the time period (t) in the time
series.
It is a simple regression model which minimizes the sum of
square error between the trend line forecasts and the
actual observed values for the time series.
 
35 Sasadhar Bera, IIM Ranchi
Linear: A linear trend is any long-term increase or decrease in a
time series in which the rate of change is relatively constant.
Ft = a + bt,  where Ft  is forecasted value at time t, b represent
average change from one period to the next.
Quadratic: It accounts simple curvature in the data. Ft = a + b t + c t2
Exponential: It accounts exponential growth or decay. When the %
difference between consecutive observations is more or less same,
exponential trend is used. The equation for exponential model is
given below:
Ft = abt, where a, b, are constants. Natural Log transformation is
done to convert the exponential trend into the linear form.
Log (Ft)  = Loge(a bt) = Logea + t. Logeb = A + tB,
where A = Logea and B= Logeb
 
 
37 Sasadhar Bera, IIM Ranchi
Note: The intercept term is 54.9 and it is called Level
component. The slope is 1.7 and it is called Trend
component.
 
 
Exponential smoothing model provides larger weight to
the most recent observation and exponentially smaller
weights to the older observations. This model is most
suitable for short term forecast. There are three types of
smoothing models used for forecasting:
1) Single Exponential Smoothing
 
Using single exponential smoothing, the forecast value at (t+1)
period is equal to the forecast value at period t plus a
proportion (α) of the forecast error in the period t.
Exponential form: Zt =  Yt + (1 –) Zt –1 
Zt = Smooth value at time t
 = Smoothing Constant and 0 <  <1
Yt = Observation at time t
Forecasted value at time (t+1): Ft+1 = Zt = Ft + et ,
where
 is smoothing constant,
Single exponential smoothing method does not consider trend
and seasonal component of a time series.
Refer pdf file for details derivation of Ft+1 
 
Constant
Thumb rule for choosing smoothing constant (α) is: α  =
2/(N-1), where N is total number of observations. α value
lies between zero and one. Two factors which control α 
are:
smaller value of α.
2) Stability of mean of a time series: If mean is relatively
constant, keep α  small. If mean of a time series is
changing, keep α value large
Open source statistical software “R” provide optimum
value of α  by using metaheuristic based nonlinear
optimization.
 
44
parameters to update the two components (Level, and Trend) at
each period. It is called two parameters linear exponential
smoothing method. It provides short-term forecast when a trend 
 
are given below:
1) Fits a linear regression model to time series data
(y variable) versus time (x variable).
2) The constant from this regression is the initial estimate
of the level component (L0); the slope coefficient is the
initial estimate of the trend component (T0).
 
 
Method
47
components: level, trend and seasonal. It uses three
smoothing parameters to update the components at each
period.
from a linear regression on time. Initial values for the
seasonal component are obtained from a dummy-variable
regression using de-trended data.
 
This method separates time series into linear trend and seasonal
component. There are two types of decomposition models:
Multiplicative Model: Yt = Tt St It, where Yt is actual observation,
Tt = Trend component, St = Seasonal component, It = irregular or
random component
In case of multiplicative model, the magnitude of the seasonal
pattern increases as the series goes up, and decreases as the
series goes down.  Amplitude is proportional to the average level
(mean) of the series. Most of the time series exhibit such type of
pattern.
Additive Model: Yt = Tt + St + It 
 
49 Sasadhar Bera, IIM Ranchi
Step1: Do time series plot of the data (Yt) and find out
seasonality. Check model type additive or multiplicative.
Step2: Smooth the data by centered moving average (Mt )based
on the length of seasonality to reduce the random fluctuation.
For quarterly data, moving average is placed at (1+4)/2=2.5 =3
and if there are N observation there should be N –4 moving
average. For monthly data moving average is placed at
(1+12)/2=6.5 =7 and if there are N observation there should be N
 –12 moving average.
Step3: Get raw seasonal data by dividing or subtracting by
moving average values.
 
Step4: Find out the median value for each seasonal period
from the raw seasonal data.
The medians are also adjusted so that their mean is one
(multiplicative model) or their sum is zero (additive model).
These adjusted medians constitute the seasonal indices (St).
Step5: Deseasonalized the data:
Multiplicative model: Ds = Yt /St
Additive model: Ds = Yt – St
Step6: Fit a trend line (Tt) using least square regression on
deseasonalized data.
Step7: Determine the forecast value using the equation
below:
 
One illustrative example is given in pdf file
 
Causal forecasting methods are based on the assumption
that forecast exhibit cause-effect relationship with one or
more variables. Regression model is used as causal
forecasting method.
sales volume of different product based on time period,
advertising expenditure and unit price of each product.
It is to be noted that linear regression model assumptions
(linearity, normality, independence, homoscedasticity) are
valid for causal forecasting model.
 
54 Sasadhar Bera, IIM Ranchi
Step1: Do scatter plot (or time series plot). Find out the
trend type increasing or decreasing. Check whether seasonal
pattern exist or not. If seasonal pattern exists, find out the
seasonality.
(12-1).
Step3: Code the data set as per matrix format for dummy
variable regression.
Step4: Fit regression model using time and dummy variables as
input variables.
 
55 Sasadhar Bera, IIM Ranchi
Example
56 Sasadhar Bera, IIM Ranchi
In order to control a forecast, it is necessary to monitor the
forecast errors over a period of time. The purpose of such
monitoring is to attempt to distinguish between random errors
and nonrandom errors.
Random error are inherent and can not be eliminated.
Nonrandom error can be eliminated by adding new data set or
modifying forecasting method.
If error term (et) is negative the forecasting method
over-estimate the sales or demand. Similarly, error term zero or
positive indicates that no error or under-estimate, respectively.
Bias at time t: Bt = |et|= |Yt  – Ft|
Mean Absolute Deviation: MAD =
Sasadhar Bera, IIM Ranchi
Tracking signal is an approach for monitoring bias in forecast error.
This is a ratio of cumulative forecast error at any point of time to the
corresponding mean absolute deviation (MAD) at that point of time.
A value of a tracking signal that is beyond the action limits suggests
the need for corrective action.
Tracking Signal (TSt) =
Control limit = ± 3.75*MAD, where MAD is the average of all bias (Bt)
terms. Note that standard deviation = 1.25*MAD
 
 
Delphi Approach
separated from the others and is anonymous, is asked to
respond to a sequential series of questionnaires.
 After distribution of each questionnaire, the responses
are tabulated and the information and opinions of the
entire group are made known to each of the other panel
members so that they may revise their previous forecast
response.
is achieved.
Expert Judgment
 Qualitative forecasts based on judgment of a single or a
group of experts. The experts combine their conclusions
into forecasts.
past are not likely to hold in the future.
 
Consumer market Survey
potential customers regarding future purchasing plans.
 
The forecasting steps are given below:
1) Determine the purpose of the forecast.
2) Select the items or quantities to be forecasted.
3) Determine the time horizon (ahead of time periods)of the forecasts.
4) Select the forecasting model or models.
5) Identify the necessary data, and gather it, if necessary.
6) Make Forecasts.
7) Validate the model: Monitor forecast errors in order to determine if
the forecast is performing adequately. If it is not, take appropriate
corrective action or check with other type of model.
8) Implement the model and monitor the tracking signal.