# Chapter8 - Random-Variate Generation 2 Purpose &...

This preview shows pages 1–8. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Random-Variate Generation 2 Purpose & Overview Develop understanding of generating samples from a specified distribution as input to a simulation model. Illustrate some widely-used techniques for generating random variates. Inverse-transform technique Convolution technique Acceptance-rejection technique A special technique for normal distribution 3 Inverse-transform Technique The concept: For cdf function: r = F(x) Generate R sample from uniform (0,1) Find X sample: X = F-1 ( R ) r 1 x 1 r = F(x) 1 Pr( ) Pr( ( ) ) Pr( ( )) ( ) X x F R x R F x F x- ≤ = ≤ = ≤ = 4 Exponential Distribution [Inverse-transform] Exponential Distribution: Exponential cdf: To generate X 1 , X 2 , X 3 ,… generate R 1 , R 2 , R 3 ,… r = F(x) = 1 – e- λ x for x ≥ X i = F-1 (R i ) = -(1/ λ29 ln(1-R i ) Figure: Inverse-transform technique for e xp( λ = 1) 5 Example: Generate 200 variates X i with distribution exp ( λ = 1) Matlab Code for i=1:200, expnum(i)=-log(rand(1)); end Exponential Distribution [Inverse-transform] R and (1 – R ) have U(0,1) distribution 6 Uniform Distribution: Uniform cdf: To generate X 1 , X 2 , X 3 ,…, generate R 1 , R 2 , R 3 ,… Uniform Distribution [Inverse-transform] ( ) 1 x a x a r F x a x b b a b x ≤ - = = < ≤ - < ( ) i i X a b a R = +- 7 Example: Generate 500 variates X i with distribution Uniform (3,8) Matlab Code for i=1:500, uninum(i)=3+5*rand(1); end Uniform Distribution [Inverse-transform] 8...
View Full Document

## This note was uploaded on 03/01/2012 for the course ECON 102 taught by Professor Mehmet during the Spring '12 term at Abraham Baldwin Agricultural College.

### Page1 / 21

Chapter8 - Random-Variate Generation 2 Purpose &...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online