Simulation techniques Summary of the methods we used so far Other methods –Rejection sampling –Importance sampling Very good slides from Dr. Joo-Ho Choi.

Slides:



Advertisements
Similar presentations
Introduction to Monte Carlo Markov chain (MCMC) methods
Advertisements

Bayesian inference of normal distribution
Bayesian Estimation in MARK
Ch 11. Sampling Models Pattern Recognition and Machine Learning, C. M. Bishop, Summarized by I.-H. Lee Biointelligence Laboratory, Seoul National.
Markov-Chain Monte Carlo
Bayesian Methods with Monte Carlo Markov Chains III
Graduate School of Information Sciences, Tohoku University
Suggested readings Historical notes Markov chains MCMC details
Gaussian Processes to Speed up Hamiltonian Monte Carlo Matthieu Lê Journal Club 11/04/141 Neal, Radford M (2011). " MCMC Using Hamiltonian Dynamics. "
Computing the Posterior Probability The posterior probability distribution contains the complete information concerning the parameters, but need often.
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
CONTINUOUS RANDOM VARIABLES These are used to define probability models for continuous scale measurements, e.g. distance, weight, time For a large data.
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.
Computational statistics 2009 Random walk. Computational statistics 2009 Random walk with absorbing barrier.
Bayesian Analysis of X-ray Luminosity Functions A. Ptak (JHU) Abstract Often only a relatively small number of sources of a given class are detected in.
The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 1 4th IMPRS Astronomy.
Machine Learning CUNY Graduate Center Lecture 7b: Sampling.
Using ranking and DCE data to value health states on the QALY scale using conventional and Bayesian methods Theresa Cain.
Properties of Random Numbers
Lecture II-2: Probability Review
Robin McDougall, Ed Waller and Scott Nokleby Faculties of Engineering & Applied Science and Energy Systems & Nuclear Science 1.
Introduction to ModelingMonte Carlo Simulation Expensive Not always practical Time consuming Impossible for all situations Can be complex Cons Pros Experience.
Introduction to Monte Carlo Methods D.J.C. Mackay.
 1  Outline  stages and topics in simulation  generation of random variates.
