Inversion Method
Study guide: Exam MAS-I
The Inversion Method is a method of simulating a value of a random variable X with a continuous cumulative distribution function F from a random number U that is uniform on (0, 1). The simulated value is the solution of F(X) = U, which is
X = F^{-1}(U)
F^{-1}is the inverse function ofF.
The simulated value has the cumulative distribution function F, because F is increasing and U is uniform:
\begin{aligned} P(X \le x) &= P(F^{-1}(U) \le x) \\ &= P(U \le F(x)) \\ &= F(x) \end{aligned}
A random variable has density
f(x) = 3x^2for0 < x < 1. What value does the inversion method simulate from the random numberu = 0.5?
- The cumulative distribution function is
F(x) = x^3for0 < x < 1.- Setting
F(x) = 0.5givesx^3 = 0.5.- The simulated value is
x = 0.5^{1/3} = 0.7937.
The exponential distribution
An exponential random variable with mean \theta has F(x) = 1 - e^{-x/\theta}. Solving F(X) = U, the simulated value is
X = -\theta \ln(1 - U)
With the rate \lambda = 1/\theta, the simulated value is X = -\ln(1 - U)/\lambda. Because 1 - U is also uniform on (0, 1), X = -\theta \ln U is an exponential random variable with mean \theta as well. The two give different values from the same random number, so a question states which one it uses.
Losses are exponential with mean 1,000. What loss does the inversion method simulate from the random number
u = 0.70?
- The simulated loss is
x = -1{,}000 \ln(1 - 0.70).- It is
-1{,}000 \ln 0.30 = 1{,}203.97.
The Weibull distribution
A Weibull random variable with parameters \theta and \tau has F(x) = 1 - e^{-(x/\theta)^\tau}. Solving F(X) = U, the simulated value is
X = \theta\left(-\ln(1 - U)\right)^{1/\tau}
Losses have a Weibull distribution with
\theta = 1000and\tau = 0.5. What loss does the inversion method simulate from the random numberu = 0.30?
- The simulated loss is
x = 1{,}000\left(-\ln 0.70\right)^{2}.- It is
1{,}000(0.35667)^2 = 127.22.
Sums of exponential random variables
The time of the nth event of a Poisson process with rate \lambda is the sum of n independent exponential interarrival times, each with mean 1/\lambda. Simulating each interarrival time from its own random number U_i, the simulated time of the nth event is
S_n = -\frac{1}{\lambda}\sum_{i=1}^{n} \ln(1 - U_i)
U_1, \ldots, U_nare independent random numbers, each uniform on(0, 1).
The time S_n has a gamma distribution with shape n and mean n/\lambda, so the same sum simulates a gamma random variable whose shape is a whole number.
Claims arrive as a Poisson process at a rate of 2 per month. Using the random numbers
u_1 = 0.40andu_2 = 0.80for the first two interarrival times, what is the simulated time of the second claim?
- The first interarrival time is
-\ln(0.60)/2 = 0.2554months.- The second interarrival time is
-\ln(0.20)/2 = 0.8047months.- The simulated time of the second claim is
S_2 = 0.2554 + 0.8047 = 1.0601months.
Using
Uwhere the question uses1 - UBoth-\theta \ln(1 - U)and-\theta \ln Usimulate the same distribution, but not the same value. For losses with mean 1,000 andu = 0.70, the first gives 1,203.97 and the second gives 356.67. Use the form the question gives.