Forecasting and Time-Series AnalyticsIntroductionMany business decisions depend on what is likely to happen next. A retailer must estimate future demand before ordering stock; a bank must anticipate loan applications and cash requirements; a government agency must project service demand; and a manufacturer must plan production capacity. Forecasting provides a systematic basis for these decisions by using historical observations, current information and informed assumptions about the future. A time series is a sequence of observations recorded in time order, usually at regular intervals such as days, weeks, months or quarters. Time-series analytics examines how values change over time and uses those patterns to support forecasts. It is important to distinguish forecasting from certainty: a forecast is an estimate subject to error, not a guaranteed outcome. This chapter introduces the principal components of business time series—level, trend, seasonality, cycles and irregular variation—and develops practical forecasting methods including moving averages, weighted moving averages, naïve forecasts, exponential smoothing and trend-adjusted smoothing. It also explains how to evaluate forecasts using error measures and how to select an appropriate method for a business problem. Learning ObjectivesBy the end of this chapter, you should be able to: - Explain the purpose and structure of time-series data.
- Identify level, trend, seasonality, cyclical movement and irregular variation.
- Apply naïve forecasts, moving averages, weighted moving averages and exponential smoothing.
- Interpret forecast errors and calculate common accuracy measures.
- Select a forecasting method according to data characteristics and managerial needs.
- Recognize limitations, ethical risks and governance requirements in business forecasting.
1. The Nature of Time-Series DataA time series is commonly written as yt, where y is the measured variable and t identifies the time period. For example, yt may represent monthly sales revenue in month t. The observations must remain in chronological order because the ordering contains information that is lost when data are randomly rearranged. A useful time-series dataset should include: - a clearly defined measure, such as units sold rather than a vague “performance” score;
- a consistent time interval;
- a known unit of measurement;
- reliable records of missing values, promotions, closures and unusual events; and
- sufficient historical length to reveal recurring patterns.
Time-series forecasting differs from ordinary cross-sectional prediction. In cross-sectional analysis, observations may be treated as independent cases. In time-series analysis, observations are often related to earlier observations. A sales value this month may depend on last month’s sales, the season, prices, advertising and broader economic conditions. Components of a business time seriesA common conceptual decomposition is: yt = Tt + St + Ct + It where yt is the observed value; Tt is the underlying trend or long-term level; St is seasonal variation; Ct is cyclical variation; and It is irregular or random variation. This is an additive decomposition, appropriate when the size of seasonal fluctuations is approximately constant over time. An alternative is the multiplicative form: yt = Tt × St × Ct × It The multiplicative form is useful when seasonal variation grows or shrinks in proportion to the level of the series. For example, a seasonal increase of about 20% may be more realistic than a fixed increase of 500 units when a business is expanding. Decomposition is a model of thinking rather than a guarantee that each component can be measured perfectly. LevelThe level is the typical value around which observations fluctuate at a given time. A series can have a changing level even when it has no clear trend. In operational data, the level may be affected by pricing, product availability, customer numbers or permanent changes in the business. TrendA trend is a persistent upward or downward movement over a relatively long period. Trend should not be confused with a short run of increases. A trend may be approximately linear, curved or interrupted by structural changes. It is often examined using a time plot or a fitted trend model. SeasonalitySeasonality is a pattern that repeats at a known and fixed calendar frequency. Examples include higher retail sales in December, increased hotel occupancy during summer and weekday-weekend differences in transport demand. If monthly data are used, annual seasonality has a period of 12; for quarterly data, it has a period of 4. Seasonality is predictable only when the historical pattern remains relevant. A business that changes its opening hours, market, product range or customer base may experience a different seasonal pattern in the future. CyclesA cycle is a longer-term rise and fall that does not necessarily repeat at a fixed interval. Economic expansions and recessions are examples. Cycles are difficult to forecast because their length and amplitude vary, and because they are influenced by external conditions. Irregular variation and outliersIrregular variation includes unexpected events such as strikes, extreme weather, cyberattacks, supply interruptions or one-off orders. An outlier is an observation that is unusually distant from the general pattern. It should not automatically be deleted: an outlier may be a data error, or it may represent a genuine event that should inform planning. 2. Preparing and Exploring a Time SeriesForecasting quality depends heavily on data preparation. Before choosing a method, the analyst should: - verify dates, units and time intervals;
- identify duplicate, missing or incorrectly recorded observations;
- record known interventions such as promotions and store closures;
- plot the series against time;
- inspect whether the variance changes with the level; and
- separate training data from later observations used for evaluation.
A time plot is often the most informative first diagnostic. It can reveal an upward trend, repeated peaks, sudden level changes or periods of unusual volatility. Aggregating daily data into weekly or monthly data may reduce noise, but aggregation can also conceal important operational patterns. A forecast should be generated only using information that would have been available at the forecast date. Using later information to construct an earlier forecast creates data leakage and produces an unrealistically optimistic evaluation. 3. Baseline Forecasting MethodsSimple methods are valuable because they are easy to explain, quick to implement and difficult to misuse. They also provide benchmarks against which more complex methods should be compared. Naïve forecastThe naïve method uses the most recent observation as the next forecast: Ft+1 = yt where Ft+1 is the forecast for the next period and yt is the actual value in the current period. This method is appropriate as a baseline for a series with no strong trend or seasonality. It can be surprisingly competitive for short-horizon forecasts. For seasonal data, a seasonal naïve method uses the observation from the same season in the previous cycle: Ft+h = yt+h-m where h is the forecast horizon and m is the seasonal period, such as 12 for monthly annual seasonality. This method assumes that the seasonal pattern repeats reasonably well. Drift methodA simple extension of the naïve method allows for average historical change, or drift: Ft+h = yt + h × (yt - y1)/(t - 1) Here y1 is the first observation and t is the number of observations available at the forecast origin. The method assumes that the average change from the beginning to the present continues into the future. It is not appropriate when a structural break makes the historical average change irrelevant. 4. Moving-Average ForecastingA moving average smooths short-term fluctuations by averaging the most recent observations. A simple k-period moving-average forecast is: Ft+1 = (yt + yt-1 + … + yt-k+1)/k The symbol k is the number of observations included. All observations receive equal weight. The units of the forecast are the same as the units of y, because division by the count of observations preserves the measurement unit. A larger window produces greater smoothing but responds more slowly to recent changes. A smaller window responds more quickly but may retain more random variation. The method is most suitable for a stable series without pronounced trend or seasonality. Worked example: three-period moving averageSuppose weekly demand for the last four weeks was 120, 135, 150 and 141 units. The forecast for week 5 using the latest three observations is: F5 = (135 + 150 + 141)/3 = 426/3 = 142 units The observation of 120 is excluded because the window contains only the three most recent weeks. If actual demand in week 5 is 147 units, the forecast error, defined as actual minus forecast, is: e5 = y5 - F5 = 147 - 142 = 5 units Weighted moving averageA weighted moving average gives greater importance to selected observations: Ft+1 = w1yt + w2yt-1 + … + wkyt-k+1 The weights must satisfy wi ≥ 0 and ∑wi = 1. The weights are dimensionless, so the forecast retains the unit of the observations. More recent observations commonly receive larger weights, although the choice must be justified and evaluated rather than assumed to be correct. Using the previous data and weights 0.50, 0.30 and 0.20 for the most recent, second-most recent and third-most recent observations: F5 = 0.50(141) + 0.30(150) + 0.20(135) = 70.5 + 45 + 27 = 142.5 units 5. Exponential SmoothingSimple exponential smoothing updates a previous forecast using the latest forecast error: Ft+1 = αyt + (1 - α)Ft where α is the smoothing constant, with 0 < α < 1. The actual observation and previous forecast must have the same units. The value of α is unit-free. A high α gives more weight to the latest observation and reacts rapidly; a low α creates a smoother forecast that reacts slowly. The equation can also be written as: Ft+1 = Ft + α(yt - Ft) This form shows that the forecast moves from the old forecast toward the latest actual value by a proportion α of the error. Simple exponential smoothing is appropriate for data with a stable level and no systematic trend or seasonality. Worked example: exponential smoothingAssume the forecast for week 1 is 100 units, actual demand in week 1 is 110 units, and α = 0.30. The forecast for week 2 is: F2 = 0.30(110) + 0.70(100) = 33 + 70 = 103 units If actual demand in week 2 is 106 units, the forecast for week 3 is: F3 = 0.30(106) + 0.70(103) = 31.8 + 72.1 = 103.9 units The initial forecast matters, particularly in a short dataset. Common initialization approaches include using the first observation, using an average of early observations or estimating the initial level from a training sample. The chosen approach should be documented. Trend-adjusted exponential smoothingWhen a series has trend, simple exponential smoothing tends to lag. Holt’s method estimates both a level and a trend: ℓ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, β is the trend-smoothing parameter with 0 < β < 1, and h is the forecast horizon. Holt’s method assumes that the recent trend is informative for the forecast horizon. It may produce unrealistic forecasts if a temporary increase is extrapolated indefinitely. For data with both trend and seasonality, seasonal exponential-smoothing methods such as Holt–Winters can be used. Their additive and multiplicative forms should be selected according to whether seasonal amplitude is approximately constant or proportional to the level. These methods require careful initialization and sufficient observations across multiple seasonal cycles. 6. Measuring Forecast AccuracyForecast evaluation compares forecasts with actual outcomes from periods not used to fit or tune the method. Let the error be: et = yt - Ft The sign convention must be stated. Positive error means actual demand exceeded the forecast; negative error means the forecast exceeded actual demand. Mean error or mean forecast errorME = (1/n)∑et Mean error indicates bias. Positive values suggest systematic under-forecasting, while negative values suggest systematic over-forecasting. Positive and negative errors can cancel, so ME alone is not a sufficient accuracy measure. Mean absolute errorMAE = (1/n)∑|et| MAE measures average absolute deviation in the original units. It is easy to interpret and less dominated by very large errors than squared-error measures. Mean squared error and root mean squared errorMSE = (1/n)∑et2 RMSE = √MSE MSE is in squared units, while RMSE returns to the original unit. Squaring gives greater influence to large errors, which is useful when large misses are particularly costly. Mean absolute percentage errorMAPE = (100/n)∑|et/yt| MAPE is expressed as a percentage, but it is undefined when an actual value is zero and unstable when actual values are close to zero. It can also be misleading for intermittent demand. Percentage measures should therefore not be used automatically. Worked accuracy comparisonSuppose actual demand for three periods is 100, 120 and 110 units, while forecasts are 95, 125 and 105 units. Errors are 5, −5 and 5 units. Therefore: ME = (5 - 5 + 5)/3 = 1.67 units MAE = (5 + 5 + 5)/3 = 5 units MSE = (25 + 25 + 25)/3 = 25 units² RMSE = √25 = 5 units For MAPE: MAPE = (100/3)[5/100 + 5/120 + 5/110] ≈ 4.27% Although the forecasts have an average absolute error of 5 units, the ME shows only modest bias because positive and negative errors offset one another. Selecting an evaluation methodForecasts should be assessed using a holdout period or rolling-origin evaluation. In a rolling-origin design, the model is fitted using an initial period, forecasts the next observation, then the origin moves forward and the process is repeated. This better reflects how the forecast will operate in practice. No single metric is universally best. A retailer may prioritize MAE because it corresponds to average unit error; a logistics operation may prioritize RMSE because large misses cause serious service failures; and a finance team may use percentage measures when comparing products of different scales. Evaluation should also consider bias, interpretability, computational cost and the business consequences of errors. 7. Choosing and Using a Forecasting MethodMethod selection should follow the data and decision context, not fashion. A practical sequence is: - Establish a naïve or seasonal-naïve benchmark.
- Plot the data and describe level, trend, seasonality and unusual events.
- Fit a small number of suitable candidate methods.
- Evaluate them on a genuine holdout period or through rolling-origin testing.
- Examine both accuracy and bias.
- Consult operational knowledge about promotions, capacity and market changes.
- Monitor forecast performance after implementation.
A method with the lowest historical error is not automatically the best method. Historical conditions may not continue, and a slightly less accurate method may be easier to explain, maintain and govern. Forecast intervals should be considered where decisions require a range of plausible outcomes rather than a single point estimate. 8. Applied Case: Forecasting Demand for FreshBite CafésBackgroundFreshBite is an illustrative chain of campus cafés. It records weekly sales of prepared sandwiches. Management currently orders inventory using the previous week’s sales, but frequent stockouts occur after sudden increases in demand, while unsold products create waste after demand falls. ProblemThe operations manager wants a transparent method for producing one-week-ahead forecasts. Twelve weeks of demand are available, and weeks 9–12 will be used for evaluation rather than model fitting. AnalysisA time plot shows relatively stable demand with a modest increase during the first eight weeks but no clear weekly seasonal pattern. The analyst therefore compares a naïve forecast, a three-week moving average and simple exponential smoothing. Promotions are recorded separately because promotional weeks should not be treated as ordinary demand. For the first evaluation week, the relevant observations are 220, 230 and 225 units, and actual week-9 demand is 240 units. The three-week moving-average forecast is: F9 = (220 + 230 + 225)/3 = 225 units The error is 15 units. A naïve forecast based on week 8 would be 225 units if week-8 demand was 225, producing the same error in this particular week. The analyst continues this calculation for weeks 9–12, rather than selecting a method from one observation. Approach and solutionThe team evaluates all four holdout forecasts using MAE, RMSE and ME. Exponential smoothing with α = 0.30 has the lowest MAE and only a small positive ME, indicating limited under-forecasting. The moving average is slightly less accurate because it responds slowly to the gradual increase. The manager adopts exponential smoothing as the operational baseline, with a manual review flag for promotions and campus events. The system records the forecast, actual result, error, method version and any intervention. Inventory staff receive a forecast range and a warning when expected demand approaches production capacity. OutcomeAfter four weeks, the team does not claim that the method has eliminated waste. Instead, it compares continuing performance with the previous naïve process. It finds fewer stockouts but identifies larger errors during examination weeks. Those weeks are added as a calendar feature for future analysis rather than being hidden as “bad data.” Learning pointsThe case illustrates five principles: simple benchmarks are essential; evaluation must use future-like data; business events must be recorded; accuracy and operational consequences are different questions; and forecasting is a continuing monitoring process rather than a one-time calculation. 9. Professional, Ethical and Technological ConsiderationsForecasts influence staffing, inventory, credit decisions and public services, so poor forecasting can create material harm. Analysts should document data sources, assumptions, transformations, parameter values, forecast horizons and evaluation periods. Version control is important when forecasts are used in regulated or audited decisions. Forecasts may reproduce historical discrimination. For example, a model trained on past loan approvals may forecast lower demand from groups that were previously denied access, even when the underlying need is similar. Forecasts should not be treated as neutral facts; their data-generating processes and consequences require review. Privacy must be protected when individual-level information is used to forecast purchasing or service demand. Access controls, data minimization, retention policies and appropriate aggregation are practical safeguards. Human review is particularly important where forecasts affect employment, eligibility, health or essential services. Artificial intelligence and machine-learning systems can use many predictors and detect nonlinear patterns, but complexity does not guarantee better forecasts. They may be vulnerable to drift, data leakage, changing customer behaviour and poor explainability. Classical methods remain valuable because they provide interpretable benchmarks. A responsible workflow compares advanced systems with transparent baselines and monitors performance after deployment. Best practices- Begin with a clearly defined forecasting decision and horizon.
- Use time-ordered validation rather than random splitting.
- Establish naïve and seasonal-naïve benchmarks.
- Separate genuine events from recording errors.
- Match the error measure to the cost of being wrong.
- Report uncertainty where decisions require risk ranges.
- Monitor bias, drift and structural breaks.
- Document assumptions and preserve an audit trail.
- Review forecasts with subject-matter experts without allowing unsupported overrides to become invisible.
Chapter SummaryTime-series analytics studies observations ordered through time and supports decisions about future demand, revenue, capacity and risk. A series may contain level, trend, seasonality, cycles and irregular variation. Additive decomposition is suitable when seasonal fluctuations are roughly constant; multiplicative decomposition is more suitable when they vary with the level. Naïve and seasonal-naïve forecasts provide essential benchmarks. Moving averages smooth recent observations, weighted moving averages emphasize selected observations, and exponential smoothing updates a forecast according to the latest observation and a smoothing parameter. Trend-adjusted methods estimate both level and trend, while seasonal methods extend the framework to recurring patterns. Forecast errors should be defined consistently as actual minus forecast. ME assesses bias; MAE measures average absolute error; MSE and RMSE emphasize large errors; and MAPE expresses relative error but has important limitations near zero. Sound practice uses time-ordered holdout or rolling-origin evaluation, combines quantitative results with business knowledge, and monitors forecasts after implementation. Ethical forecasting requires attention to privacy, bias, explainability, documentation and the consequences of error. Key TermsTime series: Observations recorded in chronological order. Forecast: An estimate of a future value or event. Level: The typical underlying value of a series at a point in time. Trend: Persistent long-term upward or downward movement. Seasonality: A pattern that repeats at a fixed calendar frequency. Cycle: Longer-term fluctuation without a fixed repeating period. Irregular variation: Unpredictable movement caused by random or unusual events. Additive decomposition: A representation in which components are summed. Multiplicative decomposition: A representation in which components are multiplied. Naïve forecast: A forecast equal to the most recent observed value. Seasonal-naïve forecast: A forecast using the value from the same season in a previous cycle. Moving average: An average of a fixed number of recent observations. Weighted moving average: A moving average assigning different weights to observations. Exponential smoothing: A method that updates forecasts using a smoothing parameter. Forecast origin: The latest time point at which information is available for forecasting. Forecast horizon: The number of periods ahead being forecast. Forecast error: The difference between actual and forecast values. MAE: Mean absolute error, the average absolute forecast error. RMSE: Root mean squared error, an error measure emphasizing large misses. Data leakage: Use of information unavailable at the time a forecast would have been made. Review QuestionsShort Answer Questions- What distinguishes seasonality from a cycle?
- State the formula for a simple three-period moving-average forecast.
- What does a positive mean forecast error indicate when error is defined as actual minus forecast?
- Why is a naïve forecast useful even when a more advanced method is available?
- Give one limitation of MAPE.
Long Answer Questions- Explain the main components of a business time series and describe how each may appear in a time plot.
- Compare moving averages and exponential smoothing in terms of responsiveness, smoothing and assumptions.
- Explain how a business should design a time-ordered forecast evaluation.
- Compare MAE, RMSE and MAPE, including situations in which each may be useful or misleading.
- Discuss ethical and governance issues that arise when forecasts influence resource allocation.
Analytical / Application Questions- Weekly demand is 80, 95, 100 and 105 units. Calculate the forecast for week 5 using a three-period moving average and a weighted moving average with weights 0.50, 0.30 and 0.20, assigning the largest weight to the latest observation. Which forecast is higher?
- A forecast is 200 units, actual demand is 230 units, and α = 0.25. Calculate the next exponential-smoothing forecast.
- A forecasting team reports a very low MAPE, but several periods have actual demand close to zero. Explain why the result may be unreliable and recommend alternative evaluation measures.
Multiple Choice Questions with AnswersQuestion 1Which pattern repeats at a known and fixed calendar frequency? A. Cycle B. Seasonality C. Irregular variation D. Random walk Correct Answer: B. Seasonality Question 2A three-period moving-average forecast uses recent observations of 120, 135 and 150 units. What is the forecast? A. 125 units B. 130 units C. 135 units D. 145 units Correct Answer: C. 135 units Question 3In simple exponential smoothing, what is the role of α? A. It measures the forecast horizon B. It determines the seasonal period C. It controls the weight given to the latest observation D. It converts errors into percentages Correct Answer: C. It controls the weight given to the latest observation Question 4If actual demand is 180 units and the forecast is 170 units, using actual minus forecast, what is the error? A. −10 units B. 0 units C. 10 units D. 350 units Correct Answer: C. 10 units Question 5Which measure is expressed in the original units and averages absolute errors? A. MAE B. MSE C. MAPE D. ME squared Correct Answer: A. MAE Question 6Why can MAPE be problematic when actual values are zero or close to zero? A. It always produces negative values B. It becomes undefined or unstable C. It ignores forecast errors D. It requires seasonal data Correct Answer: B. It becomes undefined or unstable Question 7Which method is generally appropriate as a benchmark for a series with stable level and no strong seasonality? A. Naïve forecast B. Multiplicative decomposition only C. Random data deletion D. Seasonal index adjustment only Correct Answer: A. Naïve forecast Question 8What is the principal effect of increasing the window size in a simple moving average? A. Less smoothing and faster reaction B. Greater smoothing and slower reaction C. Automatic removal of seasonality D. Conversion of units into percentages Correct Answer: B. Greater smoothing and slower reaction Question 9Which evaluation design best imitates repeated real-world forecasting? A. Randomly shuffling all observations B. Using only the first observation C. Rolling-origin evaluation D. Evaluating on data collected before the training period Correct Answer: C. Rolling-origin evaluation Question 10A forecast has errors of 4, −6 and 2 units. What is its mean error? A. 0 units B. 0.67 units C. 4 units D. 12 units Correct Answer: B. 0.67 units
|