CH 7 Forecasting
CH 7 Forecasting
CH 7 Forecasting
Forecasting
7.1 Introduction
Forecasting refers to the process of using statistical procedures to predict future values of a time
series based on historical trends. Forecasting the future values of an observed time series is an
important problem in many areas, including economics, production planning, sales forecasting
and stock control. Forecasting problems are often classified as short-term, medium-term, and
long-term. Short-term forecasting problems involve predicting events only a few time periods
(days, weeks, months) into the future. Medium-term forecasts extend from one to two years into
the future, and long-term forecasting problems can extend beyond that by many years.
Suppose we have an observed time series Y1, Y2,…, Yn. Then the basic problem is to estimate
future values such as YT+k, where k = 1, 2, 3, …. and an integer k is called the lead time or
forecasting horizon. The forecast of YT+k at time T for k steps ahead is typically denoted by 𝑌T+k
or Y(T+k). A wide variety of different forecasting procedures is available and it is important to
realize that no single method is universally applicable.
Forecasting methods may be broadly classified into three groups as follows:
1. Subjective
Forecasts can be made on a subjective basis using judgment, intuition, commercial knowledge
and any other relevant information. This Methods is done based on a group of forecasters to
obtained a consensus forecast with controlled feedback of other analysts’ predictions and
opinions as well as other relevant information. These methods will not be described here, as most
statisticians will want their forecasts to be at least partly objective. However, note that some
subjective judgment is often used in a more statistical approach, for example, to choose an
appropriate model and perhaps make adjustments to the resulting forecasts.
1.Univariate
Forecasts of a given variable are based on a model fitted only to present and past observations of
a given time series, so that 𝑌T+k depends only on the values of Yn, Yn−1, Yn−2,…, possibly
augmented by a simple function of time, such as a global linear trend. This would mean, for
example, that univariate forecasts of the future sales of a given product would be based entirely
1
on past sales, and would not take account of other economic factors. Methods of this type are
sometimes called naive or projection methods.
3.Multivariate
Forecasts of a given variable depend at least partly on values of one or more additional series,
called predictor or explanatory variables. For example, sales forecasts may depend on stocks
and/or on economic indices. Models of this type are sometimes called causal models.
In practice, a forecasting procedure may involve a combination of the above approaches. For
example, marketing forecasts are often made by combining statistical predictions with the
subjective knowledge and insight of people involved in the market. A more formal type of
combination is to compute a weighted average of two or more objective forecasts, as this often
proves superior on average to the individual forecasts.
Forecasting has a range of applications in various industries. It has tons of practical applications
including: weather forecasting, climate forecasting, economic forecasting, healthcare forecasting
engineering forecasting, finance forecasting, retail forecasting, business forecasting,
environmental studies forecasting, social studies forecasting, and more. Basically anyone who
has consistent historical data can analyze that data with time series analysis methods and then
model, forecasting, and predict. For some industries, the entire point of time series analysis is to
facilitate forecasting.
Here are several examples from a range of industries to make the notions of time series analysis
and forecasting more concrete:
2
7.2 Some Forecasting Methods
Average Methods
A. The Mean
When we forecast using the mean, data must be stationary, and the variance is stable. In other
words, the data must have not trend and seasonality. Given the data set covering the start time
∑
periods the forecast of the observation in some future period ‘T+k’ would be 𝑌T+k = 𝑌 = .
For both seasonal and non-seasonal data, the adequacy of the fitted model should be checked by
what Box and Jenkins call ‘diagnostic checking’. This essentially consists of examining the
residuals from the fitted model to see whether there is any evidence of non-randomness. The
3
correlogram of the residuals is calculated and we can then see how many coefficients are
significantly different from zero and whether any further terms are indicated for the ARIMA
model. If the fitted model appears to be inadequate then alternative ARIMA models may be tried
until a satisfactory one is found. When a satisfactory model is found, forecasts may readily be
computed. Given data up to time T, these forecasts will involve the observations and the fitted
residuals (i.e. the one-step-ahead forecast errors) up to and including time T. The standard
criterion to use in obtaining the best forecast is the mean squared error for which the expected
value of the squared forecast errors, E[(YT+k - 𝑌 )2] = E[(εT+k)2], is minimized. The minimum
mean square error forecast of YT+k at time T is the conditional expectation of YT+k at time T,
namely, 𝑌 = E(YT+k/YT, YT-1, YT-2, …). In evaluating this conditional expectation, we use the
fact that the ‘best’ forecast of all future ε’s is simply zero (or more formally that the conditional
We get the following first order difference equation for the prediction function which can be
solved recursively:
and |𝜙 | < 1. The optimal k-step-forecast is the conditional mean of Y T+k, i.e.
We get the following first order difference equation for the prediction function which can be
solved recursively:
E[YT+1] =𝑌T+1 = E[𝜇̂ +𝜙 YT + 𝜙 YT-1 + 𝜙 YT-1+ εT+1] = 𝜇̂ + 𝜙 E[YT] + 𝜙 E[YT-1]
4
= 𝜇̂ + 𝜙 YT+ 𝜙 YT-1.
= 𝜇̂ + 𝜙 𝑌T+1 + 𝜙 YT
E[YT+3] =𝑌T+3 = E[𝜇̂ + 𝜙 YT+2 + 𝜙 YT+1 + εT+2] =𝜇̂ + 𝜙 E[YT+1] + 𝜙 E[YT+1]
= 𝜇̂ + 𝜙 𝑌T+1 + 𝜙 𝑌T+1
In general, E[YT+k] =𝑌T+k = 𝜇̂ + 𝜙 𝑌T+k-1 + 𝜙 𝑌T+k-2, for k ≥ 3.
For this process, it holds that Yt = μ + εt – θ1 εt-1, with | θ1| < 1. The conditional mean of Yt+k is
E[YT+k] = 𝑌T+k = 𝜇̂ + E[εT+k] – 𝜃1 E[εT+k-1] = 𝜇̂ – 𝜃1 e1(T+k-1)
for k ≥ 2,
we get 𝑌T+k = 𝝁 i.e. the unconditional mean is the optimal forecast of Y t+k, k = 2, 3, ..., .
5
Forecasts With MA(2) Process
For this process, it holds that Yt = μ +εt – θ1 εt-1–θ2 εt-2 , with θ1+θ2 < 1, θ2–θ1 <1 and | θ1| <1.
This leads;
for k = 1, E[YT+1] = 𝑌T+1 = 𝜇̂ – 𝜃1 e1(T) – 𝜃2 e2(T-1),
Yt = 10 + εt - 0.3 εt-1 with 200 observations. If the first observation and the last forecast
error are given as 19 and -0.45 then find forecasts for period 201, 201, 203,…
2. The time series model has been fitted to some historical data MA(2) process as:
Yt = 20 + εt + 0.45 εt-1 - 0.35 εt-2. If the first four observations are 17.5, 21.36, 18.24 and
16.91, respectively, then find forecasts for period 5, 6, 7,…
Forecasts With ARMA(p, q) Processes
Forecasts for ARMA(p, q) process result from combining the approaches of pure AR and MA
processes. Thus, for instance, the one-step ahead forecast for a stationary and invertible
6
Example: The time series model has been fitted to some historical data having 100 observations
as ARMA(1, 1) process: Yt = 0.8Yt-1 + εt - 0.5 εt-1. If the last observation and forecast error are
given as 91 and -0.54 then find forecasts for period 101, 102, 103, …
7.4 The Accuracy of Forecasting Methods
Forecasts can be evaluated when the realized values are available. There are many kinds of
measures to do this. Quite often, only graphs and/or scatter diagrams of the predicted values and
the corresponding observed values of a time series are plotted. Intuitively, a forecast is ‘good’ if
the predicted values describe the development of the series in the graphs relatively well or if the
points in the scatter diagram are concentrated around the bisecting line in the first and/or third
quadrant.
On the other hand, simple descriptive measures, which are often employed to evaluate the
performance of forecasts, are based on the average values of the forecast errors over the forecast
horizon i.e. the forecast error for a particular forecast 𝑌t with respect to actual value Yt is:
et Yt Yt . The simple arithmetic mean indicates whether the values of the variable are – on
However, the disadvantage of this measure is that large over- and underestimates cancel each
other out. The mean absolute error is often used to avoid this effect i.e. | et || Yt Yˆt | . Hence,
we can define a measure known as the mean absolute error (MAE) as:
n n
et Y t Yˆt
MAE t 1
t 1
n n
Every forecast error gets the same weight in this measure. The root mean square error is often
n n
et Y t Yˆt
used to give particularly large errors a stronger weight: RMAE t 1
t 1
n n
Another method is to use the mean squared error (MSE) defined as follows:
n n
et (Y Yˆt ) 2
2
t
MSE t 1
t 1
. These measures are not normalized, i.e. their size depends on the
n n
scale of the data.
7
Therefore, the inequality measure proposed by HENRY THEIL (1961) avoids this problem by
comparing the actual forecasts with so-called naïve forecasts, i.e. the realized values of the last
available observation. This method that measures the accuracy of forecast is by using U-Statistic
called Theil’s U-Test. The Theil’s U-Statistic is defined as:
∑ ( )
U= , where ∑ ( ) is forecast relative error and ∑ ( )
∑ ( )
t 1 2 3 4 5 6 7 8 9 10
Yt 22 23 39 37 38 47 43 49 61 63
𝑌t 24 28 32 36 40 44 48 52 56 60
Solution:
t 1 2 3 4 5 6 7 8 9 10 Sum
Numerator 0.052 0.093 0.001 0.003 0.006 0.011 0.005 0.010 0.002 - 0.184
Denominator 0.002 0.494 0.003 0.001 0.056 0.007 0.019 0.060 0.001 - 0.633
∑ ( )
Then U =
∑ ( )
= .
.
= 0.54 <1.
This tells us the forecasting method used is better than the naïve method.
Exercises for chapters 6-to-8
1. What are the three parameters in ARIMA model?
2. Write the Box-Jenkins modeling stages.
8
4. Consider a certain time series process of Y t = ¾ Yt-1 - ½ Yt-2 + εt .
8. Consider the MA(1) model Yt = 40 + 0.4 t-1 + t. Assume that the variance of the
and suppose that you are at the end of time period T = 10.
(a) What is the equation for forecasting the time series in period 11, 12 and 13?