1 Lesson 3: Choosing from distributions Theory: LLN and Central Limit Theorem Theory: LLN and Central Limit Theorem Choosing from distributions Choosing.

Slides:



Advertisements
Similar presentations
Lectures 6&7: Variance Reduction Techniques
Advertisements

Chapter 7 Hypothesis Testing
Estimation of Means and Proportions
Mean, Proportion, CLT Bootstrap
Monte Carlo Methods and Statistical Physics
CHAPTER 21 Inferential Statistical Analysis. Understanding probability The idea of probability is central to inferential statistics. It means the chance.
Chapter 8: Probability: The Mathematics of Chance Lesson Plan
Review of Basic Probability and Statistics
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
1 MF-852 Financial Econometrics Lecture 4 Probability Distributions and Intro. to Hypothesis Tests Roy J. Epstein Fall 2003.
Computational statistics 2009 Random walk. Computational statistics 2009 Random walk with absorbing barrier.
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
Evaluating Hypotheses
Generating Continuous Random Variables some. Quasi-random numbers So far, we learned about pseudo-random sequences and a common method for generating.
1 Stratified sampling This method involves reducing variance by forcing more order onto the random number stream used as input As the simplest example,
Experimental Evaluation
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Evaluating Hypotheses.
Copyright © Cengage Learning. All rights reserved. 5 Integrals.
Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson6-1 Lesson 6: Sampling Methods and the Central Limit Theorem.
Lecture II-2: Probability Review
Continuous Probability Distribution  A continuous random variables (RV) has infinitely many possible outcomes  Probability is conveyed for a range of.
Review of Probability.
Monte Carlo Integration Digital Image Synthesis Yung-Yu Chuang with slides by Pat Hanrahan and Torsten Moller.
Stat 1510: Introducing Probability. Agenda 2  The Idea of Probability  Probability Models  Probability Rules  Finite and Discrete Probability Models.
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.
Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University ECON 4550 Econometrics Memorial University of Newfoundland.
Chapter 1 Probability and Distributions Math 6203 Fall 2009 Instructor: Ayona Chatterjee.
01/24/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
All of Statistics Chapter 5: Convergence of Random Variables Nick Schafer.
General Principle of Monte Carlo Fall 2013 By Yaohang Li, Ph.D.
1 Lesson 2: RNGs and Choosing from distributions Random number generators (RNG) Random number generators (RNG) General need for random numbers General.
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
Chapter 8: Probability: The Mathematics of Chance Lesson Plan Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Continuous.
1 Statistical Distribution Fitting Dr. Jason Merrick.
Module 1: Statistical Issues in Micro simulation Paul Sousa.
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.
02/10/03© 2003 University of Wisconsin Last Time Participating Media Assignment 2 –A solution program now exists, so you can preview what your solution.
MA-250 Probability and Statistics Nazar Khan PUCIT Lecture 26.
Hypothesis Testing A procedure for determining which of two (or more) mutually exclusive statements is more likely true We classify hypothesis tests in.
Lecture 2 Basics of probability in statistical simulation and stochastic programming Leonidas Sakalauskas Institute of Mathematics and Informatics Vilnius,
Discrete Probability Distributions Define the terms probability distribution and random variable. 2. Distinguish between discrete and continuous.
Lesson 4: Computer method overview
Stats Probability Theory Summary. The sample Space, S The sample space, S, for a random phenomena is the set of all possible outcomes.
Copyright © Cengage Learning. All rights reserved. 4 Integrals.
Chapter 8: Probability: The Mathematics of Chance Lesson Plan Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Continuous.
Ka-fu Wong © 2003 Chap 6- 1 Dr. Ka-fu Wong ECON1003 Analysis of Economic Data.
Review of Probability. Important Topics 1 Random Variables and Probability Distributions 2 Expected Values, Mean, and Variance 3 Two Random Variables.
Sampling and estimation Petter Mostad
Binomial Distributions Chapter 5.3 – Probability Distributions and Predictions Mathematics of Data Management (Nelson) MDM 4U.
Chapter 8: Probability: The Mathematics of Chance Probability Models and Rules 1 Probability Theory  The mathematical description of randomness.  Companies.
Central Limit Theorem Let X 1, X 2, …, X n be n independent, identically distributed random variables with mean  and standard deviation . For large n:
Chapter 8: Probability: The Mathematics of Chance Lesson Plan Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Continuous.
Gil McVean, Department of Statistics Thursday February 12 th 2009 Monte Carlo simulation.
Sums of Random Variables and Long-Term Averages Sums of R.V. ‘s S n = X 1 + X X n of course.
Monte Carlo Integration Digital Image Synthesis Yung-Yu Chuang 12/3/2008 with slides by Pat Hanrahan and Torsten Moller.
Selecting Input Probability Distributions. 2 Introduction Part of modeling—what input probability distributions to use as input to simulation for: –Interarrival.
Lesson 8: Basic Monte Carlo integration
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005
Oliver Schulte Machine Learning 726
CHAPTER 2 RANDOM VARIABLES.
Sampling Distributions and Estimation
Remember that our objective is for some density f(y|) for observations where y and  are vectors of data and parameters,  being sampled from a prior.
Monte Carol Integration
STATISTICAL INFERENCE PART IV
Lecture 2 – Monte Carlo method in finance
Lesson 9: Basic Monte Carlo integration
Lesson 4: Application to transport distributions
Presentation transcript:

