Skip to main content
Find out whether a carrier ranking holds when the book leaves facts blank, such as annual mileage. Install Relativities and download the example data before running this page.
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.
V3 and V6 now have a blank annual mileage. S5’s driver D6 already has a blank first licensed date. Books and studies describes why the book keeps facts as reported.

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 in fills.
This function draws mileage uniformly from 4,000 to 16,000 miles a year. It draws a licensing age from 16 to 33. Put your own model in its place.

Make the draws

Give the Study the sampler, the number of draws and a seed. A study is a recipe: study.book(scenario, draw) builds one version of the book.
Draw 0 is the book as reported, and draws 1 to 100 are sampled. Each column in 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.
In draw 0, the blanks stay blank, so S2 and S5 stay unrated. Carrier B’s 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.
The gap is carrier A’s annual premium less carrier B’s. A positive gap means carrier B has the lower premium.
  • 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 24to24 to 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

Carrier B refuses S3 and S4 in every draw, and carrier A refuses S4. List these submissions with their reasons from 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.

Close the raters