Simulation modeling and analysis
Download
1 / 16

Simulation Modeling and Analysis - PowerPoint PPT Presentation


  • 138 Views
  • Updated On :

Simulation Modeling and Analysis. Sampling from Probability Distributions. 1. Outline. Inverse Transforms for Random Variate Generation Direct Transform and Convolution Acceptance-Rejection Technique. 2. Inverse Transforms for Random Variate Generation.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Simulation Modeling and Analysis' - audra


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Simulation modeling and analysis l.jpg

Simulation Modeling and Analysis

Sampling from Probability Distributions

1


Outline l.jpg
Outline

  • Inverse Transforms for Random Variate Generation

  • Direct Transform and Convolution

  • Acceptance-Rejection Technique

2


Inverse transforms for random variate generation l.jpg
Inverse Transforms for Random Variate Generation

  • Random variates are required to simulate the vagaries of arrivals, service, processing and the like which take place in the real world.

  • Once a reliable RNG is available, how does one use it to obtain random variates with selected statistical distributions?

3


Steps in inverse transform method l.jpg
Steps in Inverse Transform Method

1.- Determine the cdf for the desired RV X.

2.- Set F(X) = R

3.- Solve F(X) = R for X in terms of R. I.e. X = F-1(R)

4.- Generate the necessary RN sequence Ri and use it to compute corresponding values Xi for i = 1,2,…, n

4


Inverse transform method for the exponential distribution l.jpg
Inverse Transform Method for the Exponential Distribution

1.- F(x) = 1 - e - x , x > 0

2.- F(X) = 1 - e - x = R

3.- X = - (1/) ln (1 - R)

4.- For i = 1,2,…, n

Xi = - (1/) ln (1 - Ri)

  • Example: Use RAND in Excel to create 1000 PRN’s and transform them to E. Examine your results in Stat::Fit.

5


Inverse transform method for the uniform distribution l.jpg
Inverse Transform Method for the Uniform Distribution

1.- F(x) = {(x-a)/(b-a) ; 0 for a < x < b

2.- F(X) = (X -a)/(b-a) = R

3.- X = a + (b-a) R

4.- For i = 1,2,…, n

Xi = a + (b-a) Ri

  • Example: Use RAND in Excel to create 1000 PRN’s and transform them to U. Examine your results in Stat::Fit.

6


Inverse transform method for the weibull distribution l.jpg
Inverse Transform Method for the Weibull Distribution

1.- F(x) = 1 - e -x/)  , x > 0

2.- F(X) = 1 - e -X/)  = R

3.- X =  [ ln (1 - R)]1/

4.- For i = 1,2,…, n

Xi =  [ ln (1 - Ri )]1/

  • Example: Use RAND in Excel to create 1000 PRN’s and transform them to W. Examine your results in Stat::Fit.

7


Inverse transform method for the triangular distribution l.jpg
Inverse Transform Method for the Triangular Distribution

1.- F(x) = {0, for x <0; x2/2 for 0<x<1; 1-(2-x)2/2, for 1 <x<2; 1, for x > 2.

2.- R=X2/2 (0<X<1) and R = 1- (2-X)2/2 (1<X<2)

3.- X = 2R1/2 , (0<R<1/2); X = 2 - (2(1-R))1/2 , (1/2<R<1)

  • Example: Use RAND in Excel to create 1000 PRN’s and transform them to W. Examine your results in Stat::Fit.

8


Inverse transform method for empirical distributions l.jpg
Inverse Transform Method for Empirical Distributions

  • Similar procedure applies

  • 1.- Determine the empirical cdf F(x)

  • 2.- Generate R

  • 3.- Using the F(X) curve determine the corresponding value of X.

9


Transform method for distributions without closed form inverse l.jpg
Transform Method for Distributions without Closed Form Inverse

  • Normal, gamma and beta distributions have no closed form inverses. Inverse transform method is applicable only approximately.

  • For example, for the standard normal distribution

    X ~ (R0.135 - (1-R) 0.135)/0.1975

  • Example: Use RAND in Excel to create 1000 PRN’s and transform them to N. Examine your results in Stat::Fit.

10


Inverse transform method for discrete distributions l.jpg
Inverse Transform Method for Discrete Distributions Inverse

  • Similar method applies.

    • Lookup table

    • Algebraic

11


Direct transform for the normal l.jpg
Direct Transform for the Normal Inverse

  • For the normal distribution

    F(x) = -x (1/(2)1/2) e -(t2/2) dt

  • Box-Muller method (pp. 341-343)

    Z1 = (-2 ln R1)1/2 cos(2  R2)

    Z2 = (-2 ln R1)1/2 sin(2  R2)

    X1 =  +  Z1

    X2 =  +  Z2

12


Convolution method l.jpg
Convolution Method Inverse

  • Convolution: the probability distribution of two or more independent RV

  • Useful for Erlang and binomial variates

  • Erlang w/parameters (K,

    • Sum of K independent exponential RV each with mean 1/K

      X = -(1/ K ) ln  Ri

13


Acceptance rejection technique l.jpg
Acceptance-Rejection Technique Inverse

  • Say random variates X are needed uniformly distributed between 1/4 and 1

  • Steps

    1.- Generate R

    2a.- If R > 1/4 make X = R and go to 3

    2b.- If R < 1/4 go to 1 until X is obtained

    3.- Repeat from 1 for another X

14


Acceptance rejection technique for poisson distribution l.jpg
Acceptance-Rejection Technique for Poisson Distribution Inverse

  • Recall Poisson and exponential are closely related.

    P(N=n) = e n/n!

  • Steps

    1.- Set n =0, P=1

    2.- Generate R and replace P by P R

    3.- If P < e , accept N = n, otherwise go to 2

15


Acceptance rejection technique for gamma distribution l.jpg
Acceptance-Rejection Technique for Gamma Distribution Inverse

  • Steps

    1.- Compute a = (2-1)1/2 ; b = 2 - ln 4 + 1/a

    2.- Generate R1, R2

    3.- Compute X =  [R1/(1-R1)]a

    4a.- If X > b-ln(R12R2) reject and go to 2

    4b.- If X < b-ln(R12R2) use X as is or as X/

16


ad