0 Simulation Modeling and Analysis: Input Analysis K. Salah 8 Generating Random Variates Ref: Law & Kelton, Chapter 8.
Introduction to MCMC and BUGS. Computational problems More parameters -> even more parameter combinations Exact computation and grid approximation become.
1 Institute of Engineering Mechanics Leopold-Franzens University Innsbruck, Austria, EU H.J. Pradlwarter and G.I. Schuëller Confidence.
Exam I review Understanding the meaning of the terminology we use. Quick calculations that indicate understanding of the basis of methods. Many of the.
Machine Learning Lecture 23: Statistical Estimation with Sampling Iain Murray’s MLSS lecture on videolectures.net:
Monte Carlo I Previous lecture Analytical illumination formula This lecture Numerical evaluation of illumination Review random variables and probability.
Module 1: Statistical Issues in Micro simulation Paul Sousa.
1 Gil McVean Tuesday 24 th February 2009 Markov Chain Monte Carlo.
Bayesian Inversion of Stokes Profiles A.Asensio Ramos (IAC) M. J. Martínez González (LERMA) J. A. Rubiño Martín (IAC) Beaulieu Workshop ( Beaulieu sur.
Testing Models on Simulated Data Presented at the Casualty Loss Reserve Seminar September 19, 2008 Glenn Meyers, FCAS, PhD ISO Innovative Analytics.
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.
- 1 - Bayesian inference of binomial problem Estimating a probability from binomial data –Objective is to estimate unknown proportion (or probability of.
Markov-Chain Monte Carlo CSE586 Computer Vision II Spring 2010, Penn State Univ.
Limits to Statistical Theory Bootstrap analysis ESM April 2006.
Example: Bioassay experiment Problem statement –Observations: At each level of dose, 5 animals are tested, and number of death are observed.
Ch. 14: Markov Chain Monte Carlo Methods based on Stephen Marsland, Machine Learning: An Algorithmic Perspective. CRC 2009.; C, Andrieu, N, de Freitas,
MCMC in structure space MCMC in order space.
The generalization of Bayes for continuous densities is that we have some density f(y|  ) where y and  are vectors of data and parameters with  being.
Markov Chain Monte Carlo for LDA C. Andrieu, N. D. Freitas, and A. Doucet, An Introduction to MCMC for Machine Learning, R. M. Neal, Probabilistic.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
- 1 - Matlab statistics fundamentals Normal distribution % basic functions mew=100; sig=10; x=90; normpdf(x,mew,sig) 1/sig/sqrt(2*pi)*exp(-(x-mew)^2/sig^2/2)
1 Chapter 8: Model Inference and Averaging Presented by Hui Fang.
Introduction to Sampling Methods Qi Zhao Oct.27,2004.
The Unscented Particle Filter 2000/09/29 이 시은. Introduction Filtering –estimate the states(parameters or hidden variable) as a set of observations becomes.
- 1 - Outline Introduction to the Bayesian theory –Bayesian Probability –Bayes’ Rule –Bayesian Inference –Historical Note Coin trials example Bayes rule.
Lecture 3 Types of Probability Distributions Dr Peter Wheale.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © 2005 Dr. John Lipp.
Gil McVean, Department of Statistics Thursday February 12 th 2009 Monte Carlo simulation.
- 1 - Preliminaries Multivariate normal model (section 3.6, Gelman) –For a multi-parameter vector y, multivariate normal distribution is where  is covariance.
Kevin Stevenson AST 4762/5765. What is MCMC?  Random sampling algorithm  Estimates model parameters and their uncertainty  Only samples regions of.
The inference and accuracy We learned how to estimate the probability that the percentage of some subjects in the sample would be in a given interval by.
Outline Historical note about Bayes’ rule Bayesian updating for probability density functions –Salary offer estimate Coin trials example Reading material:
SIR method continued. SIR: sample-importance resampling Find maximum likelihood (best likelihood × prior), Y Randomly sample pairs of r and N 1973 For.
Ch 1. Introduction Pattern Recognition and Machine Learning, C. M. Bishop, Updated by J.-H. Eom (2 nd round revision) Summarized by K.-I.
CS498-EA Reasoning in AI Lecture #19 Professor: Eyal Amir Fall Semester 2011.
Generalization Performance of Exchange Monte Carlo Method for Normal Mixture Models Kenji Nagata, Sumio Watanabe Tokyo Institute of Technology.
Markov Chain Monte Carlo in R
Advanced Statistical Computing Fall 2016
Basic simulation methodology
Intro to Sampling Methods
Multidimensional Integration Part I
Introduction to Probability & Statistics The Central Limit Theorem
Ch13 Empirical Methods.
Introductory Statistics
Classical regression review
Presentation transcript:

Simulation techniques Summary of the methods we used so far Other methods –Rejection sampling –Importance sampling Very good slides from Dr. Joo-Ho Choi of Korea Aersopace University, so very minor modifications and kept his format but added his Matlab scripts to notes.

- 2 - Overview of simulation Posterior distribution and posterior prediction –Plot shape of the distribution. –Calculate its statistical properties and confidence bounds. –Additional analysis if necessary. Phase I: analytical approach –Use analytical functions of standard pdfs. Posterior distribution Available pdf Available pdf for Predict. distribution  of Binom.. NA,  of N(     2 of N(    NA

Questions What are the important differences between the binomial and normal distribution as distributions? Assume that the wind speed of hurricanes reaching Gainesville is distributed lognormally and you use the data on all hurricanes in the last century to make predictions. –Give an example of a prediction you will make from the posterior distribution? –Give an example of a prediction you will make from the predictive distribution. –How do we use the results of the previous slide for making these predictions?

- 4 - Overview of simulation Phase II: sampling approach based on factorization –Use sampling technique of standard pdfs. 1.Draw  2 from the marginal pdf 2.Draw  from the conditional pdf Posterior distribution Available Pdf Available pdf for Predict. distribution  2 of N(    NA

- 5 - Overview of simulation Phase III: sampling approach based on factorization –Use sampling technique of inverse CDF for general case. 1.Draw  from the marginal pdf p(  |y). 2.Draw  from the conditional pdf p(  y). Posterior distribution Available Pdf Available pdf for Predict. distribution  of regress for death prob.  Too complex to express in closed form NA

Questions You have recorded the results of a very large number of throws of a pair of dice. All the possible pairs except (5,5) and (6,6) appeared at the same frequency, but these two appeared twice as often as the others. Note that we count (2,3) and (3,2) as separate pairs. –What is the observed marginal distribution of one die? –What is the observed marginal distribution of one die give that the other die fell on 5?

- 7 - Overview of simulation Remark –For more complicated & practical problems, analytic treatment of posterior distribution become more and more difficult or impossible. –A battery of powerful methods has been developed over the past few decades for simulating from probability distributions. References –Chap10 & 11 of Gelman et al. (BDA) –Andrieu, C., et al. (2003). An Introduction to MCMC for Machine Learning. Machine Learning, 50, 5–43. Methods of simulation –Grid method (inverse CDF method) –Rejection sampling –Importance sampling –Markov Chain Monte Carlo (MCMC) method

- 8 - Grid method (inverse CDF method) Procedure –In order to generate samples following pdf f(v), 1.Construct approx. cdf F(v) which is the integral of f(v). 2.Draw random value U from the uniform distribution on [0,1]. 3.let v=F -1 (U). Then the value v will be a random draw from f(v). Practice with matlab Remarks –Effective only when we have knowledge of the range and we miss nothing outside their ranges. –Not good for higher-dimensional multivariate problems, where computing at every point in the multidimensional grid becomes prohibitively expensive. –Conclusion: this method is not used well in practice.

- 9 - Rejection sampling Procedure –In order to generate samples for pdf p(x), introduce an arbitrary pdf q(x) that has sampling capability, such that Mq(x) bounds p(x). 1.Sample  at random from the proposal pdf q(x). 2.With probability p(x)/(Mq(x)), accept x as a draw from p. –M is just chosen such that Mq exceeds p at everywhere. Pseudo-code & illustration

Triangular distribution example p(x)=2x for x in [0,1] –Select q(x)=U[0,1] –Then M=3 is large enough. qsamp=rand(1,5) = px=2*qsamp = qx=ones(1,5) = paccept=px./(3*qx) = accepttest=rand(1,5)= accept=sign(paccept-accepttest)=

Rejection sampling Practice with matlab –generate samples of this distribution. Remarks –it is not always possible to bound p/q with reasonable amount M over the whole space. If M is too large, the acceptance probability Pr(x accepted) ~ 1/M is too small.

Homework For the triangular pdf defined in Slide 10, compare the accuracy of calculating the median and 95% percentile using 1,000 samples with the following techniques: –Using the inverse CDF (please obtain it analytically) –Rejection sampling using the uniform distribution with M=2,3, and10. Denoting the triangular distribution pt(x), consider the joint pdf f(x,y)=pt(x)pt(y). Estimate by sampling the mean of |x- y| without taking advantage of independence using the following techniques: –Grid method –Rejection sampling How many samples do you need for 1% accuracy for each technique ? Source: Smithsonian Institution