New in Wolfram
Mathematica
8: Nonparametric, Derived, and Formula Distributions
◄
previous
|
next
►
Core Algorithms
Model Claim Payments for Insurance
Compute the mean claim payment made by an insurance company using a piecewise transformation of the loss distribution.
In[1]:=
X
LossCDF = ((1 - q) + q (1 - E^(-a x))) HeavisideTheta[ x]; Loss\[ScriptCapitalD] = ProbabilityDistribution[{"CDF", LossCDF}, {x, -\[Infinity], \[Infinity]}, Assumptions -> a > 0 && 0 < q < 1]; PayoutFunction[x_] := Piecewise[{{0, x <= d}, {x - d, d < x < s + d}, {s, x >= s + d}}]; g = Plot[PayoutFunction[x] /. {d -> 400, s -> 1000}, {x, 0, 1800}, PlotStyle -> {Thickness[0.01]}, Filling -> Axis, Exclusions -> None]; Payout\[ScriptCapitalD] = TransformedDistribution[PayoutFunction[x], x \[Distributed] Loss\[ScriptCapitalD], Assumptions -> d > 0 && s > 0 && 0 < q < 1 && a > 0]; m = Mean[Payout\[ScriptCapitalD]];
In[2]:=
X
Framed[Show[g, ImageSize -> 500, PlotLabel -> Style[Grid[{{"Loss Probability = ", q}, {"Loss Distribution = ", ExponentialDistribution[a]}, {"Deductible = ", d}, {"Benefit Limit = ", s}, {"Mean Claim Payment = ", m}}, BaseStyle -> {FontFamily -> "Verdana"}, Alignment -> {{Right, Left}, Automatic}], FontSize -> 14, Bold]], RoundingRadius -> 10, FrameStyle -> GrayLevel@0.3, FrameMargins -> 10, ImageSize -> 550, Background -> Lighter[LightBrown, 0.3]]
Out[2]=