ETS (Exponential Smoothing) › Formula
Machine Learning from ScratchAll chapters ETS (Exponential Smoothing) › FormulaOne section · Sections in this chapter2 / 8 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Imagine you're trying to predict tomorrow's temperature. You could use today's temperature, but that might be too volatile. One unusually hot day doesn't mean tomorrow will be hot. You could average all past temperatures, but that treats a temperature from last month the same as yesterday's, ignoring that recent weather is more relevant. What you need is a method that gives more weight to recent observations while still learning from the entire history. This is precisely the problem exponential smoothing solves.
The fundamental challenge in time series forecasting is creating a balance between two competing needs: responsiveness to recent changes and stability from historical patterns. If we're too responsive, random fluctuations will distort our forecasts. If we're too stable, we'll miss real changes in the underlying pattern. Exponential smoothing achieves this balance through a mathematical mechanism that automatically weights historical data, with weights decreasing exponentially as we look further into the past.
Before diving into the formula, let's understand why simple approaches fail. A naive method might be to use the most recent observation as our forecast. If sales were 100 units last month, forecast 100 for next month. This is responsive but ignores all historical information. Alternatively, we could use a simple average of all past observations, but this treats a sales figure from five years ago the same as last month's, which doesn't make sense when patterns evolve over time.
What we need is a method that gives more weight to recent observations (they're more informative about the current state), still incorporates all historical data (distant past provides context about long-term patterns), adapts automatically (doesn't require manually deciding how many periods to include), and is computationally efficient (can update forecasts quickly as new data arrives). Exponential smoothing achieves all of these goals through a single recursive formula that combines the current observation with the previous forecast.
Simple Exponential Smoothing: The Foundation
The fundamental exponential smoothing formula is deceptively simple:
where:
- is the forecast for time period (made at time )
- is the actual observation at time
- is the forecast for time (made at time )
- is the smoothing parameter (between 0 and 1), controlling the weight given to the most recent observation
At first glance, this formula might seem arbitrary. Why combine the current observation and previous forecast in this particular way? The answer lies in understanding what represents: it's a weighted summary of all past observations. Combining it with the current observation creates a new weighted summary that includes all historical data, with the most recent observation receiving the highest weight.
The formula ensures that the weights on all past observations sum to 1 (making it a proper weighted average), recent observations automatically receive higher weights than distant ones, the method can be computed recursively (we only need the previous forecast, not the entire history), and the balance between recent and historical data is controlled by a single parameter .
We can rewrite the formula to reveal a different but equally important interpretation:
This form shows exponential smoothing as an error-correction mechanism. The term is the forecast error, the difference between the prediction and the observed value. When this error is positive (actual value exceeds forecast), we adjust our forecast upward. When it's negative (actual value falls short), we adjust downward.
The parameter controls how much of the error we incorporate. If , we adjust our forecast by 30% of the error. If , we adjust by 90% of the error, making the forecast much more responsive to recent discrepancies. This error-correction view helps explain why exponential smoothing adapts to changes in the underlying pattern: when the pattern shifts, forecast errors increase, and the method automatically adjusts to reduce future errors.

The smoothing parameter is the single most important control in exponential smoothing. It's the "control knob" that determines how the method balances competing objectives. The parameter determines the split between the current observation and the historical summary. When , we give 30% weight to the current observation and 70% to the historical summary. When , we give 70% to the current observation and 30% to history.
When is close to 1 (e.g., 0.9), the model becomes highly responsive to recent changes. Each new observation has a major impact on the forecast. This is useful when the underlying pattern changes frequently, recent observations are highly informative about future values, or you need to quickly adapt to new information. However, high values also make forecasts sensitive to random noise, potentially creating volatile predictions that overreact to temporary fluctuations.
When is close to 0 (e.g., 0.1), the model becomes very stable, giving most weight to historical patterns. Forecasts change slowly and are less affected by individual observations. This is useful when the underlying pattern is relatively stable, random fluctuations are common and should be filtered out, or historical patterns are reliable predictors. However, low values can make the model too slow to adapt when the pattern changes, causing forecasts to lag behind actual values.
When , this represents a balanced approach where equal weight is given to the current observation and the historical summary. It's often a good starting point when you're unsure about the optimal value. The optimal value depends on your specific time series characteristics. For stable series with low noise (like slowly changing inventory levels), lower values (0.1-0.3) work well. For series with frequent changes or when recent observations are highly informative (like stock prices or demand for trending products), higher values (0.5-0.9) are more appropriate. The key is finding the value that balances responsiveness with stability for your particular data.
Mathematical Derivation: Why "Exponential"?
The name "exponential smoothing" comes from a fundamental mathematical property that becomes clear when we "unpack" the recursive formula. The formula is recursive because itself was computed using the same formula. This recursion means that contains information about all previous observations. To see exactly how this works, let's trace through the recursion.
Starting with the basic formula:
We know that was computed as:
Substituting this into the original formula:
Expanding and simplifying:
We can continue this process, substituting for , then , and so on. After continuing this recursive substitution indefinitely, we eventually arrive at:
This expansion reveals the true nature of exponential smoothing: it's a weighted average of all past observations, where the weights decrease exponentially as we look further back in time:
- Weight for (most recent):
- Weight for (one period back):
- Weight for (two periods back):
- Weight for (three periods back):
- Weight for (k periods back):
The term creates the exponential decay. Since , we have , which means each power of is smaller than the previous one, creating the exponential decrease in weights as increases.
This mathematical structure provides two important insights. First, computational efficiency: even though the formula uses all historical data, we only need to store the previous forecast and the current observation to compute the next forecast. We don't need to store or access the entire history because the recursion automatically incorporates it.
Second, theoretical soundness: the weights sum to 1, confirming this is a proper weighted average:
where the geometric series sum holds because when .
This geometric series sum ensures that all historical information is properly incorporated, with more recent observations receiving appropriately higher weights. The exponential decay pattern means that while recent observations dominate the forecast, distant observations still contribute, though their influence diminishes exponentially. This is the behavior we want: recent data is most relevant, but historical context still matters.
When Simple Exponential Smoothing Falls Short: The Trend Problem
Simple exponential smoothing works well when a time series fluctuates around a relatively stable level. But what happens when your data shows a clear upward or downward trend? Imagine forecasting monthly sales that have been growing steadily at 5% per month. Simple exponential smoothing will consistently under-predict because it assumes the future will be similar to the recent average, not accounting for the systematic upward movement.
When a trend exists, simple exponential smoothing creates a persistent lag. If sales are growing, the forecast will typically be below the actual value because the method follows the trend rather than anticipating it. This systematic bias makes forecasts unreliable for trending series.

