Claims 1: Claim Frequency
Uses Only Free-Tier SpiceGrinder
Problem statement
Underwriting and claims analytics teams need volume: large numbers of realistic claim counts and dollar amounts to stress-test pricing models, reserve calculations, and reporting pipelines. Real claims data can’t do this job well — even if you ignore that it’s probably full of policyholder PII that can’t leave a controlled environment, it only ever shows you losses that have already happened, never the catastrophe cluster or inflation shock your capital model needs to be tested against before it happens for real.
The model
How many claims land in a period is a count — a Poisson distribution, the standard choice for “some number of discrete events happen at some average rate.” How large each claim is, is a differently-shaped question: claim sizes are never symmetric, they cluster around a typical value and then stretch out into a long tail of expensive ones — a Lognormal. The model defines these and then uses an Append filter to combine them into a single observation.
<?xml version="1.0" encoding="UTF-8"?>
<dataset seed="42">
<root node="ClaimObservation"/>
<nodes>
<Append name="ClaimObservation">
<input name="Frequency"/>
<input name="Severity"/>
</Append>
<Poisson name="Frequency" lambda="3.5"/>
<Lognormal name="Severity" mu="8.0" sigma="1.2"/>
</nodes>
</dataset>
Run it (samples/financial/claims-frequency-severity.xml in your own install, if you want to reproduce this) and you get pairs of (count, amount) (exactly these values if you leave the seed at 42):
5,1020.778556837366
3,1693.1643701755693
8,7302.257200899249
3,3138.666173127485
2,10602.841505098377
7,841.5588556042717
4,1369.5704367902017
2,1058.766952109387
Why this shape, and not another
Poisson only ever produces non-negative integers — you cannot get a -2 claim count out of it, which is the whole point of choosing it over, say, a Normal you’d have to remember to clamp and round yourself. Lognormal only ever produces positive numbers too, and it does so with the heavy right tail severity actually has: a few outsized claims pulling the mean well above the median, which is what real severity distributions look like and what something like a Normal distribution would get wrong.
The choices of lambda="3.5" or mu="8.0" sigma="1.2" are there as an example. If you’re using this model for your own purposes, you can change those parameters to match your data.