Generating Continuous Random Variables some. Quasi-random numbers So far, we learned about pseudo-random sequences and a common method for generating.

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

Central Limit Theorem. So far, we have been working on discrete and continuous random variables. But most of the time, we deal with ONE random variable.
Monte Carlo Methods and Statistical Physics
Materials for Lecture 11 Chapters 3 and 6 Chapter 16 Section 4.0 and 5.0 Lecture 11 Pseudo Random LHC.xls Lecture 11 Validation Tests.xls Next 4 slides.
CDA6530: Performance Models of Computers and Networks Chapter 5: Generating Random Number and Random Variables TexPoint fonts used in EMF. Read the TexPoint.
Use of moment generating functions. Definition Let X denote a random variable with probability density function f(x) if continuous (probability mass function.
Markov Chains 1.
Sampling Attila Gyulassy Image Synthesis. Overview Problem Statement Random Number Generators Quasi-Random Number Generation Uniform sampling of Disks,
Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.
Sep 16, 2005CS477: Analog and Digital Communications1 LTI Systems, Probability Analog and Digital Communications Autumn
Computational statistics 2009 Random walk. Computational statistics 2009 Random walk with absorbing barrier.
Simulation Modeling and Analysis
Using random numbers Simulation: accounts for uncertainty: biology (large number of individuals), physics (large number of particles, quantum mechanics),
SUMS OF RANDOM VARIABLES Changfei Chen. Sums of Random Variables Let be a sequence of random variables, and let be their sum:
1 Variance Reduction via Lattice Rules By Pierre L’Ecuyer and Christiane Lemieux Presented by Yanzhi Li.
A Summary of Random Variable Simulation Ideas for Today and Tomorrow.
A) Transformation method (for continuous distributions) U(0,1) : uniform distribution f(x) : arbitrary distribution f(x) dx = U(0,1)(u) du When inverse.
Properties of Random Numbers
The Monte Carlo Method: an Introduction Detlev Reiter Research Centre Jülich (FZJ) D Jülich
Lecture II-2: Probability Review
Hedge with an Edge An Introduction to the Mathematics of Finance Riaz Ahmed & Adnan Khan Lahore Uviersity of Management Sciences Monte Carlo Methods.
Random-Number Generation. 2 Properties of Random Numbers Random Number, R i, must be independently drawn from a uniform distribution with pdf: Two important.
Lecture (16) Introduction to Stochastic Hydrology.
Estimation and Hypothesis Testing. The Investment Decision What would you like to know? What will be the return on my investment? Not possible PDF for.
Simulation Output Analysis
ELEC 303, Koushanfar, Fall’09 ELEC 303 – Random Signals Lecture 11 – Derived distributions, covariance, correlation and convolution Dr. Farinaz Koushanfar.
0 Simulation Modeling and Analysis: Input Analysis K. Salah 8 Generating Random Variates Ref: Law & Kelton, Chapter 8.
Dept of Bioenvironmental Systems Engineering National Taiwan University Lab for Remote Sensing Hydrology and Spatial Modeling STATISTICS Random Variables.
Moment Generating Functions
Monte Carlo Simulation CWR 6536 Stochastic Subsurface Hydrology.
1 Lesson 3: Choosing from distributions Theory: LLN and Central Limit Theorem Theory: LLN and Central Limit Theorem Choosing from distributions Choosing.
1 Lesson 2: RNGs and Choosing from distributions Random number generators (RNG) Random number generators (RNG) General need for random numbers General.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
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, …).
Random Numbers and Simulation  Generating truly random numbers is not possible Programs have been developed to generate pseudo-random numbers Programs.
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:
5.3 Random Variables  Random Variable  Discrete Random Variables  Continuous Random Variables  Normal Distributions as Probability Distributions 1.
LECTURE 25 SIMULATION AND MODELING Md. Tanvir Al Amin, Lecturer, Dept. of CSE, BUET CSE 411.
Monte Carlo Methods So far we have discussed Monte Carlo methods based on a uniform distribution of random numbers on the interval [0,1] p(x) = 1 0  x.
Quasi-Monte Carlo Methods Fall 2012 By Yaohang Li, Ph.D.
STOCHASTIC HYDROLOGY Stochastic Simulation (I) Univariate simulation Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National.
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.
7 sum of RVs. 7-1: variance of Z Find the variance of Z = X+Y by using Var(X), Var(Y), and Cov(X,Y)
Computer simulation Sep. 9, QUIZ 2 Determine whether the following experiments have discrete or continuous out comes A fair die is tossed and the.
CONTINUOUS RANDOM VARIABLES
G. Cowan Lectures on Statistical Data Analysis Lecture 8 page 1 Statistical Data Analysis: Lecture 8 1Probability, Bayes’ theorem 2Random variables and.
Lab for Remote Sensing Hydrology and Spatial Modeling Dept of Bioenvironmental Systems Engineering National Taiwan University 1/45 GEOSTATISTICS INTRODUCTION.
Lecture 3 Types of Probability Distributions Dr Peter Wheale.
Week 21 Order Statistics The order statistics of a set of random variables X 1, X 2,…, X n are the same random variables arranged in increasing order.
Gil McVean, Department of Statistics Thursday February 12 th 2009 Monte Carlo simulation.
G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1 Statistical Data Analysis: Lecture 5 1Probability, Bayes’ theorem 2Random variables and.
Ver Chapter 5 Continuous Random Variables 1 Probability/Ch5.
Module 9.4 Random Numbers from Various Distributions -MC requires the use of unbiased random numbers.
Sums of Random Variables and Long-Term Averages Sums of R.V. ‘s S n = X 1 + X X n of course.
Week 21 Statistical Model A statistical model for some data is a set of distributions, one of which corresponds to the true unknown distribution that produced.
Random Variables By: 1.
Generating Random Variates
10.Deterministic Randomness 1.Random Sequences Random Sequences A sequence of numbers r 1, r 2,... is random if there are no discernible patterns.
Generalization Performance of Exchange Monte Carlo Method for Normal Mixture Models Kenji Nagata, Sumio Watanabe Tokyo Institute of Technology.
Lesson 8: Basic Monte Carlo integration
Functions and Transformations of Random Variables
IEE 380 Review.
Basic simulation methodology
Outline Introduction Signal, random variable, random process and spectra Analog modulation Analog to digital conversion Digital transmission through baseband.
CONTINUOUS RANDOM VARIABLES
Monte Carlo Approximations – Introduction
Statistics Lecture 12.
Generating Random Variates
Presentation transcript:

