20.2 Simulation for specific distributions

In this section we will look at a few special cases where either the inversion method may not be the best (or easiest) choice or the situation warrants some additional thoughts.

20.2.1 Discrete mixtures

Recall from Section 4,2.3 that the distribution function for a discrete mixture can be written as

equation

It may be difficult to invert this function, but it may be easy to invert the individual cdfs. This suggests a two-step process for simulating from a mixture distribution.

1. Simulate a value from the discrete random variable J where Pr(J = j) = aj.
2. Use an appropriate method (usually inversion) to simulate an observation from a random variable with distribution function FXJ(y).

EXAMPLE 20.5

Consider the following mixture of exponentials distribution: F(x) = 0.3(1-e−0.02x) + 0.5(1 − e−0.04x) + 0.2(1 − e−0.05x). Use the outlined approach to simulate an observation from this distribution, using u1 = 0.45 and u2 = 0.76 as pseudouniform random numbers.

For simulating values of J, 0 ≤ u < 0.3 simulates a 1, 0.3 ≤ u < 0.8 simulates a 2, and 0.8 ≤ u < 1 simulates a 3. In this case the simulated value of J is 2. The second step requires simulation of an exponential variable with mean 25. The equation to solve is 0.76 = 1 − e−0.04x for x = −ln(1 ...

Get Loss Models: From Data to Decisions, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.