1 Lesson 3: Choosing from distributions Theory: LLN and Central Limit Theorem Theory: LLN and Central Limit Theorem Choosing from distributions Choosing from distributions Discrete Discrete Continuous: Direct Continuous: Direct Continuous: Rejection Continuous: Rejection Probability mixing Probability mixing Metropolis method Metropolis method Stratified sampling Stratified sampling

2 Law of Large Numbers Theoretical basis of Monte Carlo is the Law of Large Numbers Theoretical basis of Monte Carlo is the Law of Large Numbers LLN: The weighted average value of the function, : LLN: The weighted average value of the function, : This relates the result of a continuous integration with the result of a discrete sampling. All MC comes from this. This relates the result of a continuous integration with the result of a discrete sampling. All MC comes from this.

3 Law of Large Numbers (2) At first glance, this looks like this would be useful for mathematicians trying to estimate integrals, but not particularly useful to us— We are not performing integrations we are simulating physical phenomena At first glance, this looks like this would be useful for mathematicians trying to estimate integrals, but not particularly useful to us— We are not performing integrations we are simulating physical phenomena This attitude indicates that you are just not thinking abstractly enough—All Monte Carlo processes are (once you dig down) integrations over a domain of “all possible outcomes” This attitude indicates that you are just not thinking abstractly enough—All Monte Carlo processes are (once you dig down) integrations over a domain of “all possible outcomes” Our values of “x” are over all possible lives that a particle might lead Our values of “x” are over all possible lives that a particle might lead

4 Central limit theorem The second most important (i.e., useful) theoretical result for Monte Carlo is the Central Limit Theorem The second most important (i.e., useful) theoretical result for Monte Carlo is the Central Limit Theorem CLT: The sum of a sufficiently large number of independent identically distributed random variables (i.i.d.) becomes normally distributed as N increases CLT: The sum of a sufficiently large number of independent identically distributed random variables (i.i.d.) becomes normally distributed as N increases This is useful for us because we can draw useful conclusions from the results from a large number of samples (e.g., 68.7% within one standard deviation, etc.) This is useful for us because we can draw useful conclusions from the results from a large number of samples (e.g., 68.7% within one standard deviation, etc.) This relates the result of a continuous integration with the result of a discrete sampling. All MC comes from this. This relates the result of a continuous integration with the result of a discrete sampling. All MC comes from this.

5 Overview of pdf and cdf Basic definition of probability density function (p.d.f.): Basic definition of probability density function (p.d.f.): And its integral, the cumulative distribution function (c.d.f.): And its integral, the cumulative distribution function (c.d.f.):

6 Overview of pdf and cdf (2) Corollaries of these definitions: Corollaries of these definitions:

7 Mapping  ->x using p(x) Our basic technique is to use a unique y->x Our basic technique is to use a unique y->x y=  from (0,1) and x from (a,b) y=  from (0,1) and x from (a,b) We are going to use the mapping backwards We are going to use the mapping backwards

8 Mapping (2) Note that:  (a)=0  (a)=0  (b)=1  (b)=1 Function is non-decreasing over domain (a,b) Function is non-decreasing over domain (a,b) Our problem reduces to: Finding  (x) Finding  (x) Inverting to get x(  ), a formula for turning pseudo- random numbers into numbers distributed according to desired  (x) Inverting to get x(  ), a formula for turning pseudo- random numbers into numbers distributed according to desired  (x)

9 Mapping (3) We must have: We must have:

10 Resulting general procedure Form CDF: Form CDF: Set equal to pseudo-random number: Set equal to pseudo-random number: Invert to get formula that translates from  to x: Invert to get formula that translates from  to x:

11 Uniform distribution For our first distribution, pick x uniformly in range (a,b): For our first distribution, pick x uniformly in range (a,b): Step 1: Form CDF. Step 1: Form CDF.

12 Uniform distribution (2) Step 2: Set pseudo-random number to CDF: Step 2: Set pseudo-random number to CDF: Step 3: Invert to get x(  ): Step 3: Invert to get x(  ): Example: Choose  uniformly in (-1,1): Example: Choose  uniformly in (-1,1):

13 Discrete distribution For a discrete distribution, we have N choices of state i, each with probability, so: For a discrete distribution, we have N choices of state i, each with probability, so: Step 1: Form CDF: Step 1: Form CDF:

