Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.

Slides:



Advertisements
Similar presentations
Let X 1, X 2,..., X n be a set of independent random variables having a common distribution, and let E[ X i ] = . then, with probability 1 Strong law.
Advertisements

Joint and marginal distribution functions For any two random variables X and Y defined on the same sample space, the joint c.d.f. is For an example, see.
CPSC 531:Random-Variate Generation
Chapter 8 Random-Variate Generation
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Review of Basic Probability and Statistics
Simulation Modeling and Analysis
Probability Densities
Simulation Modeling and Analysis
Today Today: Chapter 5 Reading: –Chapter 5 (not 5.12) –Suggested problems: 5.1, 5.2, 5.3, 5.15, 5.25, 5.33, 5.38, 5.47, 5.53, 5.62.
Agenda Purpose Prerequisite Inverse-transform technique
Random-Variate Generation. 2 Purpose & Overview Develop understanding of generating samples from a specified distribution as input to a simulation model.
The moment generating function of random variable X is given by Moment generating function.
28-1 ©2006 Raj Jain Random Variate Generation.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 4 Continuous Random Variables and Probability Distributions.
Properties of Random Numbers
Discrete and Continuous Distributions G. V. Narayanan.
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
4-1 Continuous Random Variables 4-2 Probability Distributions and Probability Density Functions Figure 4-1 Density function of a loading on a long,
Random-Number Generation. 2 Properties of Random Numbers Random Number, R i, must be independently drawn from a uniform distribution with pdf: Two important.
1 Automotive Maintenance and Repair Shop Expansion Presentation by Steve Roberson For CST 5306 Modeling and Simulation.
Random Number Generation Pseudo-random number Generating Discrete R.V. Generating Continuous R.V.
ETM 607 – Random Number and Random Variates
 1  Outline  stages and topics in simulation  generation of random variates.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
Chapter 4 – Modeling Basic Operations and Inputs  Structural modeling: what we’ve done so far ◦ Logical aspects – entities, resources, paths, etc. 
Chapter 4 Continuous Random Variables and their Probability Distributions The Theoretical Continuous Distributions starring The Rectangular The Normal.
0 Simulation Modeling and Analysis: Input Analysis K. Salah 8 Generating Random Variates Ref: Law & Kelton, Chapter 8.
Chapter 5 Statistical Models in Simulation
Continuous Probability Distributions  Continuous Random Variable  A random variable whose space (set of possible values) is an entire interval of numbers.
Commonly Used Distributions Andy Wang CIS Computer Systems Performance Analysis.
Statistics for Engineer Week II and Week III: Random Variables and Probability Distribution.
Traffic Modeling.
1 Statistical Distribution Fitting Dr. Jason Merrick.
Use of moment generating functions 1.Using the moment generating functions of X, Y, Z, …determine the moment generating function of W = h(X, Y, Z, …).
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Michael Baron. Probability and Statistics for Computer Scientists,
Lecture 19 Nov10, 2010 Discrete event simulation (Ross) discrete and continuous distributions computationally generating random variable following various.
LECTURE 25 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411.
“ Building Strong “ Delivering Integrated, Sustainable, Water Resources Solutions Statistics 101 Robert C. Patev NAD Regional Technical Specialist (978)
קורס סימולציה ד " ר אמנון גונן 1 ההתפלגויות ב ARENA Summary of Arena’s Probability Distributions Distribution Parameter Values Beta BETA Beta, Alpha Continuous.
4-1 Continuous Random Variables 4-2 Probability Distributions and Probability Density Functions Figure 4-1 Density function of a loading on a long,
One Random Variable Random Process.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 5-1 Business Statistics: A Decision-Making Approach 8 th Edition Chapter 5 Discrete.
COMP155 Computer Simulation September 8, States and Events  A state is a condition of a system at some point in time  An event is something that.
ETM 607 – Random-Variate Generation
Starting point for generating other distributions.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
Learning Simio Chapter 10 Analyzing Input Data
Input Modeling for Simulation Chapter 3 “As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they.
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Chapter 31Introduction to Statistical Quality Control, 7th Edition by Douglas C. Montgomery. Copyright (c) 2012 John Wiley & Sons, Inc.
STA347 - week 91 Random Vectors and Matrices A random vector is a vector whose elements are random variables. The collective behavior of a p x 1 random.
Gil McVean, Department of Statistics Thursday February 12 th 2009 Monte Carlo simulation.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics B: Michael Baron. Probability and Statistics for Computer Scientists,
Generating Random Variates
4-1 Continuous Random Variables 4-2 Probability Distributions and Probability Density Functions Figure 4-1 Density function of a loading on a long,
Random number generation
Random Variable 2013.
Random Variates 2 M. Overstreet Spring 2005
Random-Variate Generation
GENERATING NON-UNIFORM RANDOM DEVIATES
Chapter 8 Random-Variate Generation
GENERATING NON-UNIFORM RANDOM DEVIATES
Chapter 3 : Random Variables
Random Variate Generation
Further Topics on Random Variables: Derived Distributions
Further Topics on Random Variables: Derived Distributions
Further Topics on Random Variables: Derived Distributions
Generating Random Variates
Presentation transcript:

