Set up the book and the two carriers
Set up the book and the two carriers
The book is the synthetic six-household book in
relativities-examples/ppa/book. Carrier A
rates liability and collision per vehicle for a six-month term. Carrier B rates an account for a
twelve-month term and returns one premium. Compare carriers shows
how to check what each carrier receives.Mark the unknown facts
Set each unknown fact to a blank in the book. Keep liability alone, so both carriers price the same coverage.Write a sampler
Write a function that receives one scenario as a book and a seeded NumPy generator. Make it return the same rows, in order, with the blanks filled. Name each column it fills infills.
Make the draws
Give theStudy the sampler, the number of draws and a seed.
A study is a recipe: study.book(scenario, draw) builds one version of the book.
fills gets a
_source column with reported or modeled. The same seed gives the same draws.
Rate every draw
Rate the study with the market. Then put both premiums on a twelve-month term: double carrier A’s six-month premium.prepare raises for the
blank date, so S5 has the status mapping_failed.
Count how often the ranking holds
Compare the two annual premiums in each sampled draw that both carriers rate.- S1 and S6 have complete facts, so every draw gives the same gap.
- S2: carrier B is cheaper in every draw. The gap runs from 174 a year with V3’s mileage.
- S5: carrier B is cheaper in 88 of 100 draws. Report this ranking as a share of draws.
Count the draws each carrier rates
rated.
These ranges come from your sampling model. They show how much the answer depends on the blanks,
under your assumptions. A different model gives different ranges. Treat the ranking frequency as a
modeled share of draws.