14 Discrete distribution (2) Step 2: Set pseudo-random number to CDF: Step 2: Set pseudo-random number to CDF: Step 3: Invert to get x(  ): Step 3: Invert to get x(  ):

15 Discrete distribution (3) Example: Choose among 3 states with relative probabilities of 4, 5, and 6. Example: Choose among 3 states with relative probabilities of 4, 5, and 6.

16 Continuous distribution: Direct This fits the “pure” form developed before. This fits the “pure” form developed before. Form CDF: Form CDF: Set equal to pseudo-random number: Set equal to pseudo-random number: Invert to get formula that translates from  to x: Invert to get formula that translates from  to x:

17 Continuous: Direct (2) Example: Pick x from: Example: Pick x from:

18 Testing your selection There are two simple ways to check a routine that is used to choose from a give distribution: binning or moments There are two simple ways to check a routine that is used to choose from a give distribution: binning or moments Binning involves dividing the domain (or part of it) into (usually equal-sized) regions and then counting what fraction of chosen values fall in the region. Binning involves dividing the domain (or part of it) into (usually equal-sized) regions and then counting what fraction of chosen values fall in the region. The expected answer for a bin that goes from a to b is The expected answer for a bin that goes from a to b is This will be approximately equal to (and close enough for our purposes) the midpoint value times the width: This will be approximately equal to (and close enough for our purposes) the midpoint value times the width: The text notes have a Java routine that will perform a bin testing The text notes have a Java routine that will perform a bin testing KEY to algorithm: Bin that x is in:(Integer part of (x-a)/(b-a)*N) (maybe +1) KEY to algorithm: Bin that x is in:(Integer part of (x-a)/(b-a)*N) (maybe +1)

19 Continuous: Rejection Basis of rejection approach: Basis of rejection approach: Usual procedure (using a flat x distribution): 1. Find a value 2. Choose 3. Keep iff Otherwise, return to 1. Otherwise, return to 1.

20 Continuous: Rejection (3) Example: Use rejection to pick x from: Example: Use rejection to pick x from:

21 Basic idea of probability mixing Situations arise in which you have multiple distributions involved in a single decision: Situations arise in which you have multiple distributions involved in a single decision:

22 Probability mixing procedure Real problems do not present themselves so cleanly and you have to figure it out: Real problems do not present themselves so cleanly and you have to figure it out:

23 Probability mixing procedure (2) Procedure: 1. Form and normalize the 2. Choose the distribution i using these

24 Probability mixing procedure (3) Procedure: 3. Form the p.d.f. for distribution i: 4. Choose using

25 Probability mixing procedure (3) Example:Use probability mixing to select x from:

26 Metropolis This is a very non-intuitive procedure that falls under the category of Markov chain MC It will ULTIMATELY deliver a consistent series of x’s distributed according to a desired functional form (which does NOT have to be normalized nor do you need to know a maximum value) It has many advantages for certain physical problems in which the relative probability of a chosen point can be determined even if a closed form of the PDF is not available The main disadvantage is that it is very hard to tell when the procedure has “settled in” to the point that the stream of x’s can be trusted to deliver a consistent distribution This method was (supposedly) worked out as part of an after-dinner conversation in Los Alamos after WWII

27 Metropolis (2) In its simplest form, the procedure is: In its simplest form, the procedure is: Choose x according to a distribution that has certain properties. We will not go into the details except to say that a uniform distribution has all the properties needed! Choose x according to a distribution that has certain properties. We will not go into the details except to say that a uniform distribution has all the properties needed! Evaluate the PDF at the chosen x Evaluate the PDF at the chosen x Decide whether to use the new point according to these rules: Decide whether to use the new point according to these rules: 1. IF the PDF evaluates higher than the PREVIOUSLY chosen point’s PDF, then use the new x 2. IF the PDF evaluates less than the previous point’s PDF, then pull another random number between 0 and 1 ä If the new random number is LESS than the ratio of (new point’s PDF)/(old point’s PDF), then use the new x ä If the previous test fails, then REUSE the old x

28 Stratified sampling This method involves reducing variance by forcing more order onto the random number stream used as input As the simplest example, it can be implemented by FORCING the random number stream to produce EXACTLY half the numbers below 0.5 and half above 0.5 In effect, you are dividing the problem into two subproblems with ½ the width of the domain each This reduces the discrepancy (proportional to the STANDARD DEVIATION) of each to ½ its previous value, which cuts the variance (per history) in half. If time permits, we will work an example in class like the one in the course notes

29 “Other”: Two alternate Choose x from Choose x from using: using: Choose x from Choose x from (Gaussian/normal) using: (Gaussian/normal) using: (Why 12?)

30 Homework from text

31 Homework from text

32 Homework from text