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.

Slides:



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

Markov Chain Monte Carlo Convergence Diagnostics: A Comparative Review By Mary Kathryn Cowles and Bradley P. Carlin Presented by Yuting Qi 12/01/2006.
Monte Carlo Methods and Statistical Physics
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.
Gibbs Sampling Qianji Zheng Oct. 5th, 2010.
Markov-Chain Monte Carlo
Markov Chains Modified by Longin Jan Latecki
11 - Markov Chains Jim Vallandingham.
CHAPTER 16 MARKOV CHAIN MONTE CARLO
Bayesian Reasoning: Markov Chain Monte Carlo
Graduate School of Information Sciences, Tohoku University
Bayesian statistics – MCMC techniques
Suggested readings Historical notes Markov chains MCMC details
BAYESIAN INFERENCE Sampling techniques
CS774. Markov Random Field : Theory and Application Lecture 16 Kyomin Jung KAIST Nov
Computing the Posterior Probability The posterior probability distribution contains the complete information concerning the parameters, but need often.
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.
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
Computational statistics 2009 Random walk. Computational statistics 2009 Random walk with absorbing barrier.
Machine Learning CUNY Graduate Center Lecture 7b: Sampling.
G. Cowan Lectures on Statistical Data Analysis Lecture 13 page 1 Statistical Data Analysis: Lecture 13 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan Lectures on Statistical Data Analysis Lecture 10 page 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem 2Random variables and.
Bayes Factor Based on Han and Carlin (2001, JASA).
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.
Correlation With Errors-In-Variables3/28/20021 Correlation with Errors-In-Variables and an Application to Galaxies William H. Jefferys University of Texas.
880.P20 Winter 2006 Richard Kass 1 Confidence Intervals and Upper Limits Confidence intervals (CI) are related to confidence limits (CL). To calculate.
Model Inference and Averaging
Priors, Normal Models, Computing Posteriors
G. Cowan Lectures on Statistical Data Analysis Lecture 3 page 1 Lecture 3 1 Probability (90 min.) Definition, Bayes’ theorem, probability densities and.
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 Lecture 23: Statistical Estimation with Sampling Iain Murray’s MLSS lecture on videolectures.net:
Module 1: Statistical Issues in Micro simulation Paul Sousa.
Finding Scientific topics August , Topic Modeling 1.A document as a probabilistic mixture of topics. 2.A topic as a probability distribution.
Motif finding with Gibbs sampling CS 466 Saurabh Sinha.
LECTURER PROF.Dr. DEMIR BAYKA AUTOMOTIVE ENGINEERING LABORATORY I.
1 Gil McVean Tuesday 24 th February 2009 Markov Chain Monte Carlo.
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.
Suppressing Random Walks in Markov Chain Monte Carlo Using Ordered Overrelaxation Radford M. Neal 발표자 : 장 정 호.
Bayes’ Nets: Sampling [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
Numerical Bayesian Techniques. outline How to evaluate Bayes integrals? Numerical integration Monte Carlo integration Importance sampling Metropolis algorithm.
The famous “sprinkler” example (J. Pearl, Probabilistic Reasoning in Intelligent Systems, 1988)
MCMC (Part II) By Marc Sobel. Monte Carlo Exploration  Suppose we want to optimize a complicated distribution f(*). We assume ‘f’ is known up to a multiplicative.
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.
An Introduction to Markov Chain Monte Carlo Teg Grenager July 1, 2004.
Lecture #9: Introduction to Markov Chain Monte Carlo, part 3
1 Introduction to Statistics − Day 4 Glen Cowan Lecture 1 Probability Random variables, probability densities, etc. Lecture 2 Brief catalogue of probability.
CS774. Markov Random Field : Theory and Application Lecture 15 Kyomin Jung KAIST Oct
1 Chapter 8: Model Inference and Averaging Presented by Hui Fang.
Introduction to Sampling Methods Qi Zhao Oct.27,2004.
CS Statistical Machine learning Lecture 25 Yuan (Alan) Qi Purdue CS Nov
G. Cowan Lectures on Statistical Data Analysis Lecture 9 page 1 Statistical Data Analysis: Lecture 9 1Probability, Bayes’ theorem 2Random variables and.
Chapter 6 Large Random Samples Weiqi Luo ( 骆伟祺 ) School of Data & Computer Science Sun Yat-Sen University :
Introduction: Metropolis-Hasting Sampler Purpose--To draw samples from a probability distribution There are three steps 1Propose a move from x to y 2Accept.
G. Cowan Lectures on Statistical Data Analysis Lecture 10 page 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem 2Random variables and.
Markov-Chain-Monte-Carlo (MCMC) & The Metropolis-Hastings Algorithm P548: Intro Bayesian Stats with Psych Applications Instructor: John Miyamoto 01/19/2016:
Kevin Stevenson AST 4762/5765. What is MCMC?  Random sampling algorithm  Estimates model parameters and their uncertainty  Only samples regions of.
HW7: Evolutionarily conserved segments ENCODE region 009 (beta-globin locus) Multiple alignment of human, dog, and mouse 2 states: neutral (fast-evolving),
The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press 1 Computational Statistics with Application to Bioinformatics Prof. William.
1 Opinionated in Statistics by Bill Press Lessons #15.5 Poisson Processes and Order Statistics Professor William H. Press, Department of Computer Science,
SIR method continued. SIR: sample-importance resampling Find maximum likelihood (best likelihood × prior), Y Randomly sample pairs of r and N 1973 For.
MCMC Output & Metropolis-Hastings Algorithm Part I
Advanced Statistical Computing Fall 2016
Jun Liu Department of Statistics Stanford University
Markov chain monte carlo
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.
Ch13 Empirical Methods.
Lecture 15 Sampling.
Opinionated Lessons #39 MCMC and Gibbs Sampling in Statistics
Presentation transcript:

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 Summer School Drawing Astrophysical Inferences from Data Sets William H. Press The University of Texas at Austin Lecture 5

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 2 Markov Chain Monte Carlo (MCMC) Data set Parameters We want to go beyond simply maximizing and get the whole Bayesian posterior distribution of Bayes says this is proportional to but with an unknown proportionality constant (the Bayes denominator). It seems as if we need this denominator to find confidence regions, e.g., containing 95% of the posterior probability. With such a sample, we can compute any quantity of interest about the distribution of, e.g., confidence regions, means, standard deviations, covariances, etc. (sorry, we’ve changed notation!) But no! MCMC is a way of drawing samples from the distribution without having to know its normalization!

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 3 Two ideas due to Metropolis and colleagues make this possible: 1. Instead of sampling unrelated points, sample a Markov chain where each point is (stochastically) determined by the previous one by some chosen distribution Although locally correlated, it is possible to make this sequence ergodic, meaning that it visits every x in proportion to  (x). 2. Any distribution that satisfies (“detailed balance”) will be such an ergodic sequence! Deceptively simple proof: Compute distribution of x 1 ’s successor point So how do we find such a p(x i |x i-1 ) ?

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 4 Metropolis-Hastings algorithm: Pick more or less any “proposal distribution” (A multivariate normal centered on x 1 is a typical example.) Then the algorithm is: 1. Generate a candidate point x 2c by drawing from the proposal distribution around x 1 2. Calculate an “acceptance probability” by Notice that the q’s cancel out if symmetric on arguments, as is a multivariate Gaussian 3. Choose x 2 = x 2c with probability , x 2 = x 1 with probability (1-  ) So, It’s something like: always accept a proposal that increases the probability, and sometimes accept one that doesn’t. (Not exactly this because of ratio of q’s.)

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 5 Proof: which is just detailed balance! (“Gibbs sampler”, beyond our scope, is a special case of Metropolis- Hastings. See, e.g., NR3.)

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 6 Let’s do an MCMC example to show how it can be used with models that might be analytically intractable (e.g., discontinuous or non-analytic). [This is the example worked in NR3.] The lazy birdwatcher problem You hire someone to sit in the forest and look for mockingbirds. They are supposed to report the time of each sighting t i –But they are lazy and only write down (exactly) every k 1 sightings (e.g., k 1 = every 3rd) Even worse, at some time t c they get a young child to do the counting for them –He doesn’t recognize mockingbirds and counts grackles instead –And, he writes down only every k 2 sightings, which may be different from k 1 You want to salvage something from this data –E.g., average rate of sightings of mockingbirds and grackles –Given only the list of times –That is, k 1, k 2, and t c are all unknown nuisance parameters This all hinges on the fact that every second (say) event in a Poisson process is statistically distinguishable from every event in a Poisson process at half the mean rate –same mean rates –but different fluctuations –We are hoping that the difference in fluctuations is enough to recover useful information Perfect problem for MCMC

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 7 Waiting time to the kth event in a Poisson process with rate is distributed as Gamma(k, ) And non-overlapping intervals are independent: So Proof: p ( ¿ ) d ¿ = P ( k ¡ 1 coun t s i n¿ ) £ P ( l as t d ¿ h asacoun t ) = P o i sson ( k ¡ 1 ; ¸ ¿ ) £ ( ¸d ¿ ) = ( ¸ ¿ ) k ¡ 1 ( k ¡ 1 ) ! e ¡ ¸ ¿ ¸d ¿

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 8 In the acceptance probability the ratio of the q’s in is just x 2c /x 1, because What shall we take as our proposal generator? This is often the creative part of getting MCMC to work well! For t c, step by small additive changes (e.g., normal) For 1 and 2, step by small multiplicative changes (e.g., lognormal) Bad idea: For k 1,2 step by 0 or ±1 This is bad because, if the ’s have converged to about the right rate, then a change in k will throw them way off, and therefore nearly always be rejected. Even though this appears to be a “small” step of a discrete variable, it is not a small step in the model! Good idea: For k 1,2 step by 0 or ±1, also changing 1,2 so as to keep /k constant in the step This is genuinely a small step, since it changes only the clumping statistics, by the smallest allowed amount.

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 9 Let’s try it. We simulate 1000 t i ’s with the secretly known 1 =3.0,  2 =2.0, t c =200, k 1 =1, k 2 =2 Start with wrong values 1 =1.0,  2 =3.0, t c =100, k 1 =1, k 2 =1 “burn-in” period while it locates the Bayes maximum ergodic period during which we record data for plotting, averages, etc.

The University of Texas at Austin, CS 395T, Spring 2008, Prof. William H. Press IMPRS Summer School 2009, Prof. William H. Press 10 Histogram of quantities during a long-enough ergodic time These are the actual Bayesian posteriors of the model! Could as easily do joint probabilities, covariances, etc., etc. Notice does not converge to being centered on the true values, because the (finite available) data is held fixed. Convergence is to the Bayesian posterior for that data.