Forecast Random Events: Trend, Seasonality | Vose Software

ModelRisk example · General techniques

Counts of Random Events with Trend and Seasonality

How many car crashes will there be next year, week by week? Random events with a trend, seasons and a new law.

  • Complexity: ★★★★★
  • Free Excel workbook (GU-08)
  • Needs ModelRisk: free trial

From the model’s saved run

Crashes in the year

The year's total against the number expected without the law.

MeasureUnitValue
Expected crashes without the lawcrashes5,441
Mean crashes in the yearcrashes5,236
Chance that the law passes (Inputs sheet)probability70%
Mean crashes avoided by the lawcrashes204
Standard deviation of the year's totalcrashes156
Standard deviation, Poisson noise alonecrashes74
MeasureUnit10th pctMedian90th pctMean
Crashes in the yearcrashes5,0535,2025,4685,236
Crashes per week — 10th / 50th / 90th percentile band
The year's total

The business question

An insurer covers motor accidents across the country, about a hundred crashes a week at the start of the year, a number that grows by about 10% a year. Crashes follow the seasons: half as many again in midwinter, a quarter fewer in summer. Parliament is debating a road-safety law, with a 70% chance of passing.

If it does, it takes effect in a week between the 23rd and the 26th and cuts crashes by 5% to 15% from then on. Within each week crashes happen at random, so the number is Poisson around its expected value. The insurer wants the year's total and its weekly pattern, for reserving and for staffing its claims centre.

Who it is for
Anyone forecasting counts of random events over time: claims, accidents, failures, arrivals, sales of a slow-moving product.
Main outputs
Crashes in the year at P10 / median / P90 against the expected number without the law · week-by-week bands · the crashes the law avoids · how much of the year's uncertainty comes from the law.

How the model works

Three sheets after this one, read from left to right. Each one feeds the next.

  1. Inputs sheet

    The weekly number of crashes at the start of the year and its annual growth, and the law: its chance of passing, the weeks in which it could take effect, and its effect as a PERT.

  2. Weeks sheet

    Each week's expected crashes are the trend × the seasonal index × the law factor, which is 1 until the law applies. The law passes with its probability (VoseBernoulli) in a week drawn from its window (VoseStepUniform). Each week's count is Poisson around its expected value.

  3. Results sheet

    The year's total against the expected number without the law, bands for every week, and the crashes avoided by the law.

ModelRisk techniques

  • Poisson counts with trend and season
  • Uncertain step change VoseStepUniform
  • Time-series outputs VoseOutput

Find similar models

Product
Application

The results in detail

How to read these results

  • Each week's crashes are Poisson around an expected number that grows with the trend, rises in winter and falls in summer, and drops by 5% to 15% once the law applies. The weekly band is widest in winter, when more crashes are expected.
  • The law passes in seven years out of ten and then avoids nearly 300 crashes; on average it avoids about 200.
  • The year's total varies more than Poisson randomness alone would make it: its standard deviation is about twice the square root of the expected number. The extra comes from the law, which is why the histogram has two humps: years with the law and years without it.
  • The 52 weekly counts are one output range, 'Crashes by week': the Results Viewer can show them as a time series.

See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.

Inputs and assumptions

Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.

Crashes now 2 inputs

The level at the start of the year and its growth.

AssumptionUnitValue
Crashes per week at the start of the year (an average week)Before the seasonal index.crashes100
Growth in crashes per yearMore cars, more driving.per year10%
The road-safety law 4 inputs

A law that may pass and cut crashes from the week it takes effect.

AssumptionUnitUncertaintyLowMost likelyHigh
Chance that the law passesprobabilityFixed70%
Earliest week it could take effectweekFixed23
Latest week it could take effectweekFixed26
Change in crashes once it appliesA 5% to 15% cut, most likely 10%.changePERT−15%−10%−5%

Units and conventions

Weeks
Week 1 is the first week of the year.
Seasonal index
The week's crashes relative to an average week: 1.5 is 50% more.
Trend
Annual growth, applied as a constant weekly rate: (1 + growth)^(1/52) − 1.

Key assumptions and limitations

Poisson
Crashes happen independently at a steady rate within a week, so a week's count is Poisson.
Law
Once the law applies, its effect holds for the rest of the year and is the same every week.
Data
The weekly seasonal pattern, starting level and growth are those of ModelRisk's earlier Poisson Series example. The law's chance, timing and effect those of its Seasonal Poisson Random Walk example.

How to use it

  1. Set the starting level, the growth and the law on the Inputs sheet.
  2. Replace the seasonal indices on the Weeks sheet with your own: they should average 1.
  3. Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set).
  4. Open the Results Viewer's time-series view of 'Crashes by week' for more charts.

ModelRisk functions used

VosePoisson
Each week's number of crashes around its expected value.
VoseBernoulli
Whether the law passes.
VoseStepUniform
The week the law takes effect: each week of its window equally likely.
VosePERT
The law's effect on crashes.
VoseOutput
The 52 weekly counts as one output range ('Crashes by week') and the year's total.
VoseSimMean, VoseSimPercentile
Statistics of the simulation, and the weekly bands.

Further reading

  • Monte Carlo simulation explained (Vose guide)
  • Vose, D. (2008). Risk Analysis: A Quantitative Guide, 3rd edition. Wiley: forecasting random events with trend and seasonality.