Logistics Analytics

Chapter 5
Demand Forecasting and Demand Analytics

Post Graduate Program in Logistics
Logistics Analytics   •   Post Graduate

Demand Forecasting and Demand Analytics

Introduction and Context

Demand forecasting is the disciplined estimation of future customer requirements for products or services. In logistics, the forecast is not an end in itself: it informs procurement, inventory positioning, production, transportation capacity, warehouse labour, replenishment and financial planning. A forecast is therefore a decision input produced under uncertainty, not a promise about what will occur.

Demand analytics extends forecasting by asking why demand changes, how reliable the forecast is, which decisions should respond to it, and how information from customers, markets and supply-chain partners can improve it. The modern logistics analyst combines historical time series, causal information, machine learning, real-time signals and collaborative judgement while maintaining control over bias, data quality and model risk.

Forecasting is particularly difficult in logistics because demand is affected by promotions, stockouts, substitutions, weather, holidays, competitor actions, product launches, economic conditions and changing service policies. Observed sales may therefore differ from true demand. If an item is unavailable, recorded sales represent constrained demand rather than customers' full requirements.

Learning Objectives

By the end of this chapter, the learner should be able to:

  1. Distinguish demand, sales, orders and forecasts.
  2. Select and interpret naïve, moving-average, exponential-smoothing, seasonal, causal and machine-learning models.
  3. Measure forecast accuracy, bias and uncertainty appropriately.
  4. Manage seasonality, intermittency, promotions, stockouts and structural change.
  5. Design demand-sensing and collaborative-planning processes.
  6. Evaluate forecasting systems from technical, managerial, ethical and governance perspectives.

1. Foundations of Demand Analytics

Demand and related concepts

Demand is the quantity customers would purchase under specified conditions, including price, availability and service. Sales are transactions actually completed. Orders are requests placed by customers or downstream entities and may be cancelled, delayed or amplified. Shipments are physical movements and may differ from orders because of allocation and fulfilment constraints.

A forecast must specify:

  • the item or product hierarchy;
  • the location and customer segment;
  • the time bucket and forecast horizon;
  • the unit of measure;
  • the forecast issue date;
  • whether the quantity is unconstrained demand, sales, orders or shipments.

Forecasts are often indexed as yt, where t identifies a period. A one-step-ahead forecast made at the end of period t is written \hat{y}t+1|t. The notation states both the target period and the information available when the forecast was made.

Forecast horizons and aggregation

Short-term forecasts support replenishment and labour scheduling; medium-term forecasts support procurement, capacity and transport contracting; long-term forecasts support network design and strategic investment. Accuracy generally declines as the horizon increases, although aggregation across products or locations can reduce random variation.

The aggregation level matters. A forecast for a product family may be accurate while forecasts for individual stock-keeping units are poor. Conversely, independently forecasting every SKU can produce totals that are inconsistent with the business plan. Hierarchical forecasting addresses this issue by reconciling forecasts across levels, such as category, product family, SKU, region and customer.

Forecasting as a decision process

A useful forecasting process contains five linked activities:

  1. define the decision and forecast object;
  2. collect, validate and transform data;
  3. generate statistical and analytical forecasts;
  4. review exceptions and incorporate justified information;
  5. measure performance and improve the process.

The process should separate forecast generation from forecast override. An override is defensible only when it is supported by documented evidence, such as a confirmed promotion or a known customer contract.

2. Time-Series Forecasting

Time-series methods use the historical behaviour of a variable. They are valuable when causal data are limited, especially for large portfolios of stable items.

Naïve and seasonal-naïve methods

The naïve forecast uses the most recent observation:

ât+1|t = yt

where yt is observed demand in period t. It is difficult to beat consistently for highly volatile random-walk-like series and is an essential benchmark.

A seasonal-naïve forecast repeats the observation from the equivalent prior season:

ât+h|t = yt+h-m

where m is the seasonal cycle length and h is the forecast horizon. This method assumes that the most recent seasonal pattern is a reasonable representation of the next one.

Moving averages

A simple moving average of window length k is:

ât+1|t = (1/k) ∑i=0k-1 yt-i

