ETM 607 – Random-Variate Generation

Slides:



Advertisements
Similar presentations
Special random variables Chapter 5 Some discrete or continuous probability distributions.
Advertisements

Exponential Distribution. = mean interval between consequent events = rate = mean number of counts in the unit interval > 0 X = distance between events.
Chapter 5 Statistical Models in Simulation
CPSC 531:Random-Variate Generation
Chapter 8 Random-Variate Generation
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Random number generation Algorithms and Transforms to Univariate Distributions.
Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.
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.
Probability Distributions
Agenda Purpose Prerequisite Inverse-transform technique
Chapter 6 The Normal Distribution and Other Continuous Distributions
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.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 4 Continuous Random Variables and Probability Distributions.
Properties of Random Numbers
Week 51 Relation between Binomial and Poisson Distributions Binomial distribution Model for number of success in n trails where P(success in any one trail)
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.
Chapter 4 Continuous Random Variables and Probability Distributions
© 2010 Pearson Education Inc.Goldstein/Schneider/Lay/Asmar, CALCULUS AND ITS APPLICATIONS, 12e – Slide 1 of 15 Chapter 12 Probability and Calculus.
Random Number Generation Pseudo-random number Generating Discrete R.V. Generating Continuous R.V.
ETM 607 – Random Number and Random Variates
1 Ch5. Probability Densities Dr. Deshi Ye
Chapter 7: The Normal Probability Distribution
Standard Statistical Distributions Most elementary statistical books provide a survey of commonly used statistical distributions. The reason we study these.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
Week 41 Continuous Probability Spaces Ω is not countable. Outcomes can be any real number or part of an interval of R, e.g. heights, weights and lifetimes.
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.
Statistics for Engineer Week II and Week III: Random Variables and Probability Distribution.
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
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Continuous Random Variables.
LECTURE 25 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411.
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.
STA347 - week 31 Random Variables Example: We roll a fair die 6 times. Suppose we are interested in the number of 5’s in the 6 rolls. Let X = number of.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 25 Simulation.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
Exam 2: Rules Section 2.1 Bring a cheat sheet. One page 2 sides. Bring a calculator. Bring your book to use the tables in the back.
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.
Basic Business Statistics
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Random Variables Example:
Chapter 20 Statistical Considerations Lecture Slides The McGraw-Hill Companies © 2012.
1 1 Slide Continuous Probability Distributions n The Uniform Distribution  a b   n The Normal Distribution n The Exponential Distribution.
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc.. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions Basic Business.
Engineering Probability and Statistics - SE-205 -Chap 3 By S. O. Duffuaa.
Generating Random Variates
Chapter 4 Applied Statistics and Probability for Engineers
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
Probability Distributions: a review
The Exponential and Gamma Distributions
Normal Distribution and Parameter Estimation
Engineering Probability and Statistics - SE-205 -Chap 3
Continuous Probability Distributions
Chapter 8 Random-Variate Generation
Chapter 3 : Random Variables
Random Variate Generation
Further Topics on Random Variables: Derived Distributions
Berlin Chen Department of Computer Science & Information Engineering
Further Topics on Random Variables: Derived Distributions
Further Topics on Random Variables: Derived Distributions
Generating Random Variates
Presentation transcript:

ETM 607 – Random-Variate Generation Inverse-transform technique Exponential Distribution Empirical Continuous Distributions Normal Distribution? Discrete Distributions Empirical Discrete Uniform Geometric Acceptance-Rejection Technique Poisson Process Non-stationary Poisson Process

ETM 607 – Random Number and Random Variates Random-Variate Generation – Chapter 8: Random-Variate generation is converting from a random number (Ri) to a Random Variable, Xi ~ some distribution. Inverse transform method: Step 1 – compute cdf of the desired random variable X Step 2 – Set F(X) = R where R is a random number ~U[0,1) Step 3 – Solve F(X) = R for X in terms of R. X = F-1(R). Step 4 – Generate random numbers Ri and compute desired random variates: Xi = F-1(Ri)

ETM 607 – Random-Variate Generation Recall Exponential distribution: l is often thought of as the arrival rate, and 1/l as the time between arrivals Insert figure 5.9

ETM 607 – Random Number and Random Variates Inverse transform method – Exponential Distribution: Step 1 – compute cdf of the desired random variable X Step 2 – Set F(X) = R where R is a random number ~U[0,1) Step 3 – Solve F(X) = R for X in terms of R. X = F-1(R). Step 4 – Generate random numbers Ri and compute desired random variates:

ETM 607 – Random Number and Random Variates Empirical Continuous Distribution: 2 distinct methods: Few observations Many observations

ETM 607 – Random Number and Random Variates Empirical Continuous Distribution – Few Observations: Given a random variable X which has an empirical continuous distribution, and the following observed values: 0.7 1.6 2.8 1.9 First sorting the values smallest to largest, a cdf can be generated, assuming X can take on values between 0 and the largest observed value.

