Вы находитесь на странице: 1из 14


Chapter 9

Random Variate
A value being sampled from a proven
distribution of an input variable.
Examples such as inter-arrival time and
service time.
RV generators techniques used to generate
random variates.

Techniques in Generating
Random Variates
Inverse transform technique
Direct transformation for the normal
Convolution method
Acceptance and rejection technique

Inverse Transform Technique

This technique is used to sample from
distributions such as exponential, weibull,
triangular, and empirical distributions. Most
straightforward, but not always the most

Steps in an Inverse Transform

1. Compute the cdf of the desired random variable x.
2. Set F(X)=R on the range of X.
3. Solve the equation F(X)=R for X in terms of R.
X=f-1 (r).
4. Generate uniform random numbers and compute
the desired random variates by Xi = f-1(Ri).

Derivation of RV generator for

an exponential distribution
Ex. Given exponential distribution,
1 1 x
e ,x 0
f ( x)
0 , otherwise

Thus, the Random Variate Generator is

xi ln(1 Ri )
xi ln( Ri )

Uniform Distribution
,a x b

f ( x) b a
0 , otherwise

Thus, the RVG is

xi a (b a ) Ri

Triangular Distribution
x , a x b

f ( x ) c x , b x c
0 , otherwise

Thus, the RVG is (if a=0, b=1, and c=2)


2 R ,0 R 2
2 2(1 R ) , 1 R 1

Direct Transformation for the

Normal Distribution
Normal distribution

f ( x)

t 2

e dt - x

Direct Transformation for the

Normal Distribution
Using 2 normal random variables, plotted as
a point and represented in a polar coordinates
1/ 2
Z1 (2 Ln( Ri )) cos(2Ri )

Z 2 (2 Ln( Ri ))

1/ 2

sin(2Ri )


X i Z i

Convolution Method
The probability distribution of a sum of two or more
independent random variables is called a convolution of the
distributions of the original variables.
The convolution method refers to adding together two or
more random variables to obtain a new random variable with
the desired distribution. This technique is useful for Erlang
and binomial variates.
For Erlang distribution:
ln Ri
Ln ( Ri )
i 1 K
i 1

Acceptance and Rejection

The efficiency of the technique
depends on being able to minimize
the number of rejections.

Example of Acceptance
Rejection Technique
Generate uniformly distributed random
variates [1/4,1]:
STEP 1: generate RN
STEP 2: if RN > or = , accept, let X=RN. If
RN < , reject and return to 1.
STEP 3:if another uniform random Variate on
[1/4,1] is needed, go to step 1.

Analysis of Simulation Data

Data Collection
Identification of Distribution of Data
Parameter Estimation
Goodness of fit Test