Quant Memo
Core

Gamma and Tweedie Regression

Gamma regression models positive, right-skewed continuous targets like loss severity; Tweedie regression goes further and handles targets that are a mix of exact zeros and positive skewed amounts, like total claim payouts, in a single model.

Prerequisites: The Gamma Distribution, Poisson and Count Regression

Some financial and insurance targets are strictly positive and right-skewed — a bond's loss-given-default severity, a claim size once a claim has actually occurred. Fit ordinary linear regression to these and the model can predict impossible negative amounts, and it mishandles the fact that big losses are rarer but far more spread out than small ones. Gamma regression is built for exactly this shape. A further complication shows up when the target is mostly zero but occasionally a large positive amount — total insurance claims per policy per year, most of which are $0 — where Tweedie regression handles the zero-mass and the skewed positive part in one unified model, instead of two glued together.

The analogy: rainfall in a single day versus rainfall in a season

Gamma regression is like modeling how much rain falls on a day it does rain — always some positive amount, occasionally a lot, rarely a huge amount, never negative, never exactly zero. Tweedie regression is like modeling total rainfall over a month, where some months have genuinely zero rain (dry spell, an exact point mass at 0) and the rest have a right-skewed positive amount when it does rain. Trying to fit one ordinary regression to "total monthly rainfall" ignores that zero isn't just "a small positive number" — it's a qualitatively different outcome (no rain at all happened), and Tweedie regression is built to represent that mixture directly.

The models

Gamma regression models a strictly positive target y>0y>0 via a log link, same structural idea as Poisson regression:

log(μ)=β0+β1x1+,Var(y)=ϕμ2\log(\mu) = \beta_0 + \beta_1 x_1 + \dots, \qquad \text{Var}(y) = \phi \mu^2

Plain English: predictions are always positive (guaranteed by the log link), and — unlike Poisson, where variance equals the mean — Gamma's variance grows with the square of the mean, matching the empirical pattern that bigger losses have proportionally bigger absolute variability, i.e. roughly constant coefficient of variation.

Tweedie regression generalizes this with a power parameter pp controlling the mean-variance relationship, Var(y)=ϕμp\text{Var}(y) = \phi \mu^p. For 1<p<21 < p < 2, the Tweedie distribution is a compound Poisson-Gamma: a Poisson-distributed number of Gamma-distributed positive amounts summed together, which produces exactly the "point mass at zero plus a skewed positive tail" shape:

y=i=1NZi,NPoisson(λ),ZiGamma(α,β)y = \sum_{i=1}^{N} Z_i, \quad N \sim \text{Poisson}(\lambda), \quad Z_i \sim \text{Gamma}(\alpha, \beta)

Plain English: if zero claims occur (N=0N=0), the sum is exactly zero; if one or more claims occur, their sizes sum to a positive, right-skewed amount — one model captures the whole mixture.

Worked example 1: gamma regression on loss severity

Loss severity given default is modeled as log(μ)=1.0+0.4seniority_junior\log(\mu) = 1.0 + 0.4 \cdot \text{seniority\_junior} (an indicator, 1 if junior debt, 0 if senior). For senior debt: μ=e1.02.72\mu = e^{1.0} \approx 2.72 (in units of $10,000, say $27,200). For junior debt: μ=e1.44.06\mu = e^{1.4} \approx 4.06, i.e. about $40,600. Junior debt's expected severity is e0.41.49e^{0.4}\approx1.49 times senior debt's — a 49% higher expected loss, consistent with junior debt's lower recovery priority, and both predictions stay strictly positive by construction.

Worked example 2: Tweedie on a mostly-zero claims target

A book of 1,000 policies has 850 with zero claims for the year and 150 with positive claims averaging $3,000 (right-skewed — mostly $500-$1,500, a few over $20,000). A Tweedie model with p=1.5p=1.5 fits this mixture directly: its fitted mean for a given policy, μ^\hat\mu, already reflects both "probability of any claim" and "size if a claim happens" combined into one number — e.g. \hat\mu = 0.15 \times \3{,}000 = $450$ expected loss per policy, without ever needing to first fit a separate "claim yes/no" classifier and then a separate severity model and multiply the two by hand, since Tweedie's compound-Poisson-Gamma structure does that combination internally.

Distribution · poisson
mean 1.5012345678outcomes (k) →
mean 1.50std dev 1.22peak at k = 1

The zero-vs-positive mass split visible here for small λ\lambda is the same shape Tweedie regression captures for its target variable — a real chance of exactly zero, and otherwise a right-skewed positive spread.

claim amount P(y=0)
A Tweedie target is a spike of mass at exactly zero (no claim) plus a separate right-skewed density for positive claim sizes — one distribution, one model, no gluing required.

What this means in practice

Gamma regression is the standard choice for modeling any strictly-positive, right-skewed continuous outcome in finance — loss severities, position sizes — anywhere ordinary least squares would risk predicting a nonsensical negative value. Tweedie regression is the workhorse of actuarial pricing (insurance premiums, portfolio credit losses with many zero-loss accounts) because it avoids a two-stage frequency-times-severity pipeline and fits the zero-inflated, skewed target in one coherent GLM.

Gamma regression fits strictly positive, right-skewed targets with variance proportional to the mean squared; Tweedie regression extends this to targets that are a mixture of exact zeros and positive skewed amounts by modeling them as a compound Poisson sum of Gamma variables, unifying frequency and severity in one model.

A common mistake is applying Gamma regression directly to a target that contains exact zeros (like raw claim amounts, most of which are $0) — Gamma regression's density is undefined at y=0y=0 and either errors out or forces analysts to add a small offset that distorts the fit. The correct response to zero-inflated positive data isn't to fudge Gamma regression with an artificial offset; it's to either model frequency and severity separately and multiply, or switch to Tweedie regression, which was designed specifically to handle the zero mass without hacks.

Related concepts

Practice in interviews

Further reading

  • Jørgensen, The Theory of Dispersion Models (1997)
  • Ohlsson & Johansson, Non-Life Insurance Pricing with Generalized Linear Models (2010)
ShareTwitterLinkedIn