ETM 607 – Random Number and Random Variates Empirical Continuous Distribution – Few Observations: Considering the inverse-transform method, one needs to find the slope of each line, ai: And knowing that each line segment begins at x(i-1) , then:

ETM 607 – Random Number and Random Variates Empirical Continuous Distribution – Few Observations: In-class Exercise: Create a random-variate generator for the variable X which has an empirical continuous distribution, but assume there are technological reasons the value can never be below 2.5, or above 5.0. Also, the following values were observed: 2.7 3.6 4.8 3.9 4.2 What are the values of X, given random numbers: .05, .27, .75, and .98

ETM 607 – Random Number and Random Variates Empirical Continuous Distribution – Many Observations: Major difference from “few observations” approach – don’t use 1/n to construct cdf, use n/N, where N is the total number of observations, and n is the observed number of observations for a given interval of the random variable X. For the slope, ai: (length of the interval) / (relative frequency of observations within the interval) Where ci is the value of the cumulative distribution at xi. See example next slide.

ETM 607 – Random Number and Random Variates Empirical Continuous Distribution – Many Observations: Insert example 8.3

ETM 607 – Random Number and Random Variates Distributions with no closed form cdf: What if a distribution has no closed form cdf (e.g. normal, gamma, beta)? An inverse transform approximation for the Normal Dist.: Insert Table 8.4

ETM 607 – Random Number and Random Variates Discrete Distributions – Empirical: Recall discrete distribution means the random variable X, takes on countable values (integers). For example, observations for the number of shipments per day were: Then, insert fig 8.6 x p(x) F(x) 0.5 1 0.3 0.8 2 0.2 1.0

ETM 607 – Random Number and Random Variates Discrete Distributions – Empirical: Since, insert fig 8.6 Then,

ETM 607 – Random Number and Random Variates Discrete Uniform Distribution: Inclass Exercise Consider a random variable X which follows a uniform discrete distribution between and including the numbers [5,10]. Develop an inverse transform for X with respect to R.

ETM 607 – Random Number and Random Variates Geometric Distribution: Probability mass function (pmf): Cumulative distribution function (cdf):

ETM 607 – Random Number and Random Variates Geometric Distribution: Knowing the cdf: Using the inverse transform method:

ETM 607 – Random Number and Random Variates Random Variate generation for a discrete random variable X with a Poisson Distribution: Recall the pmf: – referred to as the rate parameter (or mean number of occurrences per unit time) Poisson process is the number of arrivals from an exponential inter-arrival stream with mean time (1/l). Then over one unit of time, x arrivals occur if and only if: Where Ai is the inter-arrival time for the ith unit.

ETM 607 – Random Number and Random Variates Random Variate for a Poisson Distribution: Recall inverse transform method for exponential distribution: Then, Becomes: This leads to a acceptance-rejection algorithm.

ETM 607 – Random Number and Random Variates Using: Step 1: Set n = 0, P = 1. Step 2: Generate a random number Rn+1, and replace P by P*Rn+1. Step 3: If P < e-l, then accept N = n. Otherwise, reject the current n, increase n by one, and return to step 2. In Class Exercise, Given X~Poisson(l = 6 arrivals per unit time), use table A.1 (94737, 08225, 35614, 24826, 88319, 05595, 58701, 57365, 74759, etc…) to generate the first value for X for unit time.

ETM 607 – Random Number and Random Variates Nonstationary Poisson Process (NSPP): A poisson arrival process whose arrival rate (li) changes over time. Think “fast food”. Arrival rates at the lunch and dinner hour much greater than arrival rates during “off hours”. Thinning Process: Generates Poisson arrivals at the fastest rate, but “accept” only a portion of the arrivals, in effect thinning out just enough to get the desired time-varying rate.

ETM 607 – Random Number and Random Variates Nonstationary Poisson Process (NSPP): Suppose arrival rates of 10, 5 and 15 for the first three hours. Thinning (in effect) generates arrivals at a rate of 15 for each of the three hours, but accepts approximately 10/15th’s of the arrivals in the first hour and 5/15th’s of the arrivals in the second hour. Original Thinned 1 2 3 1 2 3

ETM 607 – Random Number and Random Variates Nonstationary Poisson Process (NSPP) – Thinning Algorithm: To generate successive arrival time (Ti) when rates vary: Step 1 – Let l* = max{lt} be the maximum arrival rate, and set t = 0and i = 1. Step 2 – Generate E from the exponential distribution with rate l*, and let t = t+E (the arrival time of the next arrival using max rate). Step 3 - Generate random number R from U[0,1). If R < l(t) / l* then Ti = t and i = i + 1. Step 4 – Go to step 2.