We need to separate two distinct pieces of information: where we are now (the level) and where we're heading (the trend). By tracking both separately, we can forecast the current position and project forward along the trend line. This is what double exponential smoothing (Holt's method) does.
Double Exponential Smoothing (Holt's Method): Tracking Level and Trend
Holt's method extends simple exponential smoothing by introducing a second component: the trend. Instead of just tracking a single smoothed value, we now maintain two separate estimates that work together. The level component () represents the current baseline value, similar to what simple exponential smoothing tracks, but now adjusted for trend. The trend component () represents the rate of change, or how much the level is increasing or decreasing per period.
The method uses three equations that update these components recursively. The level equation:
updates the level by combining the current observation with the trend-adjusted previous level. Notice the term : we use the previous level plus the trend. This accounts for the fact that if there's an upward trend, the level should have increased since the last period. The parameter controls how much weight we give to the current observation versus this trend-adjusted historical level.
The trend equation:
estimates the current trend by looking at how much the level changed () and combining it with the previous trend estimate. If the level increased by 5 units, that suggests a positive trend. The parameter controls how quickly the trend estimate adapts: high means we quickly adjust to changes in the trend direction, while low creates a more stable trend estimate that's less affected by short-term fluctuations.
The forecast equation:
projects forward by starting with the current level and adding the trend multiplied by the number of periods. If the trend is +5 units per period and we're forecasting 3 periods ahead, we add 15 units to the current level. This simple linear projection captures the essence of trending behavior.
where:
- is the level component at time (the current baseline value, deseasonalized if seasonality is present)
- is the trend component at time (the rate of change per period, measured in units per period)
- is the level smoothing parameter (between 0 and 1), controlling how much weight is given to the current observation when updating the level
- is the trend smoothing parameter (between 0 and 1), controlling how quickly the trend estimate adapts to changes in the level
- is the forecast horizon (number of periods ahead to forecast, where )
By separating level and trend, Holt's method can simultaneously track "where we are" and "where we're going." The level equation ensures we stay current with the data, while the trend equation ensures we account for systematic movement. Together, they create forecasts that anticipate future values along the trend line, eliminating the lag problem that plagues simple exponential smoothing on trending data.

Triple Exponential Smoothing (Holt-Winters Method): Adding Seasonality
Many real-world time series exhibit both trend and seasonality, which are repeating patterns that occur at regular intervals. Think of monthly retail sales that grow over time (trend) but also spike every December (seasonality). Or daily energy consumption that increases year-over-year (trend) but follows weekly patterns (seasonality). When both trend and seasonality are present, double exponential smoothing still struggles because it doesn't account for the systematic seasonal variations.
Seasonal patterns create systematic variations that repeat at regular intervals. For example, if you're forecasting monthly sales with annual seasonality, December sales are consistently higher than average, while January sales are consistently lower. If we ignore seasonality, our forecasts will be too low in December and too high in January, even if we correctly capture the trend.
The Holt-Winters method (triple exponential smoothing) extends Holt's method by adding a third component. The level () is the deseasonalized baseline value. The trend () is the rate of change in the deseasonalized level. The seasonality () is the seasonal factor that adjusts the level up or down depending on the position in the seasonal cycle.
To properly track level and trend in the presence of seasonality, we need to remove the seasonal effects first. This is called deseasonalization. Once we have the deseasonalized level and trend, we can then reapply the appropriate seasonal factor when making forecasts.
Holt-Winters uses four equations that work together. The level equation:
first deseasonalizes the current observation by dividing by the seasonal factor from the same period in the previous cycle (). The subscript refers to the seasonal factor from periods ago, where is the seasonal period length. For example, if we're updating the level in December (month 12) and (annual seasonality), we divide by last December's seasonal factor ( for the first cycle, or for subsequent cycles). This removes the seasonal effect, giving us the "true" level. We then combine this deseasonalized observation with the trend-adjusted previous level, just like in Holt's method.
If December sales are typically 150% of average (seasonal factor = 1.5), then actual December sales of 150 units represent a deseasonalized level of 150/1.5 = 100 units. This deseasonalized value is what we use to update the level.
The trend equation:
works exactly like in Holt's method, tracking the rate of change in the deseasonalized level. Since we're working with deseasonalized values, the trend represents the true underlying growth or decline, not seasonal fluctuations.
The seasonal equation:
estimates the current seasonal factor by comparing the actual observation to the level. The ratio tells us how much higher or lower the actual value is compared to the deseasonalized level. We then combine this with the seasonal factor from the same period in the previous cycle (), using the parameter to control how quickly seasonal patterns adapt to changes.
If the level is 100 and actual sales are 150, the seasonal factor is 150/100 = 1.5, meaning this period is 50% above the deseasonalized level. By comparing to the level (not the previous seasonal factor), we ensure the seasonal factor captures the true seasonal effect relative to the current baseline.
The forecast equation:
first projects the level forward using the trend (just like Holt's method), then multiplies by the appropriate seasonal factor for the forecast period. The seasonal factor uses the factor from the same position in the seasonal cycle. The subscript ensures we use the seasonal factor from the corresponding period in the most recent complete seasonal cycle. For example, if we're forecasting 3 months ahead from October (month 10), and the seasonal period is months, we use the seasonal factor from month (January). If , we use the seasonal factor from the previous cycle by adding to the index.
Holt-Winters separates the series into components. It tracks the underlying deseasonalized level (where the series would be without seasonal effects), the trend in that level (the true growth or decline), and seasonal patterns (how each period in the cycle differs from the baseline), then combines them to create accurate forecasts. This structure makes Holt-Winters one of the most versatile exponential smoothing methods, capable of handling complex time series with systematic trends and repeating seasonal cycles.

The parameters are:
- : Seasonal component at time (the seasonal factor for this period, typically a multiplicative factor like 1.2 for 20% above average or 0.8 for 20% below average)
- : Seasonal smoothing parameter (between 0 and 1), controlling how quickly seasonal patterns adapt to changes
- : Seasonal period length (the number of periods in one complete seasonal cycle, e.g., for monthly data with annual seasonality, for daily data with weekly patterns, for quarterly data with annual seasonality)
Mathematical Properties: Why Exponential Smoothing Works
Understanding the mathematical properties of exponential smoothing helps explain why it's both theoretically sound and practically effective. These properties directly relate to the method's behavior and reliability.
As the number of observations increases, the exponential smoothing formula converges to a stable forecast that reflects the underlying pattern in the data. This means that after processing enough data, the forecast becomes relatively stable and doesn't jump around wildly with each new observation. This convergence property is important for practical applications because the method becomes more reliable as more data accumulates, forecasts stabilize around the true underlying pattern, and the method is suitable for ongoing, long-term forecasting applications.
Simple exponential smoothing is unbiased for constant level time series, meaning it produces forecasts that are correct on average when the underlying process has no trend or seasonality. This means that if you forecast many periods, the average of your forecasts will equal the average of the actual values. This unbiasedness property is important because it means the method doesn't systematically over- or under-predict. Errors cancel out over time.
However, this unbiasedness holds only for constant level series. When trends or seasonality are present, simple exponential smoothing becomes biased (it systematically lags behind), which is why we need Holt's method or Holt-Winters.
The forecast variance increases with the forecast horizon. This means that one-step-ahead forecasts have relatively low variance (we're fairly certain about the immediate future), multi-step-ahead forecasts have higher variance (we're less certain about the distant future), and this property aligns with our intuition that near-term forecasts are typically more reliable than long-term ones.
This increasing variance is a natural consequence of the exponential smoothing structure: as we project further into the future, small errors in our current estimates compound, leading to greater uncertainty.
Under certain statistical conditions (specifically, when the time series follows an exponential smoothing model), the method provides optimal forecasts in the sense of minimizing expected forecast error. This means that, for the class of time series it's designed to handle, exponential smoothing produces the best possible forecasts (in terms of minimizing expected squared error) among all possible forecasting methods.
This optimality property provides a strong theoretical foundation for the method's widespread practical use. It tells us that when the underlying data generating process matches the exponential smoothing model, we're using the theoretically optimal method.
Together, these properties explain why exponential smoothing is both theoretically sound and practically useful: convergence ensures stability and reliability, unbiasedness (for appropriate models) ensures accuracy on average, increasing variance correctly reflects our uncertainty about the future, and optimality provides confidence that we're using the best method for the right type of data. Understanding these properties helps us know when exponential smoothing is appropriate and what we can expect from it in practice.