Random-Variate Generation

Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order to run the simulation models involving uncertainty, we need to get samples from these statistical distributions Here, we assume that the distributions (type and parameters) are already specified ARENA comes with ready functions to sample from specified distributions. It is still useful to know how it is done We will generate the variates always using random numbers, whose generation is discussed previously

Inverse Transform Technique -- Exponential Distribution To generate samples from exponential distribution we use the inverse transform technique Step 1. Compute the cdf of the desired random variable X, F(x). Step 2. Find the inverse of F(x) function Step 4. Generate uniform random variables R 1, R 2, R 3, … and compute the desired random variates by

Inverse Transform Technique -- Exponential Distribution

Example: Generate 200 variates X i with distribution exp( = 1) Check: Does the random variable X 1 have the desired distribution?

Proof? Can you prove that the numbers you have generated are indeed samples from an exponential distribution?

Other Distributions Uniform Distribution [ UN(a,b)] (X = a + (b-a)R) Does it really work? Weibull Distribution Derive the transformation Triangular …. The moral is if we can find a closed-form inverse of the cdf for a distribution we can use this method to get samples from that distribution

Continuous Functions without a Closed-Form Inverse Some distributions do not have a closed form expression for their cdf or its inverse (normal, gamma, beta, …) What can be done then? Approximate the inverse cdf For the standard normal distribution: This approximation gives at least one-decimal place accuracy in the range [ , ]

Discrete Distributions An Empirical Discrete Distribution p(0) = P(X=0) = 0.50 p(1) = P(X=1) = 0.30 p(2) = P(X=2) = 0.20 Can we apply the inverse transform technique?

Discrete Distributions Let x 0 = - , and x 1, x 2, …, x n, be the ordered probability mass points for the random variable X Let R be a random number

Discrete Distributions A Discrete Uniform Distribution

Discrete Distributions The Geometric Distribution Some algebraic manipulation and …

Acceptance-Rejection Technique Useful particularly when inverse cdf does not exist in closed form, a.k.a. thinning Illustration: To generate random variates, X ~ U(1/4, 1) R does not have the desired distribution, but R conditioned (R’) on the event {R  ¼} does. Efficiency: Depends heavily on the ability to minimize the number of rejections. Procedures: Step 1. Generate R ~ U[0,1] Step 2a. If R >= ¼, accept X=R. Step 2b. If R < ¼, reject R, return to Step 1 Generate R Condition Output R’ yes no

Acceptance-Rejection Technique Poisson Distribution N can be interpreted as number of arrivals from a Poisson arrival process during one unit of time Then time between the arrivals in the process are exponentially distributed with rate 

Acceptance-Rejection Technique Step 1. Set n = 0, and P = 1 Step 2. Generate a random number R n+1 and let P = P. R n+1 Step 3. If P < e - , then accept N = n. Otherwise, reject current n, increase n by one, and return to step 2 How many random numbers will be used on the average to generate one Poisson variate?

Direct Transformations Consider two normal variables Z 1 and Z 2

Direct Transformation Approach for normal( ,   ): Generate Z i ~ N(0,1) Approach for lognormal( ,   ): Generate X ~ N( ,   ) Y i = e X i X i =  +  Z i

Convolution Method Erlang Distribution An Erlang-K random variable X with parameters (K,  ) (1/  is the mean, K is the stage number) can be obtained by summing K independent exponential random variables each having mean 1/(K  )