LECTURE 25 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411.

Slides:



Advertisements
Similar presentations
RSLAB-NTU Lab for Remote Sensing Hydrology and Spatial Modeling 1 An Introduction to R Pseudo Random Number Generation (PRNG) Prof. Ke-Sheng Cheng Dept.
Advertisements

Outline input analysis input analyzer of ARENA parameter estimation
ISE525: Generating Random Variables. Sources of randomness in a computer? Methods for generating random numbers: – Time of day (Seconds since midnight)
Statistics review of basic probability and statistics.
 1  Outline  generation of random variates  convolution  composition  acceptance/rejection  generation of uniform(0, 1) random variates  linear.
CPSC 531:Random-Variate Generation
Chapter 8 Random-Variate Generation
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Use of moment generating functions. Definition Let X denote a random variable with probability density function f(x) if continuous (probability mass function.
Random Number Generators. Why do we need random variables? random components in simulation → need for a method which generates numbers that are random.
Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.
Simulation Modeling and Analysis
Probability theory 2010 Main topics in the course on probability theory  Multivariate random variables  Conditional distributions  Transforms  Order.
CSE 221: Probabilistic Analysis of Computer Systems Topics covered: Multiple random variables Transform methods (Sec , 4.5.7)
Agenda Purpose Prerequisite Inverse-transform technique
Generating Continuous Random Variables some. Quasi-random numbers So far, we learned about pseudo-random sequences and a common method for generating.
Random-Variate Generation. 2 Purpose & Overview Develop understanding of generating samples from a specified distribution as input to a simulation model.
28-1 ©2006 Raj Jain Random Variate Generation.
Experimental Evaluation
Properties of Random Numbers
The Neymann-Pearson Lemma Suppose that the data x 1, …, x n has joint density function f(x 1, …, x n ;  ) where  is either  1 or  2. Let g(x 1, …,
Random-Number Generation. 2 Properties of Random Numbers Random Number, R i, must be independently drawn from a uniform distribution with pdf: Two important.
Random Number Generation Pseudo-random number Generating Discrete R.V. Generating Continuous R.V.
ETM 607 – Random Number and Random Variates
LECTURE 14 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411.
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
 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.
CPSC 531: Probability Review1 CPSC 531:Distributions Instructor: Anirban Mahanti Office: ICT Class Location: TRB 101.
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.
Moment Generating Functions
PROBABILITY AND STATISTICS FOR ENGINEERING Hossein Sameti Department of Computer Engineering Sharif University of Technology Two Functions of Two Random.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
CS433 Modeling and Simulation Lecture 15 Random Number Generator Dr. Anis Koubâa 24 May 2009 Al-Imam Mohammad Ibn Saud Islamic University College Computer.
Chapter 7 Random-Number Generation
Module 1: Statistical Issues in Micro simulation Paul Sousa.
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, …).
Continuous Distributions The Uniform distribution from a to b.
1 Lesson 8: Basic Monte Carlo integration We begin the 2 nd phase of our course: Study of general mathematics of MC We begin the 2 nd phase of our course:
Stochastic Models Lecture 2 Poisson Processes
Lecture 19 Nov10, 2010 Discrete event simulation (Ross) discrete and continuous distributions computationally generating random variable following various.
More Continuous Distributions
APPENDIX D R ANDOM N UMBER G ENERATION Organization of chapter in ISSO* – General description and linear congruential generators Criteria for “good” random.
One Random Variable Random Process.
Math b (Discrete) Random Variables, Binomial Distribution.
SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
ETM 607 – Random-Variate Generation
Expectation. Let X denote a discrete random variable with probability function p(x) (probability density function f(x) if X is continuous) then the expected.
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.
ENGM 661 Engineering Economics for Managers Risk Analysis.
Generating Random Variates
Chapter 4 Continuous Random Variables and Probability Distributions
MTH 161: Introduction To Statistics
Monte Carol Integration
Random-Variate Generation
GENERATING NON-UNIFORM RANDOM DEVIATES
Chapter 8 Random-Variate Generation
GENERATING NON-UNIFORM RANDOM DEVIATES
Monte Carlo I Previous lecture Analytical illumination formula
Chapter 3 : Random Variables
Random Variate Generation
Generating Random Variates
Empirical Distributions
Presentation transcript:

LECTURE 25 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411

Recap : Inverse Transform Method  Find cumulative distribution function  Let it be F  Find F -1  X = F -1 (R) is the desired variate where R ~ U(0,1)  Other methods are  Accept Reject technique  Composition method  Convolution technique  Special observations

Random variate for Continuous Distribution  We already covered for continuous case :  Proof of inverse transform method(Kelton pg440)  Exponential distribution (Banks 8.1.1)  Uniform distribution (Banks 8.1.2)  Weibull distibution (Banks 8.1.3)  Triangular distribution (Banks 8.1.4)  Empirical continuous distribution (Banks 8.1.5)  Continuous distributions without a closed form inverse (Self study – Banks 8.1.6)

Banks Chapter Kelton Inverse Transform method for Discrete Distributions

Things to remember  If R ~ U(0,1), A Random variable X will assume value x whenever,  Also we should know the identities : We could use this identity also, It results in F -1 (R) = floor(x) which is not useful because x is already an integer for discrete distribution.

Discrete Distributions 0123 R 1 = 0.65 F(x) = F(1) = 0.8 F(x-1) = F(0) = 0.4 X = 1

Empirical Discrete Distribution  Say we want to find random variate for the following discrete distribution.  At first find the F xp(x) xp(x)F(x)

Empirical Discrete Distribution R 1 = 0.73

Discrete Uniform Distribution  Consider 123…K-1k

Discrete Uniform Distribution  Generate R~U(0,1) 123…K-1k, output X= 1 output X= 2 output X= 3, output X= i output X= 4 If generated

Discrete Uniform Distribution, output X=1, output X = i, output 4, output X=2, output X=3 If generated Imp : Expand this method for a general discrete uniform distribution DU(a,b)

Discrete Uniform Distribution  Algorithm to generate random variate for p(x)=1/k where x = 1, 2, 3, … k  Generate R~U(0,1) uniform random number  Return ceil(R*k)

Geometric Distribution Recall :

Geometric Distribution  Algorithm to generate random variate for  Generate R~U(0,1) uniform random number  Return ceil(ln(1-R)/ln(1-p)-1)

Proof of inverse transform method for Discrete case  Kelton Page 444  We need to show that

Disadvantage of Inverse Transform Method  Kelton page  Disadvantage  Need to evaluate F -1. We may not have a closed form. In that case numerical methods necessary. Might be hard to find stopping conditions.  For a given distribution, Inverse transform method may not be the fastest way

Advantage of Inverse Transform Method  Straightforward method, easy to use  Variance reduction techniques has an advantage if inverse transform method is used  Facilitates generation of order statistics.

Kelton Composition Technique

 Applies when the distribution function F from which we wish to generate can be expressed as a convex combination of other distributions F 1, F 2, F 3, …  i.e., for all x, F(x) can be written as

Composition Algorithm  To generate random variate for  Step 1 : Generate a positive random integer j such that  Step 2 : Return X with distribution function F j

Geometric Interpretation  For a continuous random variable X with density f, we might be able to divide the area under f into regions of areas p1,p2,…(corresponding to the decomposition of f into its convex combination representation)  Then we can think of  step 1 as choosing a region  Step 2 as generating from the distribution corresponding to the chosen region

Example 0 a 1-a 1

Example

Proof of composition technique  Kelton page 449