MAS-I · Probability Models · Free Lesson

Simulate random variables using the inversion method and basic Monte Carlo techniques.

Free CAS MAS-I (Modern Actuarial Statistics I) lesson in Probability Models. 10 min read, ~1,549 words.

A reinsurer needs the 99.5% VaR of next year's aggregate losses, and the distribution has no closed form. You write a loop that draws uniform numbers, converts each one into a claim, sums portfolios, and reads off an empirical quantile. That loop is Monte Carlo, and the conversion step is inversion.

Why inversion works. Define the generalized inverse F−1(u)=inf⁡{x:F(x)≥u}F^{-1}(u)=\inf\{x:F(x)\ge u\} (needed for step CDFs). If U∼Uniform(0,1)U\sim\text{Uniform}(0,1), then P(F−1(U)≤x)=P(U≤F(x))=F(x)P(F^{-1}(U)\le x)=P(U\le F(x))=F(x). So X=F−1(U)X=F^{-1}(U) has the target distribution.

KEY: One uniform draw produces exactly one target draw. Inversion is the gold-standard method when F−1F^{-1} is available in closed form or by quick numeric search.

X=−1λln⁡(1−U)forX∼Exponential(λ)X = -\frac{1}{\lambda}\ln(1-U) \quad\text{for}\quad X\sim\text{Exponential}(\lambda)

Because 1−U1-U is also uniform, programmers often write X=−ln⁡(U)/λX=-\ln(U)/\lambda; both are valid. For Weibull(α,θ)(\alpha,\theta): X=θ(−ln⁡(1−U))1/αX=\theta(-\ln(1-U))^{1/\alpha}. For Pareto(α,θ)(\alpha,\theta): X=θ((1−U)−1/α−1)X=\theta((1-U)^{-1/\alpha}-1).

Discrete inversion. Order the support x1<x2<⋯x_1<x_2<\cdots and form cumulative probabilities. Draw UU, then return the smallest xkx_k with F(xk)≥UF(x_k)\ge U.

EXAMPLE: A claim count is 0 w.p. 0.5, 1 w.p. 0.3, 2 w.p. 0.2. Cumulative: 0.5, 0.8, 1.0. If U=0.62U=0.62, return 1. If U=0.81U=0.81, return 2.

Read the full lesson, free →
Worked examples and practice. Free with a free account, no card.

Common mistakes

Bottom line

Exam shortcut

When a question hands you a CDF and a uniform, write X=F−1(U)X=F^{-1}(U) symbolically and solve before computing; exponential, Pareto, Weibull, and uniform on [a,b][a,b] all have one-line inverses. To size a Monte Carlo run, use n=(1.96 s/h)2n=(1.96\,s/h)^2 with the pilot SD whenever a target half-width is given.

The full lesson (about 1,549 words, 10 min read) adds 2 worked examples, all 6 common mistakes, a self-check, free in the app.

Learning objectives

Browse all free MAS-I lessons or jump into free MAS-I practice questions.