You are on page 1of 9

CD S Ch 12-1

SUPPLEMENT TO CHAPTER 12:


THE INVERSE TRANSPORTATION METHOD FOR GENERATING
RANDOM OBSERVATIONS
Section 12.1 mentioned that a general mathematical procedure is available for generating random
observations from either discrete or continuous distributions. The procedure for generating these
observations is called the inverse transformation method. To explain and apply the method, we
will use the following notation.

r is a random number.

F(x) is the cumulative distribution function (CDF) of the distribution from which we wish
to generate a random observation. Thus, for each possible value of x, F(x) is the probability
of being less than or equal to x.

For example, Figure 1 shows a random number, r = 0.5271, and also plots F(x) versus x for an
arbitrary probability distribution.

Generating each random observation then requires the following two steps.

The Inverse Transformation Method

1. Generate a random number r.


2. Find the value of x such that F(x) = r. This value of x is the desired random observation
from the probability distribution.

Figure 1 illustrates the graphical application of this method. After locating the value of r along
the vertical axis, a horizontal dashed line is drawn over to F(x). When this line hits the F(x) curve,
a vertical dashed line then is dropped down to the horizontal axis. This point on the horizontal
axis is the desired random observation because it is the value of x such that F(x) = r.

Although the probability distribution shown in Figure 1 is a continuous distribution, the inverse
transformation method also can be used to generate random observations from discrete
distributions. For example, consider the discrete distribution given in Table 12.1 for Example 2 in
Section 12.1. Since the probability that a motor will break down on days 4, 5, and 6 is 0.25, 0.5,
and 0.25, respectively, the CDF of this distribution is the one shown in Figure 2. A random
number of r = 0.8138, for example, then generates the random observation that the breakdown
occurs on day 6.
CD S Ch 12-2

Figure 1: Illustration of the inverse transformation method for obtaining a random observation from a
given probability distribution.

Figure 2: Applying the inverse transformation method to obtain a random observation from the
discrete probability distribution for Example 2 given in Table 1 in Section 12.1.
CD S Ch 12-3

Excels VLOOKUP function is designed specifically for applying the inverse transformation
method to any discrete distribution. This function also can be applied to a continuous distribution
by entering an extensive lookup table that closely approximates the distribution.

For certain common continuous distributions, the equation that F(x) = r has an analytical solution
for x. In such cases, the inverse transformation method enables Excel to quickly generate random
observations from these distributions. Two examples of such distributions are the uniform
distribution and the exponential distribution. We now will illustrate the method with these two
distributions in the context of the case study presented in Section 12.2.

Gen erating Random Observations from The Probability Distributions for Herr
C utters Barber Shop
A computer simulation of the operation of the barber shop described in Section 12.2 requires
generating a series of random observations from the distributions shown in Figures 3 and 4.
Random numbers will be used to do this by directly applying the inverse transformation method.

Figure 5 shows this approach being applied graphically to the probability distribution given in
Figure 3, namely, the distribution of the duration of Herr Cutters haircuts. In this case, the
random number happens to be r = 0.7270. The resulting random observation from this uniform
distribution between 15 and 25 is 22.27.

Figure 3: The cumulative distribution function (CDF) of the duration (in minutes) of haircuts
given by Herr Cutter, so the CDF at any duration gives the probability that the time
required to give a haircut will be less than or equal to this duration.
CD S Ch 12-4

Figure 4: The cumulative distribution function (CDF) of the interarrival times (in minutes) for
Herr Cutters barber shop, so the CDF at any duration gives the probability that the
time between consecutive arrivals is less than or equal to this duration.

Figure 5: Applying the inverse transformation method to obtain a random observation from the
uniform distribution over the interval from 15 to 25 (which is the distribution of the
duration in minutes of Herr Cutters haircuts given in Figure 3).
CD S Ch 12-5

This graphical approach is not very convenient for a computer simulation, so we instead will
apply the inverse transformation method algebraically. The latter procedure involves solving the
equation F(x) = r algebraically for x. For example, the formula for F(x) in Figure 5 is

$0 for x ! 15
&& x " 15
F(x) = % for 15 ! x ! 25
& 10
&'1 for x # 25

Therefore, the F(x) = r equation becomes

x ! 15
= 0.7270
10

so

x - 15 = 10(0.7270) = 7.27

x = 15 + 7.27 = 22.27

When using Excel, the equation to be entered into each cell receiving a random observation from
this uniform distribution is

= 15 + 10*RAND()

For a uniform distribution with lower and upper bounds different from 15 and 25, the lower
bound would be substituted for 15 in this equation and the difference between the two bounds
would be substituted for 10.

Although the exponential distribution is more complicated than the uniform distribution, it is one
of the distributions to which either the graphical or algebraic version of the inverse transformation
method can be applied. Figure 6 shows the application of the graphical procedure to the
exponential distribution in Figure 4 (the distribution of interarrival times in Herr Cutters barber
shop). The random number in this case happens to be r = 0.8130. Plotting carefully gives a
random observation close to the exact value of 50.30.

The CDF for this distribution is

F(x) = 1 - e-x/30 for x = 0

Therefore, applying the algebraic procedure requires solving the equation

1 - e-x/30 = 0.8130

To start,

1 - 0.813 = e-x/30

so
CD S Ch 12-6

e-x/30 = 0.187

The tricky step is to next take the natural logarithm (denoted by ln) of both sides,

ln e-x/30 = ln 0.187

Since ln 0.187 = -1.67665 and the natural logarithm of e to any power is just this power, this
equation reduces to

x
! = -1.67665
30

so

x = 30 (1.67665) = 50.30

is the random observation.

In the same manner, the Excel equation for the random observation generated by any random
number is

= -30*LN(1 - RAND()).

Since 1 - RAND() also is a random number, it is conventional to save performing this subtraction
by instead using the equation

= - 30*LN(RAND())

For an exponential distribution with a different mean, this mean would be substituted for 30 in
this equation.
CD S Ch 12-7

Figure 6: Applying the inverse transformation method to obtain a random observation from the
exponential distribution with a mean of 30 (the distribution of interarrival times in minutes given
in Figure 4 for Herr Cutters barber shop).

Review Questions

1. What is the purpose of the inverse transformation method?

2. What are the two steps used by the inverse tranformation method?

Problems

1. Apply the inverse transformation method as indicated below to generate three random
observations from the uniform distribution between -10 and 40 by using the following
random numbers: 0.0965, 0.5692, 0.6658.
a. Apply this method graphically.
b. Apply this method algebraically.
c. Write the equation that Excel would use to generate each such random observation.
CD S Ch 12-8

2. As described in Problem 12.8, Eddies Bicycle Shop has a thriving business repairing
bicycles. Trisha runs the reception area where customers check in their bicycles to be repaired
and then later pick up their bicycles and pay their bills. She estimates that the time required to
serve a customer on each visit has a uniform distribution between three minutes and eight
minutes.
Apply the inverse transformation method as indicated below to simulate the service times
for five customers by using the following five random numbers: 0.6505, 0.0740, 0.8443,
0.4975, 0.8178.
a. Apply this method graphically.
b. Apply this method algebraically.

3. Reconsider Eddies Bicycle Shop described in the preceding problem. Forty percent of the
bicycles require only a minor repair. The repair time for these bicycles has a uniform
distribution between zero and one hour. Sixty percent of the bicycles require a major repair.
The repair time for these bicycles has a uniform distribution between one hour and two hours.
You now need to estimate the mean of the overall probability distribution of the repair times
for all bicycles by using the following alternative methods.
a. Draw the cumulative distribution function (CDF) for the overall probability distribution
of the repair times for all bicycles. (Hint: This CDF = 0.4 at one hour.)
b. Use the inverse transformation method with the three random numbers 0.2243, 0.9503,
and 0.6104 to generate three random observations from the overall distribution
considered in part a. Calculate the average of these observations to estimate the mean of
this distribution.

4. The employees of General Manufacturing Corp. receive health insurance through a group
plan issued by Wellnet. During the past year, 40 percent of the employees did not file any
health insurance claims, 40 percent filed only a small claim, and 20 percent filed a large
claim. The small claims were spread uniformly between 0 and $2,000, whereas the large
claims were spread uniformly between $2,000 and $20,000.
Based on this experience, Wellnet now is negotiating the corporations premium payment
per employee for the upcoming year. You are a management science analyst for the insurance
carrier, and you have been assigned the task of estimating the average cost of insurance
coverage for the corporations employees.
Follow the instructions of Problem 3, where the size of an employees health insurance
claim (including zero if no claim was filed) now plays the role that the repair time for a
bicycle did in Problem 3.

5. Richard Collins, manager and owner of Richards Tire Service, wishes to use computer
simulation to analyze the operation of his shop. One of the activities to be included in the
computer simulation is the installation of automobile tires (including balancing the tires).
Richard estimates that the cumulative distribution function (CDF) of the probability
distribution of the time (in minutes) required to install a tire has the graph shown below.
CD S Ch 12-9

a. Use the inverse transformation method to generate five random observations from this
distribution when using the following five random numbers: 0.2655, 0.3472, 0.0248,
0.9205, 0.6130.
b. Use a nested IF function to write an equation that Excel can use to generate each random
observation from this distribution.

6. Consider the probability distribution whose cumulative distribution function is


F(x) = x2 if 0 x 1
Suppose you need to generate random observations from this distribution to help perform a
computer simulation.
a. Derive an expression for each random observation in terms of the random number r.
b. Generate five random observations for this distribution by using the following random
numbers: 0.0956, 0.5629, 0.6695, 0.7634, 0.8426.
c. The inverse transformation method was applied to generate the following three random
observations from this distribution: 0.09, 0.64, 0.49. Identify the three random numbers
that were used.
d. Write an equation that Excel can use to generate each random observation from this
distribution.

You might also like