The method gives equal weight to the latest k observations. Larger k values smooth noise but respond slowly to level changes; smaller values respond faster but are less stable. The observations must be measured in the same units and comparable time intervals.

A weighted moving average is:

ât+1|t = ∑i=0k-1 wi yt-i, ∑wi = 1

where weights wi are non-negative and sum to one. Greater weight is commonly assigned to recent observations.

Simple exponential smoothing

Simple exponential smoothing updates a level estimate recursively:

ℓt = αyt + (1−α)ℓt−1

and produces \hat{y}t+h|t=ℓt for all future horizons h≥1. Here ℓt is the estimated level and 0<α≤1 is the smoothing parameter. The method assumes no systematic trend or seasonality. Initialisation of ℓ0 must be specified, for example as the first observation or an initial average.

A high α reacts quickly to changes; a low value produces more smoothing. Parameters should be selected using a validation period or an objective such as minimising forecast error, rather than chosen solely by intuition.

Trend and seasonality

When demand has a trend, Holt's method estimates level and trend. One common additive form is:

ℓt = αyt + (1−α)(ℓt−1+bt−1)
bt = β(ℓt−ℓt−1) + (1−β)bt−1
ŷt+h|t = ℓt + hbt

where bt is the trend estimate, 0<β≤1 is the trend-smoothing parameter, and h is the horizon. Additive trend can produce unrealistic negative forecasts; damped-trend variants reduce the extrapolated trend.

For seasonal data, seasonality may be additive, where the seasonal effect is approximately constant in units, or multiplicative, where it grows with the level. Multiplicative models require positive observations. Seasonal period m must reflect the data frequency: for monthly data, annual seasonality is often m=12, while weekly data may have a weekly cycle of m=7 and an annual pattern that is not exactly represented by a simple integer cycle.

3. Causal and Econometric Forecasting

Time-series models describe temporal patterns but do not necessarily explain them. Causal models use explanatory variables such as price, promotion depth, advertising, temperature, income, exchange rates, customer counts and competitor availability.

A basic linear regression is:

yt = β0 + β1x1t + β2x2t + … + βpxpt + εt

where yt is demand, xjt are predictors, βj are coefficients, β0 is the intercept and εt is an error term. Coefficients are interpretable only with the measurement units and model specification understood. A coefficient does not automatically establish causation: price may fall when demand is weak, creating reverse causality.

For a log-log model,

ln(yt) = β0 + β1ln(xt) + εt

β1 is interpreted approximately as the percentage change in demand associated with a 1% change in x, holding other variables constant. Such interpretation depends on appropriate data, functional form and exogeneity assumptions.

Promotions should be represented with variables such as a promotion indicator, discount depth, display placement and campaign duration. Holiday indicators and lagged variables can represent delayed effects. Before using a predictor, the analyst must confirm that it is known, or can itself be forecast, at the time the operational forecast is made. Using future information creates leakage and falsely optimistic accuracy.

Regression diagnostics should examine residual autocorrelation, non-constant variance, influential observations, multicollinearity and out-of-sample performance. A statistically significant coefficient can still be operationally unimportant, while a useful predictor may be difficult to deploy reliably.

4. Machine-Learning Forecasting

Machine learning is useful when relationships are nonlinear, high-dimensional or interaction-rich. Typical features include lags, rolling means, price, promotion, calendar variables, weather, web traffic, inventory availability and customer behaviour. Tree ensembles, regularised regression, gradient boosting and neural networks are common approaches.

A supervised forecasting design transforms a time series into examples: features available at the forecast origin are paired with a future target. Temporal rather than random splitting is essential. A suitable evaluation uses rolling-origin validation: train on an initial period, forecast a later period, move the origin forward, and repeat.

Machine learning does not remove the need for forecasting knowledge. It can overfit, learn stockout artefacts, encode historical discrimination, or exploit variables unavailable in production. Explainability, stability and maintainability may be more important than a small improvement in a test metric. A strong baseline, such as seasonal naïve forecasting, should always be retained.

