Statistical
EWMA (Exponential Smoothing) & Croston Intermittent Demand Forecast formulas
Forecast continuous series via EWMA F_{t+1} = alpha * Y_t + (1 - alpha) * F_t and lumpy zero-heavy spare-parts demand via Croston's Size / Interval ratio.
Smooth a regular series and model intermittent demand separately
Simple exponential smoothing combines the latest observation with the previous forecast. A larger alpha gives the latest observation more weight; choose it using out-of-sample performance rather than a universal recommended band. This example accepts alpha from zero to one, including the fixed-seed and last-observation endpoints, and assumes nonnegative demand without explicit trend or seasonality.
Croston smooths positive demand sizes and intervals between events separately, updating only when positive demand occurs. The resulting ratio estimates average units per period, not the date or size of the next order. The original method can be biased and does not automatically decay to zero during prolonged inactivity; it does not guarantee better forecasts or determine safety stock.
| Period / Method | Actual Demand (A) | EWMA Forecast alpha = 0.40 (B) | Croston Spare-Parts Method |
|---|---|---|---|
| Week 1 (Seed) | 100 | 100.00 (Seed = Y1) | Smoothed Order Size z_hat = 12 u |
| Week 2 | 130 | 0.4*100 + 0.6*100 = 100.00 | Smoothed Interval p_hat = 4 wks |
| Week 3 | 115 | 0.4*130 + 0.6*100 = 112.00 | Croston Rate = 12 / 4 = 3.00 u/wk |
| Week 4 Forecast | Next Period | 0.4*115 + 0.6*112 = 113.20 | Lead-time demand (2 wks) = 6.00 u |
EWMA next-period forecast alpha * Y_t + (1 - alpha) * F_t
Equivalent error-correction form: F_t + alpha * (Y_t - F_t).
=IF(OR(COUNT(A2:A4)<>3,COUNT(D2)<>1,MIN(A2:A4)<0,D2<0,D2>1),"Invalid inputs",ROUND(D2 * A4 + (1 - D2) * B4, 2))Croston intermittent demand rate per period (z_hat / p_hat)
D3 and D4 are supplied smoothed estimates, not a fit to column A. Their ratio is 3 units per period. Columns G:K show a separate complete event-by-event example.
=IF(OR(COUNT(D3:D4)<>2,D3<=0,D4<=0),"Invalid inputs",ROUND(D3 / D4, 4))Walk through the Croston updates in G:K
H counts periods since the previous positive event, including the current period. Before the first event, I and J remain blank and K reports No events. At the first positive observation, initialize size from demand and interval from elapsed periods; this explicit initialization affects early estimates.
At later events, I and J each use alpha times the new observation plus (1-alpha) times the previous estimate. Zero-demand periods retain both estimates. With alpha0.4, the first event12 at period4 gives rate3; the next event8 after four periods gives size10.4, interval4 and rate2.6. These are average rates, not integer replenishment orders.
=K9Try the example
Use the original values or change them to test your understanding.