Generating Continuous Random Variables some

Quasi-random numbers So far, we learned about pseudo-random sequences and a common method for generating them. These will be the inputs to our Monte Carlo processes. So far, we learned about pseudo-random sequences and a common method for generating them. These will be the inputs to our Monte Carlo processes. Alternate source: Quasi-random numbers Alternate source: Quasi-random numbers –They are not really random, so they have to be used very carefully. –They are not used very much for Monte Carlo methods in radiation transport. But, because they are of such importance to the general field of Monte Carlo (i.e., beyond transport methods), you should have a taste of what they are, how to get and use them. But, because they are of such importance to the general field of Monte Carlo (i.e., beyond transport methods), you should have a taste of what they are, how to get and use them.

Quasi-random numbers (2) "Quasi"-random numbers are not random at all; they are a deterministic, equal-division, sequence that are "ordered" in such a way that they can be used by Monte Carlo methods. "Quasi"-random numbers are not random at all; they are a deterministic, equal-division, sequence that are "ordered" in such a way that they can be used by Monte Carlo methods. The easiest to generate are Halton sequences, which are found by "reflecting" the digits of prime base counting integers about their radix point. The easiest to generate are Halton sequences, which are found by "reflecting" the digits of prime base counting integers about their radix point. –You pick a prime number base. –Count in that base. –Reflect the number –Interpret as base 10.

Quasi-random numbers (3) After M=Base N -1 numbers in the sequence, the sequence consists of the equally spaced fractions (i/(M+1), i=1,2,3,...M). After M=Base N -1 numbers in the sequence, the sequence consists of the equally spaced fractions (i/(M+1), i=1,2,3,...M). Therefore, the sequence is actually deterministic, not stochastic. (Like a numerical method.) Therefore, the sequence is actually deterministic, not stochastic. (Like a numerical method.) The beauty of the sequence is that the re- ordering results in the an even coverage of the domain (0,1) even if you stop in the middle. The beauty of the sequence is that the re- ordering results in the an even coverage of the domain (0,1) even if you stop in the middle. Because you need ALL of the numbers in the sequence to cover the (0,1) range (which is not true of the pseudo-random sequence), it is important that all of the numbers of the sequence be used on the SAME decision. Because you need ALL of the numbers in the sequence to cover the (0,1) range (which is not true of the pseudo-random sequence), it is important that all of the numbers of the sequence be used on the SAME decision.

For a Monte Carlo process that has more than one decision, a different sequence must be used for each decision. (This is why we don’t use them.) For a Monte Carlo process that has more than one decision, a different sequence must be used for each decision. (This is why we don’t use them.) The most common way this situation is handled is to use prime numbers in order— 2,5,7,11,etc.—for decisions. (“Halton” sequence, after UNC professor) The most common way this situation is handled is to use prime numbers in order— 2,5,7,11,etc.—for decisions. (“Halton” sequence, after UNC professor) Asymptotic estimate of error is which means closer to ~ 1/N Asymptotic estimate of error is which means closer to ~ 1/N The resulting standard deviations calculated and printed by standard MC codes are NOT accurate: The resulting standard deviations calculated and printed by standard MC codes are NOT accurate: –Get estimates by “oversetting”

Generating Continuous Random Variables some

Generating Continuous Random Variables Suppose that X is a continuous random variable with cdf F(x). Furthermore, suppose that you can invert F. Note that if U~unif(0,1), the random variable F -1 (U) has the same distribution as X!

Generating Continuous Random Variables Example: To generate exponential rate rv’s: pdf: cdf: Now plug in a uniform!

Generating Continuous Random Variables The standard normal distribution: There is no closed form expression for the cdf! normal

Generating Continuous Random Variables The Box-Muller Transformation: Let U 1 and U 2 be independent unif(0,1) rv’s. normal Then is normally distributed with mean 0 and variance 1. So is and X 1 and X 2 are independent!

Generating Continuous Random Variables Acceptance/Rejection Method: want to simulate a rv X with pdf f need to find another function g so that normalize g to a pdf where

want to simulate a rv X with pdf f need to find another function g so that normalize g to a pdf where generate Y with pdf h generate U~unif(0,1) (indep of Y) if U<f(Y)/g(Y), “accept” Y, set X=Y otherwise, “reject” Y, return to

Proof: (discrete case)

Proof: (continued)

So, using this algorithm, Sum both sides over x: What we wanted!

Acceptance/Rejection Method Example: Example: Target Density: Try works

Acceptance/Rejection Method Example: RESULTS: 100,000 draws Target Density: