You are on page 1of 12

CST-501

Simulation ( Period 8 )

Presented by

Daw Ank Phyu Win

Associate Professor
Generation of Random Observations from a Probability Distribution

The Inverse Transformation Method

• The cumulative distribution function

• Summary of inverse transformation method

• Generate a uniform random number r between 0 and 1.

• Set F(x) = r and solve for x, which then is the desired random observation from the
probability distribution.
Problem 22.4-3(a)

• to generate three random observations

• uniform random numbers: 0.096, 0.569, 0.665

(a) the uniform distribution from 25 to 75

= = [x] 0.096 29.80

0.569 53.45
=
0.665 5.25
Problem 22.4-3(b)

0.096 0.1133
= (
0.569 0.737
= 0.665 0.06

-1
Problem 22.4-3(c)

• r x=

• = ( 0.096 46.197

0.569 55.086
• =
0.665 56.310
• +40
Problem 22.4-5

,
b. to generate five random observations c. to identify the three uniform random
numbers

Uniform random Random


number, r observations, x Random
observations, , r
0.0956 0.3092
x
0.5629 0.7503 0.09 0.0081
0.6659 0.8160
0.64 0.4096
0.7634 0.8737
0.49 0.2401
0.8426 0.9179
Problem 22.4-7

• to serve a customer on each visit has a uniform distribution between 3 minutes and 8 minutes

• to apply the inverse transformation method

• to simulate the service times for five customers,

• to calculate the average of the five service times

• to compare it to the mean of the service-time distribution

• to apply this method graphically,

• to apply this method algebraically


Problem 22.4-7 (continued)

a. uniform random numbers: 0.6505, 0.0740, 0.8443, 0.4975, 0.8178

1
0.8443
0.8178
Uniform random number

0.6505
0.4975

0.0740

0 3 8

7.22
5.49

6.25
3.37

7.09
Service time (minutes)
Problem 22.4-7

b. = = [x] = (x-3)

x=5r+3

r x = 5r + 3
0.6505 6.25
0.0740 3.37
0.8443 7.22
0.4975 5.49
0.8178 7.09

c. average service time = 5.88


mean service time distribution =
it is higher than mean of 5.5.
Exponential and Erlang Distributions, Normal Distributions

• the cumulative distribution function for the exponential distribution

, for

• the desired random observation from the Erlang distribution

• a random observation from a normal distribution


Problem 22.4-13

to generate two random observations

a. by the exponential distribution b. by the Erlang distribution

mean = mean = , k=2

= = -4 ln (1-r) = -2 ln [(1-1-

r x
0.096 29.80 0.096 0.569 1.8851
0.569 53.45 0.665 0.764 5.075
Problem 22.4-13 (continued)

by the normal distribution

= 4, ,
=4(

x=4(
0.096 0.224 3.428 5.712
0.569 0.950 2.965 3.860
0.665 0.610
0.764 0.145
0.842 0.484
0.492 0.552

You might also like