ModelRisk example · General techniques
Pólya Regression Fitted to Accident Data
How many sports accidents next year, and the two after? A Pólya regression fitted to sixteen years of data.
From the model’s saved run
Accidents in the next three years
With the fitted parameters, and with their uncertainty included.
| Measure | Unit | 10th pct | Median | 90th pct | Mean |
|---|---|---|---|---|---|
| Year 1, fitted parameters | accidents | 652 | 1,183 | 1,939 | 1,253 |
| Year 1, with parameter uncertainty | accidents | 596 | 1,170 | 2,122 | 1,287 |
| Year 2, fitted parameters | accidents | 662 | 1,222 | 2,002 | 1,292 |
| Year 2, with parameter uncertainty | accidents | 616 | 1,216 | 2,189 | 1,336 |
| Year 3, fitted parameters | accidents | 696 | 1,253 | 2,073 | 1,330 |
| Year 3, with parameter uncertainty | accidents | 614 | 1,238 | 2,277 | 1,368 |
| Measure | Unit | Value |
|---|---|---|
| Standard deviation, year 3, fitted parameters | accidents | 554 |
| Standard deviation, year 3, with parameter uncertainty | accidents | 702 |
S-curve (cumulative probability) of Year 3, fitted parameters, Year 3, with parameter uncertainty from the saved simulation.
The business question
A health authority records sports accidents each year. Over sixteen years they have grown from about 650 to about 1,400, with large swings from year to year: far more than a Poisson process would give. A Pólya regression describes them: the expected number grows exponentially, exp(β0 + β1·year), and each year's count scatters around it with extra variation h.
The parameters were fitted by maximising the log-likelihood with Excel's Solver. The authority wants the next three years. Projecting with the fitted parameters alone treats the trend as known. With sixteen noisy years it is not, and the model shows how much that widens the forecast.
- Who it is for
- Analysts forecasting overdispersed counts from a short history: claims, accidents, incidents, demand.
- Main outputs
- Accidents in each of the next three years at P10 / median / P90, with the fitted parameters and with their uncertainty · the fitted trend and its standard error · a check that the stored fit is the maximum.
How the model works
Four sheets after this one, read from left to right. Each one feeds the next.
Inputs sheet
β0 (the log of the expected accidents in year 0), β1 (the growth per year on the log scale) and h, as fitted by Solver.
History sheet
Expected accidents each year, each year's log-likelihood (VosePolyaProb10), and their total, which the fitted parameters maximise. The score (the slope of the log-likelihood) is about 0 at the maximum, which a check confirms.
Forecast sheet
The information matrix, built from the History sheet's weights, gives the covariance of β0 and β1. With fixed parameters each year is VosePolya(1/h, λh). With parameter uncertainty, β0 and β1 are first drawn from their correlated normal distribution (two VoseNormal draws through a Cholesky factor), and λ follows from them.
Results sheet
Percentiles of each year's accidents both ways, the fitted trend with its standard error, and the chart of the history and the fit.
ModelRisk techniques
Find similar models
- Product
- Type
- Application
- Uses
The results in detail
The fitted trend
From the History sheet: the maximum-likelihood fit and its standard error.
| Measure | Unit | Value |
|---|---|---|
| Growth per year, fitted (exp(β1) − 1) | per year | 3.0% |
| Growth per year, minus 2 standard errors | per year | −1.6% |
| Growth per year, plus 2 standard errors | per year | 7.8% |
| Log-likelihood at the fit | ln | −117.90 |
How to read these results
- The fitted trend is about 3% growth a year, but sixteen noisy years pin it down poorly: within two standard errors it could be anything from a small decline to about 8% growth a year.
- With the fitted parameters, the forecast's spread is the Pólya scatter alone. Including the uncertainty in β0 and β1 widens it: the 90th percentile of year 3 moves up by about 200 accidents and the standard deviation by about a quarter, and the difference grows with every year projected.
- The year-to-year scatter is still the larger part of the uncertainty: h = 0.17 means a year's standard deviation is about 40% of its expected value.
- After adding data, refit with Solver (maximise the log-likelihood on the History sheet by changing β0, β1 and h on the Inputs sheet). The score check confirms that the stored parameters are at the maximum.
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.
The fitted Pólya regression 3 inputs
Maximum-likelihood estimates, fitted with Excel's Solver on the History sheet.
| Assumption | Unit | Value |
|---|---|---|
| β0 (log of the expected accidents in year 0)exp(β0) ≈ 1,215 accidents. | 7.101927 | |
| β1 (growth per year, log scale)About 3% a year. | 0.029449 | |
| h (extra variation)A year's variance = λ + hλ². | 0.174214 |
Units and conventions
- Year
- Year 0 is the last year of data; years 1 to 3 are forecast.
- Pólya
- VosePolya(α, β) is a Poisson with a Gamma(α, β) mean: here α = 1/h and β = λh, so the mean is λ and the variance λ + hλ².
- Log scale
- β1 = 0.029 means about 3% growth a year: exp(β1) − 1.
Key assumptions and limitations
- Trend
- Exponential in the year, as in the original example.
- Independence
- Years are independent given the trend.
- Parameter uncertainty
- Approximately normal around the fit (large-sample theory); h is taken as known, which affects only the year-to-year scatter.
- Data
- The accident counts and the fitted parameters are those of ModelRisk's earlier Polya Regression example.
How to use it
- Replace the history on the History sheet with your own counts.
- Refit: run Solver to maximise the log-likelihood by changing β0, β1 and h on the Inputs sheet. The score check reads OK at the maximum.
- Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set).
- Use the forecast with parameter uncertainty: the history is short.
ModelRisk functions used
- VosePolyaProb10
- Each year's log-likelihood (base 10), converted to natural logs.
- VosePolya
- Each forecast year's accidents: a Gamma-mixed Poisson with mean λ.
- VoseNormal
- The two standard normal draws behind the uncertain β0 and β1.
- VoseOutput
- The forecast years as output ranges, both ways.
- VoseSimPercentile, VoseSimStdev
- Statistics of the simulation.
Further reading
- Monte Carlo simulation explained (Vose guide)
- Cameron, A. C. and Trivedi, P. K. (2013). Regression Analysis of Count Data, 2nd edition. Cambridge University Press: the negative binomial (NB2) model.
- Vose, D. (2008). Risk Analysis: A Quantitative Guide, 3rd edition. Wiley: parameter uncertainty in fitted models.
Download the workbook and run it yourself. It opens in Excel with ModelRisk. The free trial runs every example model.
Related example models
- ModelRisk★★★★★Markov Chains: Marital Status in 25 YearsWhere will a group of 100 people be in 25 years?A population moving between four states each year, simulated two ways and checked against the exact expectation.
- ModelRisk★★★★★Envelope Correlation: Interest and Mortgage RatesHow do you make one variable follow another when you only know its range at a few points?Correlating two variables from expert ranges: the second's range follows the first.
- ModelRisk★★★★★Event Counts over Time: Poisson and PólyaHow uncertain is next year's total of house calls?The same expected counts with three amounts of randomness: Poisson, and two ways of adding Pólya's extra variation.
An illustrative example: the figures are invented for teaching and do not describe a real company, project or asset. Last updated 9 October 2026.