🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 36 (from laksa031)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
4 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.1 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://otexts.com/fpp2/ses.html
Last Crawled2026-04-04 20:20:30 (4 days ago)
First Indexed2019-01-17 06:49:59 (7 years ago)
HTTP Status Code200
Meta Title7.1 Simple exponential smoothing | Forecasting: Principles and Practice (2nd ed)
Meta Description2nd edition
Meta Canonicalnull
Boilerpipe Text
The simplest of the exponentially smoothing methods is naturally called simple exponential smoothing (SES) 16 . This method is suitable for forecasting data with no clear trend or seasonal pattern. For example, the data in Figure 7.1 do not display any clear trending behaviour or any seasonality. (There is a rise in the last few years, which might suggest a trend. We will consider whether a trended method would be better for this series later in this chapter.) We have already considered the naïve and the average as possible methods for forecasting such data (Section 3.1 ). oildata <- window (oil, start= 1996 ) autoplot (oildata) + ylab ( "Oil (millions of tonnes)" ) + xlab ( "Year" ) Figure 7.1: Oil production in Saudi Arabia from 1996 to 2013. Using the naïve method, all forecasts for the future are equal to the last observed value of the series, y ^ T + h | T = y T , 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, y ^ T + h | T = 1 T ∑ t = 1 T y 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 decrease exponentially as observations come from further in the past — the smallest weights are associated with the oldest observations: (7.1) y ^ T + 1 | T = α y T + α ( 1 − α ) y T − 1 + α ( 1 − α ) 2 y T − 2 + ⋯ , where 0 ≤ α ≤ 1 is the smoothing parameter. The one-step-ahead forecast for time T + 1 is a weighted average of all of the observations in the series y 1 , … , y T . The rate at which the weights decrease is controlled by the parameter α . 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. α = 0.2 α = 0.4 α = 0.6 α = 0.8 y T 0.2000 0.4000 0.6000 0.8000 y T − 1 0.1600 0.2400 0.2400 0.1600 y T − 2 0.1280 0.1440 0.0960 0.0320 y T − 3 0.1024 0.0864 0.0384 0.0064 y T − 4 0.0819 0.0518 0.0154 0.0013 y T − 5 0.0655 0.0311 0.0061 0.0003 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 = y T , and the forecasts are equal to the naïve forecasts. We present two equivalent forms of simple exponential smoothing, each of which leads to the forecast Equation (7.1) . Weighted average form The forecast at time T + 1 is equal to a weighted average between the most recent observation y T and the previous forecast y ^ T | T − 1 : y ^ T + 1 | T = α y T + ( 1 − α ) y ^ T | T − 1 , where 0 ≤ α ≤ 1 is the smoothing parameter. Similarly, we can write the fitted values as y ^ t + 1 | t = α y t + ( 1 − α ) y ^ t | t − 1 , 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 ^ 2 | 1 = α y 1 + ( 1 − α ) ℓ 0 y ^ 3 | 2 = α y 2 + ( 1 − α ) y ^ 2 | 1 y ^ 4 | 3 = α y 3 + ( 1 − α ) y ^ 3 | 2 ⋮ y ^ T | T − 1 = α y T − 1 + ( 1 − α ) y ^ T − 1 | T − 2 y ^ T + 1 | T = α y T + ( 1 − α ) y ^ T | T − 1 . Substituting each equation into the following equation, we obtain y ^ 3 | 2 = α y 2 + ( 1 − α ) [ α y 1 + ( 1 − α ) ℓ 0 ] = α y 2 + α ( 1 − α ) y 1 + ( 1 − α ) 2 ℓ 0 y ^ 4 | 3 = α y 3 + ( 1 − α ) [ α y 2 + α ( 1 − α ) y 1 + ( 1 − α ) 2 ℓ 0 ] = α y 3 + α ( 1 − α ) y 2 + α ( 1 − α ) 2 y 1 + ( 1 − α ) 3 ℓ 0     ⋮ y ^ T + 1 | T = ∑ j = 0 T − 1 α ( 1 − α ) j y T − j + ( 1 − α ) T ℓ 0 . The last term becomes tiny for large T . So, the weighted average form leads to the same forecast Equation (7.1) . Component form An alternative representation is the component form. For simple exponential smoothing, the only component included is the level, ℓ t . (Other methods which are considered later in this chapter may also include a trend b t and a seasonal component s t .) Component form representations of exponential smoothing methods comprise a 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: Forecast equation y ^ t + h | t = ℓ t Smoothing equation ℓ t = α y t + ( 1 − α ) ℓ t − 1 , 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 . If we replace ℓ t with y ^ t + 1 | t and ℓ t − 1 with y ^ t | t − 1 in the smoothing equation, we will recover the weighted average form of simple exponential smoothing. The component form of simple exponential smoothing is not particularly useful, but it will be the easiest form to use when we start adding other components. Flat forecasts Simple exponential smoothing has a “flat” forecast function: y ^ T + h | T = y ^ T + 1 | T = ℓ T , h = 2 , 3 , … . 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 The application of every exponential smoothing method requires the smoothing parameters and the initial values to be chosen. In particular, for simple exponential smoothing, we need to select the values of α and ℓ 0 . All forecasts can be computed from the data once we know those values. For the methods that follow there is usually more than one smoothing parameter and more than one initial component to be chosen. In some cases, the smoothing parameters may be chosen in a subjective manner — the forecaster specifies the value of the smoothing parameters based on previous experience. However, a more reliable and objective way to obtain values for the unknown parameters is to estimate them from the observed data. In Section 5.2 , we estimated the coefficients of a regression model by minimising the sum of the squared residuals (usually known as SSE or “sum of squared errors”). Similarly, the unknown parameters and the initial values for any exponential smoothing method can be estimated by minimising the SSE. The residuals are specified as e t = y t − y ^ t | t − 1 for t = 1 , … , T . Hence, we find the values of the unknown parameters and the initial values that minimise (7.2) SSE = ∑ t = 1 T ( y t − y ^ t | t − 1 ) 2 = ∑ t = 1 T e t 2 . 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. Example: Oil production In this example, simple exponential smoothing is applied to forecast oil production in Saudi Arabia. oildata <- window (oil, start= 1996 ) # Estimate parameters fc <- ses (oildata, h= 5 ) # Accuracy of one-step-ahead training errors round ( accuracy (fc), 2 ) #> ME RMSE MAE MPE MAPE MASE ACF1 #> Training set 6.4 28.12 22.26 1.1 4.61 0.93 -0.03 This gives parameter estimates α ^ = 0.83 and ℓ ^ 0 = 446.6 , obtained by minimising SSE over periods t = 1 , 2 , … , 18 , subject to the restriction that 0 ≤ α ≤ 1 . In Table 7.1 we demonstrate the calculation using these parameters. The second last column shows the estimated level for times t = 0 to t = 18 ; the last few rows of the last column show the forecasts for h = 1 , 2 , 3 , 4 , 5 . Table 7.1: Forecasting the total oil production in millions of tonnes for Saudi Arabia using simple exponential smoothing. Year Time Observation Level Forecast t y t ℓ t y ^ t | t − 1 1995 0 446.59 1996 1 445.36 445.57 446.59 1997 2 453.20 451.93 445.57 1998 3 454.41 454.00 451.93 1999 4 422.38 427.63 454.00 2000 5 456.04 451.32 427.63 2001 6 440.39 442.20 451.32 2002 7 425.19 428.02 442.20 2003 8 486.21 476.54 428.02 2004 9 500.43 496.46 476.54 2005 10 521.28 517.15 496.46 2006 11 508.95 510.31 517.15 2007 12 488.89 492.45 510.31 2008 13 509.87 506.98 492.45 2009 14 456.72 465.07 506.98 2010 15 473.82 472.36 465.07 2011 16 525.95 517.05 472.36 2012 17 549.83 544.39 517.05 2013 18 542.34 542.68 544.39 h y ^ T + h | T 2014 1 542.68 2015 2 542.68 2016 3 542.68 2017 4 542.68 2018 5 542.68 The black line in Figure 7.2 is a plot of the data, which shows a changing level over time. autoplot (fc) + autolayer ( fitted (fc), series= "Fitted" ) + ylab ( "Oil (millions of tonnes)" ) + xlab ( "Year" ) Figure 7.2: Simple exponential smoothing applied to oil production in Saudi Arabia (1996–2013). The forecasts for the period 2014–2018 are plotted in Figure 7.2 . Also plotted are one-step-ahead fitted values alongside the data over the period 1996–2013. 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 7.7 . The prediction intervals show that there is considerable uncertainty in the future values of oil production over the five-year forecast period. So interpreting the point forecasts without accounting for the large uncertainty can be very misleading. In some books it is called “single exponential smoothing”. ↩︎
Markdown
Type to search - [Forecasting: Principles and Practice](https://otexts.com/fpp2/) - [Preface](https://otexts.com/fpp2/index.html) - [**1** Getting started](https://otexts.com/fpp2/intro.html) - [**1\.1** What can be forecast?](https://otexts.com/fpp2/what-can-be-forecast.html) - [**1\.2** Forecasting, planning and goals](https://otexts.com/fpp2/planning.html) - [**1\.3** Determining what to forecast](https://otexts.com/fpp2/determining-what-to-forecast.html) - [**1\.4** Forecasting data and methods](https://otexts.com/fpp2/data-methods.html) - [**1\.5** Some case studies](https://otexts.com/fpp2/case-studies.html) - [**1\.6** The basic steps in a forecasting task](https://otexts.com/fpp2/basic-steps.html) - [**1\.7** The statistical forecasting perspective](https://otexts.com/fpp2/perspective.html) - [**1\.8** Exercises](https://otexts.com/fpp2/intro-exercises.html) - [**1\.9** Further reading](https://otexts.com/fpp2/intro-reading.html) - [**2** Time series graphics](https://otexts.com/fpp2/graphics.html) - [**2\.1** `ts` objects](https://otexts.com/fpp2/ts-objects.html) - [**2\.2** Time plots](https://otexts.com/fpp2/time-plots.html) - [**2\.3** Time series patterns](https://otexts.com/fpp2/tspatterns.html) - [**2\.4** Seasonal plots](https://otexts.com/fpp2/seasonal-plots.html) - [**2\.5** Seasonal subseries plots](https://otexts.com/fpp2/seasonal-subseries-plots.html) - [**2\.6** Scatterplots](https://otexts.com/fpp2/scatterplots.html) - [**2\.7** Lag plots](https://otexts.com/fpp2/lag-plots.html) - [**2\.8** Autocorrelation](https://otexts.com/fpp2/autocorrelation.html) - [**2\.9** White noise](https://otexts.com/fpp2/wn.html) - [**2\.10** Exercises](https://otexts.com/fpp2/graphics-exercises.html) - [**2\.11** Further reading](https://otexts.com/fpp2/graphics-reading.html) - [**3** The forecaster’s toolbox](https://otexts.com/fpp2/toolbox.html) - [**3\.1** Some simple forecasting methods](https://otexts.com/fpp2/simple-methods.html) - [**3\.2** Transformations and adjustments](https://otexts.com/fpp2/transformations.html) - [**3\.3** Residual diagnostics](https://otexts.com/fpp2/residuals.html) - [**3\.4** Evaluating forecast accuracy](https://otexts.com/fpp2/accuracy.html) - [**3\.5** Prediction intervals](https://otexts.com/fpp2/prediction-intervals.html) - [**3\.6** The forecast package in R](https://otexts.com/fpp2/the-forecast-package-in-r.html) - [**3\.7** Exercises](https://otexts.com/fpp2/toolbox-exercises.html) - [**3\.8** Further reading](https://otexts.com/fpp2/toolbox-reading.html) - [**4** Judgmental forecasts](https://otexts.com/fpp2/judgmental.html) - [**4\.1** Beware of limitations](https://otexts.com/fpp2/judgmental-limitations.html) - [**4\.2** Key principles](https://otexts.com/fpp2/judgmental-principles.html) - [**4\.3** The Delphi method](https://otexts.com/fpp2/delphimethod.html) - [**4\.4** Forecasting by analogy](https://otexts.com/fpp2/analogies.html) - [**4\.5** Scenario forecasting](https://otexts.com/fpp2/scenarios.html) - [**4\.6** New product forecasting](https://otexts.com/fpp2/new-products.html) - [**4\.7** Judgmental adjustments](https://otexts.com/fpp2/judgmental-adjustments.html) - [**4\.8** Further reading](https://otexts.com/fpp2/judgmental-reading.html) - [**5** Time series regression models](https://otexts.com/fpp2/regression.html) - [**5\.1** The linear model](https://otexts.com/fpp2/regression-intro.html) - [**5\.2** Least squares estimation](https://otexts.com/fpp2/least-squares.html) - [**5\.3** Evaluating the regression model](https://otexts.com/fpp2/regression-evaluation.html) - [**5\.4** Some useful predictors](https://otexts.com/fpp2/useful-predictors.html) - [**5\.5** Selecting predictors](https://otexts.com/fpp2/selecting-predictors.html) - [**5\.6** Forecasting with regression](https://otexts.com/fpp2/forecasting-regression.html) - [**5\.7** Matrix formulation](https://otexts.com/fpp2/regression-matrices.html) - [**5\.8** Nonlinear regression](https://otexts.com/fpp2/nonlinear-regression.html) - [**5\.9** Correlation, causation and forecasting](https://otexts.com/fpp2/causality.html) - [**5\.10** Exercises](https://otexts.com/fpp2/regression-exercises.html) - [**5\.11** Further reading](https://otexts.com/fpp2/regression-reading.html) - [**6** Time series decomposition](https://otexts.com/fpp2/decomposition.html) - [**6\.1** Time series components](https://otexts.com/fpp2/components.html) - [**6\.2** Moving averages](https://otexts.com/fpp2/moving-averages.html) - [**6\.3** Classical decomposition](https://otexts.com/fpp2/classical-decomposition.html) - [**6\.4** X11 decomposition](https://otexts.com/fpp2/x11.html) - [**6\.5** SEATS decomposition](https://otexts.com/fpp2/seats.html) - [**6\.6** STL decomposition](https://otexts.com/fpp2/stl.html) - [**6\.7** Measuring strength of trend and seasonality](https://otexts.com/fpp2/seasonal-strength.html) - [**6\.8** Forecasting with decomposition](https://otexts.com/fpp2/forecasting-decomposition.html) - [**6\.9** Exercises](https://otexts.com/fpp2/decomposition-exercises.html) - [**6\.10** Further reading](https://otexts.com/fpp2/decomposition-reading.html) - [**7** Exponential smoothing](https://otexts.com/fpp2/expsmooth.html) - [**7\.1** Simple exponential smoothing](https://otexts.com/fpp2/ses.html) - [**7\.2** Trend methods](https://otexts.com/fpp2/holt.html) - [**7\.3** Holt-Winters’ seasonal method](https://otexts.com/fpp2/holt-winters.html) - [**7\.4** A taxonomy of exponential smoothing methods](https://otexts.com/fpp2/taxonomy.html "7.4 A taxonomy of exponential smoothing methods") - [**7\.5** Innovations state space models for exponential smoothing](https://otexts.com/fpp2/ets.html "7.5 Innovations state space models for exponential smoothing") - [**7\.6** Estimation and model selection](https://otexts.com/fpp2/estimation-and-model-selection.html) - [**7\.7** Forecasting with ETS models](https://otexts.com/fpp2/ets-forecasting.html) - [**7\.8** Exercises](https://otexts.com/fpp2/expsmooth-exercises.html) - [**7\.9** Further reading](https://otexts.com/fpp2/expsmooth-reading.html) - [**8** ARIMA models](https://otexts.com/fpp2/arima.html) - [**8\.1** Stationarity and differencing](https://otexts.com/fpp2/stationarity.html) - [**8\.2** Backshift notation](https://otexts.com/fpp2/backshift.html) - [**8\.3** Autoregressive models](https://otexts.com/fpp2/AR.html) - [**8\.4** Moving average models](https://otexts.com/fpp2/MA.html) - [**8\.5** Non-seasonal ARIMA models](https://otexts.com/fpp2/non-seasonal-arima.html) - [**8\.6** Estimation and order selection](https://otexts.com/fpp2/arima-estimation.html) - [**8\.7** ARIMA modelling in R](https://otexts.com/fpp2/arima-r.html) - [**8\.8** Forecasting](https://otexts.com/fpp2/arima-forecasting.html) - [**8\.9** Seasonal ARIMA models](https://otexts.com/fpp2/seasonal-arima.html) - [**8\.10** ARIMA vs ETS](https://otexts.com/fpp2/arima-ets.html) - [**8\.11** Exercises](https://otexts.com/fpp2/arima-exercises.html) - [**8\.12** Further reading](https://otexts.com/fpp2/arima-reading.html) - [**9** Dynamic regression models](https://otexts.com/fpp2/dynamic.html) - [**9\.1** Estimation](https://otexts.com/fpp2/estimation.html) - [**9\.2** Regression with ARIMA errors in R](https://otexts.com/fpp2/regarima.html) - [**9\.3** Forecasting](https://otexts.com/fpp2/forecasting.html) - [**9\.4** Stochastic and deterministic trends](https://otexts.com/fpp2/stochastic-and-deterministic-trends.html) - [**9\.5** Dynamic harmonic regression](https://otexts.com/fpp2/dhr.html) - [**9\.6** Lagged predictors](https://otexts.com/fpp2/lagged-predictors.html) - [**9\.7** Exercises](https://otexts.com/fpp2/dynamic-exercises.html) - [**9\.8** Further reading](https://otexts.com/fpp2/dynamic-reading.html) - [**10** Forecasting hierarchical or grouped time series](https://otexts.com/fpp2/hierarchical.html "10 Forecasting hierarchical or grouped time series") - [**10\.1** Hierarchical time series](https://otexts.com/fpp2/hts.html) - [**10\.2** Grouped time series](https://otexts.com/fpp2/gts.html) - [**10\.3** The bottom-up approach](https://otexts.com/fpp2/bottom-up.html) - [**10\.4** Top-down approaches](https://otexts.com/fpp2/top-down.html) - [**10\.5** Middle-out approach](https://otexts.com/fpp2/middle-out.html) - [**10\.6** Mapping matrices](https://otexts.com/fpp2/mapping-matrices.html) - [**10\.7** The optimal reconciliation approach](https://otexts.com/fpp2/reconciliation.html) - [**10\.8** Exercises](https://otexts.com/fpp2/hierarchical-exercises.html) - [**10\.9** Further reading](https://otexts.com/fpp2/hierarchical-reading.html) - [**11** Advanced forecasting methods](https://otexts.com/fpp2/advanced.html) - [**11\.1** Complex seasonality](https://otexts.com/fpp2/complexseasonality.html) - [**11\.2** Vector autoregressions](https://otexts.com/fpp2/VAR.html) - [**11\.3** Neural network models](https://otexts.com/fpp2/nnetar.html) - [**11\.4** Bootstrapping and bagging](https://otexts.com/fpp2/bootstrap.html) - [**11\.5** Exercises](https://otexts.com/fpp2/advanced-exercises.html) - [**11\.6** Further reading](https://otexts.com/fpp2/advanced-reading.html) - [**12** Some practical forecasting issues](https://otexts.com/fpp2/practical.html) - [**12\.1** Weekly, daily and sub-daily data](https://otexts.com/fpp2/weekly.html) - [**12\.2** Time series of counts](https://otexts.com/fpp2/counts.html) - [**12\.3** Ensuring forecasts stay within limits](https://otexts.com/fpp2/limits.html) - [**12\.4** Forecast combinations](https://otexts.com/fpp2/combinations.html) - [**12\.5** Prediction intervals for aggregates](https://otexts.com/fpp2/aggregates.html) - [**12\.6** Backcasting](https://otexts.com/fpp2/backcasting.html) - [**12\.7** Very long and very short time series](https://otexts.com/fpp2/long-short-ts.html) - [**12\.8** Forecasting on training and test sets](https://otexts.com/fpp2/forecasting-on-training-and-test-sets.html) - [**12\.9** Dealing with missing values and outliers](https://otexts.com/fpp2/missing-outliers.html) - [**12\.10** Further reading](https://otexts.com/fpp2/further-reading.html) - [Appendix: Using R](https://otexts.com/fpp2/appendix-using-r.html) - [Appendix: For instructors](https://otexts.com/fpp2/appendix-for-instructors.html) - [Appendix: Reviews](https://otexts.com/fpp2/appendix-reviews.html) - [Translations](https://otexts.com/fpp2/translations.html) - [About the authors](https://otexts.com/fpp2/about-the-authors.html) - [Buy a print or downloadable version](https://otexts.com/fpp2/buy-a-print-or-downloadable-version.html) - [Help and feedback](https://otexts.com/fpp2/help-and-feedback.html) - [Bibliography](https://otexts.com/fpp2/bibliography.html) - [Published by OTexts™ with bookdown](https://otexts.com/) Facebook Twitter LinkedIn Weibo Instapaper A A Serif Sans White Sepia Night Spacing - Spacing + # [Forecasting: Principles and Practice (2nd ed)](https://otexts.com/fpp2/) ## 7\.1 Simple exponential smoothing The simplest of the exponentially smoothing methods is naturally called **simple exponential smoothing** (SES)[16](https://otexts.com/fpp2/ses.html#fn16). This method is suitable for forecasting data with no clear trend or seasonal pattern. For example, the data in Figure [7\.1](https://otexts.com/fpp2/ses.html#fig:7-oil) do not display any clear trending behaviour or any seasonality. (There is a rise in the last few years, which might suggest a trend. We will consider whether a trended method would be better for this series later in this chapter.) We have already considered the naïve and the average as possible methods for forecasting such data (Section [3\.1](https://otexts.com/fpp2/simple-methods.html#simple-methods)). ``` oildata <- window(oil, start=1996) autoplot(oildata) + ylab("Oil (millions of tonnes)") + xlab("Year") ``` ![Oil production in Saudi Arabia from 1996 to 2013.](https://otexts.com/fpp2/fpp_files/figure-html/7-oil-1.png) Figure 7.1: Oil production in Saudi Arabia from 1996 to 2013. Using the naïve method, all forecasts for the future are equal to the last observed value of the series, ^yT\+h\|T\=yT, y ^ T \+ h \| T \= y T , for h\=1,2,… 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, ^yT\+h\|T\=1TT∑t\=1yt, y ^ T \+ h \| T \= 1 T ∑ t \= 1 T y t , for h\=1,2,… 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 decrease exponentially as observations come from further in the past — the smallest weights are associated with the oldest observations: ^yT\+1\|T\=αyT\+α(1−α)yT−1\+α(1−α)2yT−2\+⋯,(7.1) (7.1) y ^ T \+ 1 \| T \= α y T \+ α ( 1 − α ) y T − 1 \+ α ( 1 − α ) 2 y T − 2 \+ ⋯ , where 0≤α≤1 0 ≤ α ≤ 1 is the smoothing parameter. The one-step-ahead forecast for time T\+1 T \+ 1 is a weighted average of all of the observations in the series y1,…,yT y 1 , … , y T. The rate at which the weights decrease is controlled by the parameter α α. 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. | | α\=0\.2 α \= 0\.2 | α\=0\.4 α \= 0\.4 | α\=0\.6 α \= 0\.6 | α\=0\.8 α \= 0\.8 | |---|---|---|---|---| | yT y T | 0\.2000 | 0\.4000 | 0\.6000 | 0\.8000 | | yT−1 y T − 1 | 0\.1600 | 0\.2400 | 0\.2400 | 0\.1600 | | yT−2 y T − 2 | 0\.1280 | 0\.1440 | 0\.0960 | 0\.0320 | | yT−3 y T − 3 | 0\.1024 | 0\.0864 | 0\.0384 | 0\.0064 | | yT−4 y T − 4 | 0\.0819 | 0\.0518 | 0\.0154 | 0\.0013 | | yT−5 y T − 5 | 0\.0655 | 0\.0311 | 0\.0061 | 0\.0003 | 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 α \= 1, ^yT\+1\|T\=yT y ^ T \+ 1 \| T \= y T, and the forecasts are equal to the naïve forecasts. We present two equivalent forms of simple exponential smoothing, each of which leads to the forecast Equation [(7.1)](https://otexts.com/fpp2/ses.html#eq:7-ses). ### Weighted average form The forecast at time T\+1 T \+ 1 is equal to a weighted average between the most recent observation yT y T and the previous forecast ^yT\|T−1 y ^ T \| T − 1: ^yT\+1\|T\=αyT\+(1−α)^yT\|T−1, y ^ T \+ 1 \| T \= α y T \+ ( 1 − α ) y ^ T \| T − 1 , where 0≤α≤1 0 ≤ α ≤ 1 is the smoothing parameter. Similarly, we can write the fitted values as ^yt\+1\|t\=αyt\+(1−α)^yt\|t−1, y ^ t \+ 1 \| t \= α y t \+ ( 1 − α ) y ^ t \| t − 1 , for t\=1,…,T 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 ℓ 0 (which we will have to estimate). Then ^y2\|1\=αy1\+(1−α)ℓ0^y3\|2\=αy2\+(1−α)^y2\|1^y4\|3\=αy3\+(1−α)^y3\|2⋮^yT\|T−1\=αyT−1\+(1−α)^yT−1\|T−2^yT\+1\|T\=αyT\+(1−α)^yT\|T−1. y ^ 2 \| 1 \= α y 1 \+ ( 1 − α ) ℓ 0 y ^ 3 \| 2 \= α y 2 \+ ( 1 − α ) y ^ 2 \| 1 y ^ 4 \| 3 \= α y 3 \+ ( 1 − α ) y ^ 3 \| 2 ⋮ y ^ T \| T − 1 \= α y T − 1 \+ ( 1 − α ) y ^ T − 1 \| T − 2 y ^ T \+ 1 \| T \= α y T \+ ( 1 − α ) y ^ T \| T − 1 . Substituting each equation into the following equation, we obtain ^y3\|2\=αy2\+(1−α)\[αy1\+(1−α)ℓ0\]\=αy2\+α(1−α)y1\+(1−α)2ℓ0^y4\|3\=αy3\+(1−α)\[αy2\+α(1−α)y1\+(1−α)2ℓ0\]\=αy3\+α(1−α)y2\+α(1−α)2y1\+(1−α)3ℓ0 ⋮^yT\+1\|T\=T−1∑j\=0α(1−α)jyT−j\+(1−α)Tℓ0. y ^ 3 \| 2 \= α y 2 \+ ( 1 − α ) \[ α y 1 \+ ( 1 − α ) ℓ 0 \] \= α y 2 \+ α ( 1 − α ) y 1 \+ ( 1 − α ) 2 ℓ 0 y ^ 4 \| 3 \= α y 3 \+ ( 1 − α ) \[ α y 2 \+ α ( 1 − α ) y 1 \+ ( 1 − α ) 2 ℓ 0 \] \= α y 3 \+ α ( 1 − α ) y 2 \+ α ( 1 − α ) 2 y 1 \+ ( 1 − α ) 3 ℓ 0 ⋮ y ^ T \+ 1 \| T \= ∑ j \= 0 T − 1 α ( 1 − α ) j y T − j \+ ( 1 − α ) T ℓ 0 . The last term becomes tiny for large T T. So, the weighted average form leads to the same forecast Equation [(7.1)](https://otexts.com/fpp2/ses.html#eq:7-ses). ### Component form An alternative representation is the component form. For simple exponential smoothing, the only component included is the level, ℓt ℓ t. (Other methods which are considered later in this chapter may also include a trend bt b t and a seasonal component st s t.) Component form representations of exponential smoothing methods comprise a 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: Forecast equation^yt\+h\|t\=ℓtSmoothing equationℓt\=αyt\+(1−α)ℓt−1, Forecast equation y ^ t \+ h \| t \= ℓ t Smoothing equation ℓ t \= α y t \+ ( 1 − α ) ℓ t − 1 , where ℓt ℓ t is the level (or the smoothed value) of the series at time t t. Setting h\=1 h \= 1 gives the fitted values, while setting t\=T t \= T gives the true forecasts beyond the training data. The forecast equation shows that the forecast value at time t\+1 t \+ 1 is the estimated level at time t 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 t. If we replace ℓt ℓ t with ^yt\+1\|t y ^ t \+ 1 \| t and ℓt−1 ℓ t − 1 with ^yt\|t−1 y ^ t \| t − 1 in the smoothing equation, we will recover the weighted average form of simple exponential smoothing. The component form of simple exponential smoothing is not particularly useful, but it will be the easiest form to use when we start adding other components. ### Flat forecasts Simple exponential smoothing has a “flat” forecast function: ^yT\+h\|T\=^yT\+1\|T\=ℓT,h\=2,3,…. y ^ T \+ h \| T \= y ^ T \+ 1 \| T \= ℓ T , h \= 2 , 3 , … . 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 The application of every exponential smoothing method requires the smoothing parameters and the initial values to be chosen. In particular, for simple exponential smoothing, we need to select the values of α α and ℓ0 ℓ 0. All forecasts can be computed from the data once we know those values. For the methods that follow there is usually more than one smoothing parameter and more than one initial component to be chosen. In some cases, the smoothing parameters may be chosen in a subjective manner — the forecaster specifies the value of the smoothing parameters based on previous experience. However, a more reliable and objective way to obtain values for the unknown parameters is to estimate them from the observed data. In Section [5\.2](https://otexts.com/fpp2/least-squares.html#least-squares), we estimated the coefficients of a regression model by minimising the sum of the squared residuals (usually known as SSE or “sum of squared errors”). Similarly, the unknown parameters and the initial values for any exponential smoothing method can be estimated by minimising the SSE. The residuals are specified as et\=yt−^yt\|t−1 e t \= y t − y ^ t \| t − 1 for t\=1,…,T t \= 1 , … , T. Hence, we find the values of the unknown parameters and the initial values that minimise SSE\=T∑t\=1(yt−^yt\|t−1)2\=T∑t\=1e2t.(7.2) (7.2) SSE \= ∑ t \= 1 T ( y t − y ^ t \| t − 1 ) 2 \= ∑ t \= 1 T e t 2 . 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. ### Example: Oil production In this example, simple exponential smoothing is applied to forecast oil production in Saudi Arabia. ``` oildata <- window(oil, start=1996) # Estimate parameters fc <- ses(oildata, h=5) # Accuracy of one-step-ahead training errors round(accuracy(fc),2) #> ME RMSE MAE MPE MAPE MASE ACF1 #> Training set 6.4 28.12 22.26 1.1 4.61 0.93 -0.03 ``` This gives parameter estimates ^α\=0\.83 α ^ \= 0\.83 and ^ℓ0\=446\.6 ℓ ^ 0 \= 446\.6, obtained by minimising SSE over periods t\=1,2,…,18 t \= 1 , 2 , … , 18, subject to the restriction that 0≤α≤1 0 ≤ α ≤ 1. In Table [7\.1](https://otexts.com/fpp2/ses.html#tab:oilses) we demonstrate the calculation using these parameters. The second last column shows the estimated level for times t\=0 t \= 0 to t\=18 t \= 18; the last few rows of the last column show the forecasts for h\=1,2,3,4,5 h \= 1 , 2 , 3 , 4 , 5. | Year | Time | Observation | Level | Forecast | |---|---|---|---|---| | | t t | yt y t | ℓt ℓ t | ^yt\|t−1 y ^ t \| t − 1 | | 1995 | 0 | | 446\.59 | | | 1996 | 1 | 445\.36 | 445\.57 | 446\.59 | | 1997 | 2 | 453\.20 | 451\.93 | 445\.57 | | 1998 | 3 | 454\.41 | 454\.00 | 451\.93 | | 1999 | 4 | 422\.38 | 427\.63 | 454\.00 | | 2000 | 5 | 456\.04 | 451\.32 | 427\.63 | | 2001 | 6 | 440\.39 | 442\.20 | 451\.32 | | 2002 | 7 | 425\.19 | 428\.02 | 442\.20 | | 2003 | 8 | 486\.21 | 476\.54 | 428\.02 | | 2004 | 9 | 500\.43 | 496\.46 | 476\.54 | | 2005 | 10 | 521\.28 | 517\.15 | 496\.46 | | 2006 | 11 | 508\.95 | 510\.31 | 517\.15 | | 2007 | 12 | 488\.89 | 492\.45 | 510\.31 | | 2008 | 13 | 509\.87 | 506\.98 | 492\.45 | | 2009 | 14 | 456\.72 | 465\.07 | 506\.98 | | 2010 | 15 | 473\.82 | 472\.36 | 465\.07 | | 2011 | 16 | 525\.95 | 517\.05 | 472\.36 | | 2012 | 17 | 549\.83 | 544\.39 | 517\.05 | | 2013 | 18 | 542\.34 | 542\.68 | 544\.39 | | | h h | | | ^yT\+h\|T y ^ T \+ h \| T | | 2014 | 1 | | | 542\.68 | | 2015 | 2 | | | 542\.68 | | 2016 | 3 | | | 542\.68 | | 2017 | 4 | | | 542\.68 | | 2018 | 5 | | | 542\.68 | The black line in Figure [7\.2](https://otexts.com/fpp2/ses.html#fig:ses) is a plot of the data, which shows a changing level over time. ``` autoplot(fc) + autolayer(fitted(fc), series="Fitted") + ylab("Oil (millions of tonnes)") + xlab("Year") ``` ![Simple exponential smoothing applied to oil production in Saudi Arabia (1996--2013).](https://otexts.com/fpp2/fpp_files/figure-html/ses-1.png) Figure 7.2: Simple exponential smoothing applied to oil production in Saudi Arabia (1996–2013). The forecasts for the period 2014–2018 are plotted in Figure [7\.2](https://otexts.com/fpp2/ses.html#fig:ses). Also plotted are one-step-ahead fitted values alongside the data over the period 1996–2013. The large value of α α in this example is reflected in the large adjustment that takes place in the estimated level ℓt ℓ 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 [7\.7](https://otexts.com/fpp2/ets-forecasting.html#ets-forecasting). The prediction intervals show that there is considerable uncertainty in the future values of oil production over the five-year forecast period. So interpreting the point forecasts without accounting for the large uncertainty can be very misleading. *** 1. In some books it is called “single exponential smoothing”.[↩︎](https://otexts.com/fpp2/ses.html#fnref16)
Readable Markdownnull
Shard36 (laksa)
Root Hash13347583336389170836
Unparsed URLcom,otexts!/fpp2/ses.html s443