1 / 13

Chapter 8 Random-Variate Generation

Chapter 8 Random-Variate Generation. Purpose & Overview. X = (-1/ λ ) ln(1 – R). Inverse Transform Technique Exponential, uniform, weibull and triangular and empirical distributions. Exponential Distribution: Consider a RV X that is expo. Distributed with mean λ

maryvirgil
Download Presentation

Chapter 8 Random-Variate Generation

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 8 Random-Variate Generation

  2. Purpose & Overview

  3. X = (-1/λ) ln(1 – R) Inverse Transform Technique Exponential, uniform, weibull and triangular and empirical distributions. Exponential Distribution: Consider a RV X that is expo. Distributed with meanλ Step 1 : Compute the cdf of the desired random variable X. F(X)=1 - e –λx , x>=0. Step2: Set F(X)=R on the range of X. 1 - e –λx = R , x>=0 Step3: Solve the equation F(X) = R for X in terms of R. Step 4: Generate uniform random nos R1, R2, R3…………. And compute the desired random variates by Xi = F -1 (Ri ) F -1 (R) = (-1/λ) ln(1 – R) Xi = (-1/λ) ln(1 – Ri) = (-1/λ) ln Ri

  4. Inverse Transform Technique Uniform distribution: Consider a RV X that is uniformly distributed on interval [a,b] Step1: cdf is 0 , x < a F(x) = (x-a) / (b-a) , a <= x <=b 1 , x > b Step2: Set F(X) = (X – a)/(b – a) = R Step3: Solving for X in terms of R yields X = a + (b – a)R

  5. X = α [ -ln(1-R)]1/β Inverse Transform Technique Weibull Distribution: Consider a RV X that has Weibull distribution with α>0 ,β >0 v=0 Step1: cdf is given by F(X)= 1 - e –(x/ α) Step2: Let F(X) = R Step3 :Solving for X in terms of R yields

  6. Triangular Distribution Consider a RV X that has triangular distribution with end points (0,2) and mode at 1 Step1 :Cdf is 0 x<=0 F(X)= x2/2 0< x <=1 1 - ((2-x)2/2) 1<x<=2 1 x>2 Step2: For 0<= X <=1, R = x2/2 and for 1<= X <=2 , R = 1 - ((2-x)2/2) Step3: X = sqrt(2R) , 0 <= R <= ½ = 2 – sqrt(2(1 – R)) , ½ < R <= 1

  7. Convolution Method Refers to adding together two or more random variables to obtain a new random variable with desired distribution. Used to obtain Erlang variates and bionomial variates. • This equation implies that K uniform random nos are needed for each erlang variate generated.

  8. Erlang Distribution An Erlang R.V X with para (k, θ) can be shown to be the sum of K independent expo. RVs , Xi(i=1,2…….K), each having mean 1/K θ i.e X= ∑ Xi i = 1…….K Since each Xi can be generated by equation Xi= (-1/λ) ln Ri with λ = 1/K θ, an Erlang variate can be generated by X = ∑ (-1/k θ)ln Ri = (-1/k θ)ln (πRi) i = 1…….K This equation implies that K uniform random nos are needed for each erlang variate generated. Example.

  9. Acceptance –Rejection Technique Uniform Distribution Generate random variates uniformly distributed between ¼ and 1 Step 1: Generate a random number R Step2a: If R >= ¼, accept X=R then go to step 3 . Step2b: If R< ¼ , reject R and return to step1. Step3: If another uniform random variate on [1/4 , 1] is needed, repeat the procedure beginning at step1. If not, stop. Here R itself does not have a desired distribution but R conditioned on the event {R>=1/4} does have a desired distribution. The efficiency of this technique depends heavily on being able to minimize the number of rejections. The mean no. of random numbers R required to generate one variate X is one more than number of rejections.

  10. Acceptance –Rejection Technique Poisson Distribution Steps for generating a Poisson random variate: • Set n=0, P=1. • Generate a random number Rn+1 and replace P by P. Rn+1 • If P < e-α then accept N=n. Otherwise , reject the current n, increase n by one, and return to step2.

  11. Acceptance –Rejection Technique Gamma Distribution Step 1: Compute a = (2β - 1)1/2 b = 2β – ln 4 + 1/a Step 2: Generate R1 and R2. Step 3: Compute X = β[ R1/ (1-R1) ]a . Step 4a: If , reject X and return to step 2. Step 4b:If ,use X as the desired variate(Mean=variance=β) Step 5: Replace X by X / βθ (if it is desired to have mean=1/θ and var=1/ βθ2 )

More Related