Library · Statistics

Poisson GLM with an exposure offset

A policy observed for three months cannot be compared with one observed for a year. In a Poisson model of claim frequency, exposure enters as an offset: the logarithm of the exposure, with a coefficient fixed at 1.

By , published

Definition

Let N be the number of claims of a policy and e its exposure, in years. The model states that the expected count is the exposure times a rate that depends on the rating factors x:

ln E[ N ] = ln( e ) + xβ

The term ln(e) is the offset. It has no coefficient to estimate. An equivalent formulation models the observed rate N / e with the exposure as weight: for a Poisson model with a log link, the two give the same coefficients. Leaving the exposure out, or adding it as an ordinary covariate, gives a different model.

Worked example

Forty thousand policies are simulated. Young drivers have a higher claim rate and, on average, shorter exposure, because more of them cancel during the year. The true coefficients are known.

import numpy as np
import statsmodels.api as sm
from sklearn.linear_model import PoissonRegressor

rng = np.random.default_rng(31)
n = 40_000
young = rng.random(n) < 0.3
urban = rng.random(n) < 0.5
exposure = np.where(young, rng.uniform(0.05, 0.7, n), rng.uniform(0.3, 1.0, n))
rate = np.exp(-2.3 + 0.6 * young + 0.3 * urban)              # claims per year
claims = rng.poisson(exposure * rate)
X = np.column_stack([young, urban]).astype(float)

offset = sm.GLM(claims, sm.add_constant(X), family=sm.families.Poisson(), offset=np.log(exposure)).fit()
weighted = PoissonRegressor(alpha=0, tol=1e-10, max_iter=1000).fit(X, claims / exposure, sample_weight=exposure)
ignored = sm.GLM(claims, sm.add_constant(X), family=sm.families.Poisson()).fit()

print("                          intercept    young    urban")
print(f"true values               {-2.3:9.3f} {0.6:8.3f} {0.3:8.3f}")
print(f"offset ln(exposure)       {offset.params[0]:9.3f} {offset.params[1]:8.3f} {offset.params[2]:8.3f}")
print(f"rate, weight = exposure   {weighted.intercept_:9.3f} {weighted.coef_[0]:8.3f} {weighted.coef_[1]:8.3f}")
print(f"exposure ignored          {ignored.params[0]:9.3f} {ignored.params[1]:8.3f} {ignored.params[2]:8.3f}")

Output, produced by running the code above when this page was built:

                          intercept    young    urban
true values                  -2.300    0.600    0.300
offset ln(exposure)          -2.284    0.587    0.267
rate, weight = exposure      -2.284    0.587    0.267
exposure ignored             -2.712    0.035    0.266

The offset and the weighted rate model return the same coefficients, close to the truth within sampling noise. Without the exposure, the coefficient of young drivers is far too low: their shorter exposure hides part of their higher claim rate. The factor that is unrelated to exposure is unaffected.

Where it misleads

  • Modelling the rate without the weights is not equivalent. A policy observed for two weeks with one claim becomes a rate of 26 a year with the same weight as a full-year policy.
  • Entering ln(exposure) as a covariate with a free coefficient lets the model depart from proportionality. A coefficient far from 1 is a finding about the data, for instance claims concentrated early in the contract, and not a better model by default.
  • Software differs: some libraries take an offset, others an exposure argument that they log themselves, others only weights. Passing the exposure where its logarithm is expected is a silent error.
  • Very short exposures are often data artefacts: cancellations, mid-term changes that split a policy into several rows. They deserve a check before modelling.

The same offset is used for the pure premium in a Tweedie model, and in any count model where units are observed for unequal times or sizes: visits per patient-year, defects per metre.

In our work

On the public French motor liability data used in our benchmark record, exposure ranges from a few days to a full year. Our frequency models take it as an offset, and the test compares predicted and observed claim counts by exposure band.

References

  1. Ohlsson, E., Johansson, B. (2010). Non-life insurance pricing with generalized linear models. Springer, Berlin. doi:10.1007/978-3-642-10791-7
  2. Goldburd, M., Khare, A., Tevet, D., Guller, D. (2020). Generalized linear models for insurance rating, 2nd edition. Casualty Actuarial Society, Monograph 5. www.casact.org/sites/default/files/2021-01/05-Goldburd-Khare-Tevet.pdf
  3. Noll, A., Salzmann, R., Wüthrich, M. V. (2018). Case study: French motor third-party liability claims. SSRN working paper. doi:10.2139/ssrn.3164764

Have a question like this one on your own data? Tell us what you need in a few lines.

Send us the brief

Related pages

  • The Tweedie GLM for pure premiumMost policies have no claim in a year, and the few that do have costs spread over a wide range. The Tweedie distribution, with a power between 1 and 2, describes that mix in one model of the pure premium.
  • GLM or gradient boosting for insurance pricingA generalised linear model gives a tariff anyone can read: a base rate and one multiplier per factor. Gradient boosting usually predicts better because it picks up interactions and non-linear effects without being told. Most of that gain can often be carried back into a GLM.
  • Poisson or negative binomial demandA count distribution turns a mean forecast into stock levels. The Poisson distribution assumes the variance equals the mean. When orders come in batches the variance is larger, and the negative binomial fits better.
All library pages