8.1 Simple exponential smoothing _ Forecasting_ Principles and Practice (3rd ed)
8.1 Simple exponential smoothing _ Forecasting_ Principles and Practice (3rd ed)
https://otexts.com/fpp3/ses.html 1/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
Figure 8.1: Exports of goods and services from Algeria from 1960 to 2017.
Using the naïve method, all forecasts for the future are equal to the last observed
value of the series,
y^T +h|T = yT ,
for h = 1, 2, …. Hence, the naïve method assumes that the most recent observation
is the only important one, and all previous observations provide no information for
the future. This can be thought of as a weighted average where all of the weight is
given to the last observation.
Using the average method, all future forecasts are equal to a simple average of the
observed data,
T
1
y^T +h|T = ∑y ,
T t=1 t
for h = 1, 2, …. Hence, the average method assumes that all observations are of
equal importance, and gives them equal weights when generating forecasts.
We often want something between these two extremes. For example, it may be
sensible to attach larger weights to more recent observations than to observations
from the distant past. This is exactly the concept behind simple exponential
smoothing. Forecasts are calculated using weighted averages, where the weights
https://otexts.com/fpp3/ses.html 2/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
decrease exponentially as observations come from further in the past — the smallest
weights are associated with the oldest observations:
The table below shows the weights attached to observations for four different values
of α when forecasting using simple exponential smoothing. Note that the sum of the
weights even for a small value of α will be approximately one for any reasonable
sample size.
For any α between 0 and 1, the weights attached to the observations decrease
exponentially as we go back in time, hence the name “exponential smoothing”. If α
is small (i.e., close to 0), more weight is given to observations from the more distant
past. If α is large (i.e., close to 1), more weight is given to the more recent
observations. For the extreme case where α = 1, y^T +1|T = yT , and the forecasts are
equal to the naïve forecasts.
The forecast at time T+ 1 is equal to a weighted average between the most recent
^T |T −1 :
observation yT and the previous forecast y
https://otexts.com/fpp3/ses.html 3/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
for t = 1, … , T . (Recall that fitted values are simply one-step forecasts of the
training data.)
The process has to start somewhere, so we let the first fitted value at time 1 be
denoted by ℓ0 (which we will have to estimate). Then
⋮
y^T |T −1 = αyT −1 + (1 − α)y^T −1|T −2
y^T +1|T = αyT + (1 − α)y^T |T −1 .
The last term becomes tiny for large T . So, the weighted average form leads to the
same forecast Equation (8.1).
Component form
https://otexts.com/fpp3/ses.html 4/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
forecast equation and a smoothing equation for each of the components included in
the method. The component form of simple exponential smoothing is given by:
where ℓt is the level (or the smoothed value) of the series at time t. Setting h =1
gives the fitted values, while setting t = T gives the true forecasts beyond the
training data.
The forecast equation shows that the forecast value at time t + 1 is the estimated
level at time t. The smoothing equation for the level (usually referred to as the level
equation) gives the estimated level of the series at each period t.
Flat forecasts
That is, all forecasts take the same value, equal to the last level component.
Remember that these forecasts will only be suitable if the time series has no trend or
seasonal component.
Optimisation
https://otexts.com/fpp3/ses.html 5/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
T T
SSE = ∑(yt − y^t|t−1 ) = ∑ e2t . 2
(8.2)
t=1 t=1
Unlike the regression case (where we have formulas which return the values of the
regression coefficients that minimise the SSE), this involves a non-linear
minimisation problem, and we need to use an optimisation tool to solve it.
# Estimate parameters
fit <- algeria_economy |>
model(ETS(Exports ~ error("A") + trend("N") + season("N")))
^
This gives parameter estimates α = 0.84 and ℓ^0 = 39.5, obtained by minimising SSE
over periods t = 1, 2, … , 58, subject to the restriction that 0 ≤ α ≤ 1.
In Table 8.1 we demonstrate the calculation using these parameters. The second last
column shows the estimated level for times t = 0 to t = 58; the last few rows of the
last column show the forecasts for h = 1 to 5-steps ahead.
https://otexts.com/fpp3/ses.html 6/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
Table 8.1: Forecasting goods and services exports from Algeria using simple
exponential smoothing.
The black line in Figure 8.2 shows the data, which has a changing level over time.
fc |>
autoplot(algeria_economy) +
geom_line(aes(y = .fitted), col="#D55E00",
data = augment(fit)) +
https://otexts.com/fpp3/ses.html 7/8
9/26/24, 3:58 PM 8.1 Simple exponential smoothing | Forecasting: Principles and Practice (3rd ed)
Figure 8.2: Simple exponential smoothing applied to exports from Algeria (1960–2017). The
orange curve shows the one-step-ahead fitted values.
The forecasts for the period 2018–2022 are plotted in Figure 8.2. Also plotted are
one-step-ahead fitted values alongside the data over the period 1960–2017. The
large value of α in this example is reflected in the large adjustment that takes place
in the estimated level ℓt at each time. A smaller value of α would lead to smaller
changes over time, and so the series of fitted values would be smoother.
The prediction intervals shown here are calculated using the methods described in
Section 8.7. The prediction intervals show that there is considerable uncertainty in
the future exports over the five-year forecast period. So interpreting the point
forecasts without accounting for the large uncertainty can be very misleading.
https://otexts.com/fpp3/ses.html 8/8