Probabilistic forecasting estimates a distribution or prediction intervals rather than only a point estimate. A 90% prediction interval is intended to contain the future observation in approximately 90% of comparable cases, subject to calibration. It is not a guarantee and should be evaluated for coverage and sharpness.

5. Forecast Accuracy, Bias and Uncertainty

Let the forecast error be:

et = yt − ŷt

Positive error means actual demand exceeded the forecast. This sign convention must be stated because some systems define error in the opposite direction.

Core measures

MeasureFormulaInterpretation
Mean error (ME)ME=(1/n)∑etAverage signed error; indicates bias
Mean absolute error (MAE)[[MATH:MAE=(1/n)∑e_t
Mean squared error (MSE)MSE=(1/n)∑et2Penalises large errors strongly
Root mean squared error (RMSE)RMSE=√MSESame units as demand
Mean absolute percentage error (MAPE)[[MATH:100(1/n)∑e_t/y_t
Weighted absolute percentage error (WAPE)[[MATH:100∑e_t

These measures assume comparable forecast-observation pairs. MAPE can be unstable for small or zero demand and should not be used uncritically for intermittent items. WAPE can hide poor performance on low-volume SKUs because high-volume items dominate. No single metric is universally best.

A scale-free benchmark measure is the mean absolute scaled error (MASE):

MASE = mean(|et|) / mean(|yt − yt−m|)

The denominator is calculated on the training data, with m=1 for non-seasonal scaling or a seasonal lag. Values below 1 indicate improvement over the corresponding naïve benchmark, assuming the denominator is non-zero.

Bias can be monitored using cumulative error:

CFEt = ∑i=1t ei

A persistently positive or negative cumulative error signals systematic under- or over-forecasting. A tracking signal is sometimes defined as CFE/MAD, where MAD is mean absolute deviation over a specified window. Control limits should be established from business context rather than adopted mechanically.

Worked example

Suppose actual weekly demand is 100, 120 and 80 units, while forecasts are 90, 130 and 100 units. Errors are 10, −10 and −20 units. Therefore:

ME=(10−10−20)/3=−6.67 units, indicating average over-forecasting under the stated convention.

MAE=(10+10+20)/3=13.33 units.

RMSE=√((100+100+400)/3)=√200≈14.14 units.

The measures answer different questions: ME diagnoses direction, MAE describes typical absolute deviation, and RMSE gives additional weight to large misses.

Accuracy should be evaluated at the decision-relevant level. If inventory is managed by location, item-location errors matter. If transport is planned by regional volume, regional aggregation is also relevant. Accuracy measurement must avoid using revised data or information that was unavailable at the forecast date.

6. Special Demand Patterns

Intermittent and lumpy demand

Intermittent demand contains many zero observations and occasional non-zero demand. Lumpy demand has both intermittent occurrence and highly variable non-zero quantities. Croston-type methods separate the interval between non-zero demands from their size. Variants such as SBA and TSB address aspects of bias and obsolescence, but no method is universally superior. Evaluation should use inventory-relevant measures and realistic lead-time simulation.

For intermittent demand, forecast the requirement over the replenishment lead time rather than relying only on a period-level percentage metric. A forecast of zero average demand can still be compatible with a positive safety stock requirement when occasional demand and long lead times exist.

Promotions and events

Promotions create temporary uplift, substitution, pull-forward and post-promotion dips. Historical promotional sales should not be treated as ordinary baseline demand. A useful decomposition is:

Observed demand = baseline demand + promotional increment + event effects + random error

This is a conceptual decomposition, not an identity that can be estimated without assumptions. Analysts should distinguish planned promotions from unplanned events, estimate cannibalisation across products, and account for inventory constraints.

Stockouts and censored demand

When inventory is zero, observed sales understate potential demand. Possible responses include marking stockout periods, estimating lost sales, using customer orders or substitution data, and modelling availability explicitly. Imputation should be documented and sensitivity-tested; replacing every stockout with average demand may overstate or understate lost demand.

7. Demand Sensing and Collaborative Planning

Demand sensing updates a medium-term forecast with near-real-time signals such as point-of-sale data, orders, inventory availability, online searches, traffic, weather and logistics events. Its value is greatest when signals lead conventional sales data and when the forecast can be acted upon within the short horizon. It is not simply “more frequent forecasting.” Signal quality, latency, stability and decision lead time determine value.

Collaborative planning, forecasting and replenishment (CPFR) aligns supply-chain partners through shared data, agreed assumptions, exception management and joint review. Effective collaboration requires:

  • a shared calendar for promotions and product launches;
  • common definitions of demand, inventory and service;
  • agreed ownership of overrides;
  • a record of forecast versions and assumptions;
  • confidentiality and data-access controls;
  • escalation rules for material exceptions.

The bullwhip effect describes amplification of order variability upstream relative to consumer demand. Forecast sharing, shorter lead times, smaller batch constraints, stable pricing and coordinated replenishment can reduce amplification, although information sharing alone does not eliminate capacity or behavioural causes.

8. A Practical Forecasting Architecture

A mature architecture commonly includes:

  1. Data layer: sales, orders, inventory, price, promotion, calendars, product and location master data.
  2. Data-quality layer: checks for missing periods, duplicates, unit changes, stockouts, outliers and hierarchy consistency.
  3. Feature and modelling layer: statistical baselines, causal models, machine-learning models and ensembles.
  4. Forecast-management layer: hierarchy reconciliation, overrides, version control and approval workflows.
  5. Evaluation layer: rolling backtests, bias monitoring, accuracy by segment and prediction-interval calibration.
  6. Execution layer: replenishment, allocation, capacity and transport decisions.

Model selection should consider value, not only accuracy. A marginal accuracy improvement may be unhelpful if it increases processing time, reduces interpretability or cannot be maintained. Segmentation is often superior to one universal model: stable high-volume items, seasonal items, intermittent items and new products require different treatments.

New products lack sufficient history. Analogue products, market research, launch plans, adoption curves and expert judgement may be combined, with uncertainty explicitly widened. Forecasts should be revised as early sales arrive, while avoiding premature conclusions from very small samples.

9. Illustrative Case: Regional Distribution of a Seasonal Beverage

Background

This fictional case concerns Northstar Beverages, which supplies a seasonal drink to 12 distribution centres and approximately 1,800 retail outlets. Demand rises sharply from May to August. The firm used last year's monthly sales as its forecast, but repeated stockouts in high-demand regions and excess inventory after the summer.

Problem

The apparent forecast error was difficult to interpret because stockouts reduced recorded sales. Promotions differed by region, and the commercial team frequently added undocumented overrides. Procurement needed a six-month view, while transport planners needed weekly regional forecasts.

Analysis

The analytics team first established a forecast ledger containing issue date, horizon, item, location, forecast, actual outcome and override reason. It separated periods with confirmed stockouts and compared three baselines: naïve, seasonal naïve and exponential smoothing. A causal model added promotion indicators, temperature and distribution-centre availability. Rolling-origin validation was used rather than random train-test splitting.

Results showed that seasonal naïve forecasting was a strong benchmark for stable regions. The causal model improved performance during planned promotions but degraded when temperature forecasts were inaccurate. A blended approach was therefore selected: seasonal baseline plus a promotion uplift model, with a conservative weather adjustment. Stockout periods were flagged rather than silently imputed.

Approach and solution

Northstar introduced weekly demand reviews only for exceptions exceeding a defined volume or service threshold. Overrides required a reason code and evidence. Forecasts were reconciled so that regional totals matched the commercial plan within an agreed tolerance. Prediction intervals were used to set procurement buffers, while transport received a shorter-horizon update based on point-of-sale and inventory availability.

Outcome

In the following season, the company reported fewer stockout-related emergency shipments and lower post-season residual inventory. The improvement was attributed not to one superior algorithm but to better demand definitions, explicit promotion data, rolling validation, disciplined overrides and coordination between forecasting, procurement and transport. The numerical outcome is intentionally not generalised: performance depends on the firm's data, products and operating constraints.

Learning points

  1. Historical sales are not automatically unconstrained demand.
  2. Baselines provide essential evidence against exaggerated claims of model improvement.
  3. Promotions and weather should be used only when their timing and quality are operationally credible.
  4. Governance of overrides can improve outcomes as much as algorithm selection.
  5. Forecast value should be assessed through inventory, service and logistics results.

10. Limitations, Ethics and Governance

Forecasts can influence allocation decisions and therefore customer access. If a model learns that a region historically received less stock, it may perpetuate that pattern. Analysts should inspect performance by region, customer segment and product, and investigate systematic disadvantage.

Privacy rules apply when forecasts use customer-level browsing, loyalty or location data. Data minimisation, lawful purpose, access controls, retention limits and anonymisation or aggregation should be incorporated into system design. Commercially sensitive collaborative data require clear agreements on ownership, use and cybersecurity.

Governance should include model documentation, data lineage, versioning, approval authority, performance thresholds, drift detection and retirement criteria. Human judgement is not automatically safer than automation: undocumented overrides can introduce optimism, politics or inconsistent treatment. Conversely, automation should not conceal uncertainty or make irreversible decisions without appropriate review.

11. Contemporary Developments and Best Practice

Emerging practices include probabilistic and hierarchical forecasting, forecast ensembles, automated feature generation, causal machine learning, external-signal integration and digital twins for scenario analysis. Generative AI may assist with explanation, exception summaries and natural-language interaction, but it should not be allowed to invent demand data, silently alter forecasts or bypass approval controls.

Best practice can be summarised as follows:

  • begin with a clearly defined forecast object and decision;
  • retain naïve and seasonal-naïve benchmarks;
  • use rolling-origin, leakage-free validation;
  • segment products by demand behaviour;
  • measure both accuracy and bias;
  • treat promotions, stockouts and product changes explicitly;
  • forecast distributions when uncertainty affects decisions;
  • reconcile forecasts across hierarchies;
  • record and audit overrides;
  • connect forecast metrics to service, inventory and total logistics cost;
  • review models for drift, fairness, privacy and operational feasibility.

Chapter Summary

Demand forecasting estimates future requirements to support logistics decisions, while demand analytics explains demand drivers, uncertainty and operational consequences. Forecast objects must distinguish demand from sales, orders and shipments, and must specify item, location, horizon, units and information availability.

Time-series methods range from naïve and moving-average benchmarks to exponential smoothing and seasonal models. Causal models incorporate price, promotion, weather and other explanatory variables, but require careful attention to causality, availability and diagnostics. Machine learning can capture nonlinear relationships but requires leakage-free temporal validation, strong baselines and governance.

Forecast evaluation should include signed bias measures such as mean error, scale-dependent accuracy measures such as MAE and RMSE, and suitable scale-free measures. MAPE is problematic with zeros and intermittent demand. Seasonality, promotions, stockouts and new products require specialised treatment. Demand sensing and collaborative planning can improve responsiveness when data, processes and responsibilities are aligned.

The central managerial lesson is that forecast quality is a property of the whole system—data, models, judgement, governance and decisions—not merely of an algorithm. Ethical data use, transparency, privacy, fairness and continuous monitoring are essential to responsible logistics analytics.

Key Terms

Demand: Quantity customers would purchase under specified conditions.

Forecast origin: Time at which information is available and a forecast is issued.

Forecast horizon: Future period or distance covered by a forecast.

Naïve forecast: Forecast equal to the latest observed value.

Seasonal-naïve forecast: Forecast based on the corresponding prior-season observation.

Exponential smoothing: Recursive method that weights observations with declining emphasis on older data.

Seasonality: Repeating demand pattern associated with a calendar or operating cycle.

Trend: Persistent upward or downward movement in a series.

Causal forecasting: Forecasting using explanatory variables believed to influence demand.

Feature leakage: Use of information unavailable at the forecast origin.

Forecast error: Difference between actual demand and forecast, under a stated sign convention.

Bias: Systematic tendency to over- or under-forecast.

MAE: Mean absolute error, expressed in demand units.

RMSE: Root mean squared error, which penalises large errors more strongly.

Intermittent demand: Demand containing many zero observations.

Lumpy demand: Intermittent demand with highly variable non-zero quantities.

Demand sensing: Short-horizon updating using recent internal and external signals.

CPFR: Collaborative planning, forecasting and replenishment among supply-chain partners.

Prediction interval: Range intended to contain a future observation with stated probability.

Forecast reconciliation: Adjustment of forecasts so that hierarchical totals are coherent.

Review Questions

Short Answer Questions

  1. Distinguish demand, sales and shipments.
  2. What is the purpose of a seasonal-naïve benchmark?
  3. Why can MAPE be unsuitable for intermittent demand?
  4. Define forecast bias under the convention et=yt−ŷt.
  5. What is feature leakage in machine-learning forecasting?

Long Answer Questions

  1. Compare moving averages, exponential smoothing, causal regression and machine-learning forecasting.
  2. Explain how promotions and stockouts affect the interpretation of historical sales.
  3. Discuss the design of a rolling-origin forecast-validation process.
  4. Explain how demand sensing and CPFR can reduce supply-chain uncertainty.
  5. Evaluate the ethical and governance requirements of an AI-enabled forecasting system.

Analytical / Application Questions

  1. A planner observes actual demand of 200, 240 and 160 units and forecasts of 180, 220 and 200 units. Calculate ME, MAE and RMSE, and interpret the direction of bias.
  2. Design a forecasting approach for a product with weekly seasonality, frequent promotions and occasional stockouts. Specify data, models, validation and governance.
  3. A machine-learning model improves portfolio WAPE but worsens accuracy for low-volume rural locations. Recommend a decision framework that considers service, fairness, cost and model performance.

Multiple Choice Questions with Answers

Question 1

Under the convention et=yt−ŷt, a negative mean error indicates:

A. Systematic under-forecasting

B. Systematic over-forecasting

C. Perfect calibration

D. Seasonality has been removed

Correct Answer: B. Systematic over-forecasting

Question 2

Which method forecasts the next period using the most recent observation?

A. Naïve forecasting

B. Seasonal decomposition

C. Multiple regression

D. Croston's method

Correct Answer: A. Naïve forecasting

Question 3

For actual demands 100 and 120 and forecasts 90 and 110, the MAE is:

A. 5 units

B. 10 units

C. 15 units

D. 20 units

Correct Answer: B. 10 units

Question 4

Which measure is undefined when an actual demand value is zero?

A. MAE

B. RMSE

C. MAPE

D. ME

Correct Answer: C. MAPE

Question 5

What is the principal purpose of rolling-origin validation?

A. To randomly mix past and future observations

B. To evaluate forecasts using realistic temporal information sets

C. To eliminate all forecast uncertainty

D. To guarantee causal interpretation

Correct Answer: B. To evaluate forecasts using realistic temporal information sets

Question 6

A forecast model that uses next month's confirmed promotion calendar is generally:

A. Using leakage if the calendar was known at forecast issue

B. Using leakage only if the promotion occurs

C. Valid if the information was available at the forecast origin

D. Invalid because promotions cannot be modelled

Correct Answer: C. Valid if the information was available at the forecast origin

Question 7

Which demand pattern contains many zero observations?

A. Intermittent demand

B. Pure trend

C. Constant demand

D. Additive seasonality only

Correct Answer: A. Intermittent demand

Question 8

Demand sensing primarily refers to:

A. Replacing all statistical models with judgement

B. Using recent signals to update short-horizon forecasts

C. Forecasting only annual demand

D. Ignoring inventory availability

Correct Answer: B. Using recent signals to update short-horizon forecasts

Question 9

In simple exponential smoothing, increasing α generally makes the forecast:

A. More responsive to recent observations

B. Independent of recent observations

C. Unable to use an initial level

D. Automatically seasonal

Correct Answer: A. More responsive to recent observations

Question 10

Why should a seasonal-naïve model be retained when testing machine learning?

A. It always has the lowest error

B. It provides a credible benchmark for judging incremental value

C. It requires no historical data

D. It guarantees unbiased forecasts

Correct Answer: B. It provides a credible benchmark for judging incremental value

Logistics Analytics
Chapter 5 of 15