Time-Series Analysis and ForecastingIntroductionA time series is a sequence of observations recorded in chronological order, such as daily website visits, monthly sales, quarterly revenue, hourly electricity demand, or annual employment. Time-series analysis helps an organisation understand how a variable changes over time and use that information to support planning, budgeting, inventory control, staffing and risk management. Forecasting does not mean predicting the future with certainty. It means producing a systematic estimate of an unknown future value, together with an understanding of the likely error around that estimate. A responsible analyst therefore studies both the forecast and its uncertainty. Time-series analysis differs from ordinary cross-sectional analysis because the order of observations matters. Sales in December may be related to sales in November, and electricity demand at 6 p.m. may be related to demand at 5 p.m. This dependence is called serial or temporal dependence. Learning ObjectivesBy the end of this chapter, you should be able to: - distinguish trend, seasonal, cyclical and irregular movements;
- prepare and interpret time-series data;
- calculate and explain moving averages;
- apply naïve forecasting, simple exponential smoothing and trend models;
- compare forecasts using appropriate error measures;
- recognise assumptions, limitations and sources of forecast uncertainty;
- communicate forecasts clearly for managerial decision-making.
1. Components of a Time SeriesA time series is commonly represented as Yt, where t identifies the time period and Yt is the observed value. Four broad movements are useful for interpretation. TrendTrend is the long-term direction of a series. It may be upward, downward or approximately constant. For example, an online retailer may experience increasing annual orders as its customer base expands. Trend can arise from population growth, technological change, inflation, changing tastes, investment or market development. A trend is not necessarily a straight line; growth may accelerate, slow or reverse. Seasonal movementSeasonality is a regular pattern that repeats within a fixed calendar period. Examples include higher retail sales in December, increased hotel occupancy during summer and weekday–weekend differences in transport demand. If monthly data are used, the seasonal period may be 12; for quarterly data it is usually 4; for daily data it may be 7 when the relevant pattern is weekly. Seasonality should be distinguished from a one-time event. A festival that occurs every year may create seasonality, whereas a single unexpected closure is irregular movement. Cyclical movementA cycle is a wave-like movement over an extended period, often associated with economic expansion and contraction. Unlike seasonality, a cycle does not have a fixed, known length. Business cycles may last several years and are difficult to forecast because their timing and duration vary. Irregular or random movementIrregular movement, often called noise, consists of unpredictable fluctuations caused by accidents, extreme weather, strikes, sudden policy changes or measurement error. A good forecasting method reduces the influence of random variation but cannot eliminate genuine uncertainty. A useful conceptual decomposition is: - Additive model: observed value = level/trend + seasonal effect + cyclical effect + irregular effect.
- Multiplicative model: observed value = level/trend × seasonal effect × cyclical effect × irregular effect.
The additive form is more appropriate when seasonal variation is roughly constant in absolute size. The multiplicative form is appropriate when seasonal variation grows with the level of the series. For example, a seasonal increase of about 500 units suggests an additive structure, while a seasonal increase of about 20% suggests a multiplicative structure. 2. Preparing Time-Series DataForecast quality is strongly affected by data preparation. Before selecting a method, an analyst should: - define the forecasting variable and its unit;
- identify the time interval and ensure observations are correctly ordered;
- check missing values, duplicate dates and inconsistent measurement definitions;
- investigate outliers and unusual events;
- plot the series;
- identify whether the data are continuous, intermittent, seasonal or strongly trending;
- separate information available at the forecast date from information that became available later.
The final point prevents data leakage. Using future information when constructing a historical forecast produces an unrealistically good result. A line chart is usually the first diagnostic tool. It can reveal trend, seasonal repetition, changing variability and abrupt structural breaks. A forecast should not be produced solely from a numerical formula without examining the data-generating context. 3. Baseline Forecasting MethodsSimple baseline methods are valuable because they are transparent and provide benchmarks for more complex models. Naïve forecastThe naïve method uses the most recent observation as the next forecast: Ft+1 = Yt Here, Ft+1 is the forecast for the next period and Yt is the latest observed value. This method is suitable when the series behaves like a random walk or when a simple benchmark is required. For seasonal data, the seasonal naïve method uses the observation from the corresponding previous season: Ft+h = Yt+h-m where h is the forecast horizon and m is the seasonal period, such as 12 for monthly seasonality. For example, the forecast for March next year may equal the observed sales in March this year. Drift methodA drift forecast extends the average change between the first and last observations: FT+h = YT + h × (YT - Y1)/(T - 1) where T is the last observed period, Y1 is the first observation, and h is the number of periods ahead. The method assumes that the average historical rate of change will continue. 4. Moving AveragesA moving average smooths short-term fluctuations by averaging a fixed number of recent observations. A simple k-period moving average is: MAt = (Yt + Yt-1 + ⋯ + Yt-k+1)/k Here, k is the window length. All observations receive equal weight. A moving average with a larger window produces greater smoothing but responds more slowly to changes. Worked example: three-period moving averageSuppose monthly demand is: | Month | Demand |
|---|
| January | 120 | | February | 132 | | March | 126 | | April | 144 | | May | 150 |
The forecast for April, based on January–March, is: FApril = (120 + 132 + 126)/3 = 126 The forecast for May, based on February–April, is: FMay = (132 + 126 + 144)/3 = 134 The forecast for June, based on March–May, is: FJune = (126 + 144 + 150)/3 = 140 The moving average smooths the increase from 126 to 150, so it is less reactive than the original data. This is useful for identifying underlying direction, but it creates lag when the series is changing rapidly. Weighted moving averageA weighted moving average assigns greater importance to selected observations: Ft+1 = w1Yt + w2Yt-1 + ⋯ + wkYt-k+1 The weights must satisfy wi ≥ 0 and ∑wi = 1. If recent demand is more informative, the largest weight is normally assigned to Yt. For example, using weights 0.5, 0.3 and 0.2 for the latest three months, with April, March and February demand of 144, 126 and 132: FMay = 0.5(144) + 0.3(126) + 0.2(132) = 72 + 37.8 + 26.4 = 136.2 The weighted forecast is 136.2 units. The weights are a modelling choice and should be selected using historical validation, domain knowledge or both. 5. Exponential SmoothingSimple exponential smoothingSimple exponential smoothing is designed for data with no systematic trend or seasonality. It updates the level by combining the latest observation with the previous forecast: Ft+1 = αYt + (1 - α)Ft where 0 ≤ α ≤ 1 is the smoothing constant, Yt is the current observation and Ft is the forecast for the current period. A large α responds quickly to recent changes; a small α produces greater smoothing. The initial forecast F1 must be specified, often as the first observation or an average of early observations. Different initialisation choices can affect short series, so the choice should be documented. Worked example: exponential smoothingAssume α = 0.30, the forecast for period 1 is 100, and actual demand in periods 1 and 2 is 110 and 120. F2 = 0.30(110) + 0.70(100) = 103 F3 = 0.30(120) + 0.70(103) = 108.1 The forecast for period 3 is 108.1 units. It remains below the latest actual value because the method retains information from earlier periods. Simple exponential smoothing is not appropriate by itself when persistent trend or seasonality is present. It will generally lag behind a trend. Trend-adjusted and seasonal smoothingWhen a series has trend, Holt’s method estimates both a level and a trend. One common form is: ℓt = αYt + (1 - α)(ℓt-1 + bt-1) bt = β(ℓt - ℓt-1) + (1 - β)bt-1 Ft+h = ℓt + hbt Here, ℓt is the estimated level, bt is the estimated trend, α and β are smoothing parameters between 0 and 1, and h is the forecast horizon. The additive trend form assumes that the trend adds approximately the same number of units per period. When both trend and seasonality exist, a seasonal extension such as Holt–Winters exponential smoothing may be used. Additive seasonality assumes a constant seasonal amount; multiplicative seasonality assumes a seasonal proportion related to the level. These methods require enough historical cycles to estimate seasonal effects reliably. 6. Trend Models and RegressionA basic linear trend model represents the expected value as a function of time: Yt = a + bt + εt Here, a is the intercept, b is the estimated change per time unit, t is a time index, and εt is the error term. The fitted trend is: Ŷt = â + b̂t The slope can be estimated by ordinary least squares: b̂ = ∑(t - t̄)(Yt - Ȳ) / ∑(t - t̄)2 â = Ȳ - b̂t̄ where t̄ and Ȳ are the means of the time index and observations. The slope has the same units as Yt per time period. A linear trend is useful when the change is approximately constant. It can be misleading when growth is proportional, when a turning point is approaching or when external drivers are omitted. A polynomial or logarithmic transformation may sometimes be considered, but extra flexibility increases the risk of overfitting. Regression can also include explanatory variables, such as price, advertising expenditure, temperature or economic indicators. A model may be written as: Yt = a + b1X1t + b2X2t + εt Such models are often called causal or explanatory forecasting models. They require future values, or forecasts, of the explanatory variables. They also require attention to autocorrelation, omitted variables, multicollinearity and structural change. 7. Forecast Errors and EvaluationA forecast error is the actual value minus the forecast: et = Yt - Ft A positive error means the forecast underestimated the actual value; a negative error means it overestimated it. Important measures include: | Measure | Formula | Interpretation |
|---|
| Mean Error (ME) | ME = ∑et/n | Bias; positive values indicate under-forecasting on average | | Mean Absolute Error (MAE) | [[MATH:MAE = ∑ | e_t | | Mean Squared Error (MSE) | MSE = ∑et2/n | Penalises large errors more heavily | | Root Mean Squared Error (RMSE) | RMSE = √MSE | Error magnitude in original units | | Mean Absolute Percentage Error (MAPE) | [[MATH:MAPE = 100 × ∑( | e_t/Y_t |
Here, n is the number of evaluated forecasts. MAE and RMSE are expressed in the units of the series. MSE is expressed in squared units. MAPE is undefined when Yt = 0 and can be unstable when actual values are close to zero. For intermittent demand, scaled measures or MAE may be preferable. Forecasts should be evaluated on observations that were not used to estimate the model. A chronological holdout set is usually more realistic than randomly shuffling time-series observations. Rolling-origin evaluation repeatedly trains on an earlier period and tests on the next period, allowing performance across multiple forecast origins to be assessed. No single metric is always best. A hospital may care more about under-predicting demand than over-predicting it. A retailer may use a weighted loss function because stockouts are more costly than excess inventory. 8. Forecast Uncertainty and CommunicationA point forecast is only one possible future outcome. Uncertainty increases as the forecast horizon becomes longer and may also increase when the environment is unstable. Forecast intervals provide a range of plausible future values. A general interval can be expressed as: Point forecast ± critical value × standard error of forecast The exact standard error depends on the forecasting model and assumptions. An interval is not a guarantee that the future value will lie inside it. If a 95% interval is correctly calibrated over many comparable forecasts, approximately 95% of such intervals would contain the realised value in the long run. A professional forecast report should state: - the forecast period and unit;
- the method and key assumptions;
- the point forecast and, where possible, an interval;
- the historical evaluation results;
- important risks, events and data limitations;
- the action that management should consider.
Charts should distinguish actual observations, fitted values and forecasts. Analysts should avoid presenting excessive decimal places or implying certainty through a single precise number. 9. Illustrative Case: Forecasting Regional Bakery DemandBackgroundA regional bakery supplies bread to supermarkets. Management must plan flour purchases and staffing for the next month. Monthly demand for the last five months was 1,200, 1,260, 1,230, 1,320 and 1,350 loaves. The data show an upward tendency but only five observations are available, so strong claims about seasonality cannot yet be justified. ProblemThe bakery needs a transparent forecast for month 6. Under-forecasting may cause stockouts, while over-forecasting may create waste. AnalysisA three-month moving-average forecast is: F6 = (1,230 + 1,320 + 1,350)/3 = 1,300 loaves A naïve forecast would be 1,350 loaves. The moving average is smoother but lags behind the apparent increase. Suppose simple exponential smoothing is used with α = 0.40 and the forecast for month 2 is 1,200. Sequentially: F3 = 0.40(1,260) + 0.60(1,200) = 1,224 F4 = 0.40(1,230) + 0.60(1,224) = 1,226.4 F5 = 0.40(1,320) + 0.60(1,226.4) = 1,263.84 F6 = 0.40(1,350) + 0.60(1,263.84) = 1,298.064 This is approximately 1,298 loaves, close to the moving-average forecast. Because the series appears to trend upward, management should also test a trend-adjusted method when more data become available. Approach and decisionThe analyst should compare these methods using earlier one-step-ahead errors, not select a method merely because its month-6 forecast is convenient. If stockout costs are high, the bakery may plan capacity around a higher demand scenario, such as the point forecast plus a carefully estimated safety margin. That margin should be based on historical forecast errors and operational constraints, not an arbitrary percentage. Outcome and learning pointsThe case illustrates that different simple methods may produce similar forecasts while embodying different assumptions. It also shows why method selection must consider trend, data quantity, error costs and business context. A forecast is an input to a decision, not a substitute for managerial judgement. 10. Limitations, Governance and Contemporary PracticeTime-series methods assume that historical relationships contain useful information about the future. This assumption can fail after a new competitor enters the market, a regulation changes, a product is discontinued or consumer behaviour shifts. Structural breaks should be investigated rather than hidden through aggressive smoothing. Forecasting systems should preserve data definitions, model versions, parameter settings and evaluation results. Access controls are important where forecasts involve confidential sales, customer or workforce information. Analysts should monitor whether automated forecasts systematically disadvantage a region, customer group or operational unit. Artificial intelligence and machine-learning systems can model nonlinear patterns and many explanatory variables, but complexity does not guarantee accuracy. A sophisticated model may overfit, be difficult to explain or fail when conditions change. Baseline methods, time-based validation, monitoring and human review remain essential. Automated systems should communicate uncertainty and provide an audit trail. Best practice includes: - begin with a transparent benchmark;
- plot and understand the data before modelling;
- use chronological validation;
- compare multiple reasonable methods;
- select metrics aligned with business costs;
- inspect residuals and forecast bias;
- update models as new data arrive;
- document assumptions and limitations;
- communicate intervals and scenarios, not only point estimates.
Chapter SummaryTime-series analysis studies observations ordered through time. Its central components are trend, seasonality, cyclical movement and irregular noise. Additive decomposition is suitable when seasonal effects are roughly constant, while multiplicative decomposition is suitable when they vary with the series level. Naïve and seasonal-naïve methods provide important benchmarks. Moving averages smooth observations but may lag. Simple exponential smoothing is appropriate for level data without systematic trend or seasonality; Holt’s method adds trend, and seasonal extensions address recurring seasonal patterns. Linear trend regression estimates change over time but depends on a stable and approximately linear relationship. Forecasts must be evaluated using out-of-sample or rolling-origin data. MAE and RMSE measure error in original units, while MAPE has limitations near zero. Forecast uncertainty should be represented through intervals, assumptions and scenarios. Effective forecasting combines statistical methods, sound data preparation, business knowledge, ethical governance and clear communication. Key TermsTime series: Chronologically ordered observations of a variable. Trend: Long-term direction of a series. Seasonality: A regular pattern repeating within a fixed calendar period. Cycle: Extended wave-like movement without a fixed duration. Noise: Unpredictable or irregular variation. Decomposition: Separation of a series into systematic components. Naïve forecast: Forecast equal to the latest observed value. Seasonal-naïve forecast: Forecast based on the corresponding previous season. Moving average: Average of a fixed number of recent observations. Weighted moving average: Moving average assigning unequal weights. Exponential smoothing: Forecasting method that weights recent observations more heavily. Smoothing constant: Parameter controlling responsiveness to new observations. Level: Current underlying value of a series. Forecast horizon: Number of periods into the future being forecast. Forecast error: Actual value minus forecast value. MAE: Mean absolute error, measured in original units. RMSE: Root mean squared error, which penalises large errors. Data leakage: Use of information unavailable at the historical forecast date. Forecast interval: Range expressing uncertainty around a point forecast. Rolling-origin evaluation: Repeated chronological training and testing of forecasts. Review QuestionsShort Answer Questions- What is the difference between trend and seasonality?
- When is a multiplicative decomposition more appropriate than an additive decomposition?
- State the formula for a three-period simple moving average.
- What does the smoothing constant control in simple exponential smoothing?
- Why can MAPE be problematic when actual values are zero or close to zero?
Long Answer Questions- Explain the four major components of a time series and provide a business example of each.
- Compare naïve forecasting, moving averages and simple exponential smoothing in terms of assumptions, responsiveness and limitations.
- Explain how chronological holdout testing and rolling-origin evaluation improve forecast assessment.
- Describe how a manager should communicate a forecast and its uncertainty to a non-technical audience.
- Discuss why a complex artificial-intelligence forecasting model may not outperform a simple benchmark.
Analytical / Application Questions- Monthly demand for four periods is 80, 92, 88 and 100 units. Calculate the three-period moving-average forecast for period 5 and interpret its relationship to the latest observation.
- Using α = 0.25, an actual value of 200 and a current forecast of 180, calculate the next exponential-smoothing forecast. Explain how the result changes if α is increased.
- A company’s forecast errors for three months are 10, −6 and 8 units. Calculate ME and MAE, and state whether the forecasts show overall under-forecasting or over-forecasting bias.
Multiple Choice Questions with AnswersQuestion 1Which pattern is most clearly associated with seasonality? A. A gradual increase in annual customers over ten years B. A recurring increase in retail sales every December C. An unpredictable one-time supply disruption D. An economic contraction lasting an uncertain number of years Correct Answer: B. A recurring increase in retail sales every December Question 2A three-period moving-average forecast uses observations 90, 100 and 110. What is the forecast? A. 95 B. 100 C. 105 D. 110 Correct Answer: B. 100 Question 3If the latest observation is 250, what is the one-step-ahead forecast under the naïve method? A. 125 B. 200 C. 250 D. 500 Correct Answer: C. 250 Question 4In simple exponential smoothing, a larger value of α generally makes the forecast: A. More responsive to recent observations B. Independent of recent observations C. More strongly seasonal D. Always equal to the long-run average Correct Answer: A. More responsive to recent observations Question 5Which measure is expressed in the original units of the time series? A. MAE B. MAPE C. MSE D. Squared percentage error Correct Answer: A. MAE Question 6A positive forecast error defined as actual minus forecast indicates that the model: A. Over-forecasted B. Under-forecasted C. Had zero bias D. Used seasonal data Correct Answer: B. Under-forecasted Question 7Which method is specifically designed to use the observation from the corresponding previous season? A. Drift method B. Seasonal-naïve method C. Simple moving average D. Linear regression without time Correct Answer: B. Seasonal-naïve method Question 8Why should time-series observations usually not be randomly shuffled before validation? A. Shuffling changes the units of measurement B. Shuffling can allow future information to influence earlier forecasts C. Shuffling always reduces sample size to one D. Shuffling removes all seasonal effects mathematically Correct Answer: B. Shuffling can allow future information to influence earlier forecasts Question 9If actual demand is 120 and the forecast is 100, what is the forecast error using actual minus forecast? A. −20 B. 0 C. 20 D. 220 Correct Answer: C. 20 Question 10Which statement about a forecast interval is most accurate? A. It guarantees the future value will be inside the interval B. It communicates a range of plausible future outcomes C. It is identical to the point forecast D. It removes uncertainty from the decision Correct Answer: B. It communicates a range of plausible future outcomes
|