Monte Carlo Integration I [RC] Chapter 3

Similar documents
Monte Carlo Integration

Markov Chain Monte Carlo. Simulated Annealing.

1 Review of Probability

Asymptotic distribution of the sample average value-at-risk

MCMC Simulated Annealing Exercises.

Lecture Notes 5 Convergence and Limit Theorems. Convergence with Probability 1. Convergence in Mean Square. Convergence in Probability, WLLN

Mathematical Methods for Neurosciences. ENS - Master MVA Paris 6 - Master Maths-Bio ( )

Chapter 2: Resampling Maarten Jansen

Optimization Methods II. EM algorithms.

IEOR E4703: Monte-Carlo Simulation

Stat 451 Lecture Notes Monte Carlo Integration

Variance reduction. Michel Bierlaire. Transport and Mobility Laboratory. Variance reduction p. 1/18

Asymptotics and Simulation of Heavy-Tailed Processes

Bayesian Inference and MCMC

Lecture 7: Chapter 7. Sums of Random Variables and Long-Term Averages

Chapter 6. Convergence. Probability Theory. Four different convergence concepts. Four different convergence concepts. Convergence in probability

STA205 Probability: Week 8 R. Wolpert

Scientific Computing: Monte Carlo

Introduction and Overview STAT 421, SP Course Instructor

Statistics 3657 : Moment Approximations

COMPSCI 240: Reasoning Under Uncertainty

Central limit theorem for random multiplicative functions

CS145: Probability & Computing

Statistics: Learning models from data

Cherry Blossom run (1) The credit union Cherry Blossom Run is a 10 mile race that takes place every year in D.C. In 2009 there were participants

1 Presessional Probability

Asymptotic distribution of the sample average value-at-risk in the case of heavy-tailed returns

Probability and Measure

6.1 Moment Generating and Characteristic Functions

Optimization and Simulation

19 : Slice Sampling and HMC

Order Statistics and Distributions

Computational statistics

K-ANTITHETIC VARIATES IN MONTE CARLO SIMULATION ISSN k-antithetic Variates in Monte Carlo Simulation Abdelaziz Nasroallah, pp.

Monte Carlo Methods for Computation and Optimization (048715)

Continuous distributions

02 Background Minimum background on probability. Random process

Monte-Carlo MMD-MA, Université Paris-Dauphine. Xiaolu Tan

Practical unbiased Monte Carlo for Uncertainty Quantification

EE514A Information Theory I Fall 2013

18.175: Lecture 15 Characteristic functions and central limit theorem

Selected Exercises on Expectations and Some Probability Inequalities

Practice Problems Section Problems

Lecture Tricks with Random Variables: The Law of Large Numbers & The Central Limit Theorem

Empirical Likelihood Tests for High-dimensional Data

STAT 512 sp 2018 Summary Sheet

Asymptotic Statistics-VI. Changliang Zou

Stochastic Optimization One-stage problem

p. 6-1 Continuous Random Variables p. 6-2

Stat 516, Homework 1

Quantile-quantile plots and the method of peaksover-threshold

Example continued. Math 425 Intro to Probability Lecture 37. Example continued. Example

ST 371 (IX): Theories of Sampling Distributions

P (A G) dp G P (A G)

Introduction to Rare Event Simulation

Stochastic Models (Lecture #4)

Proceedings of the 2015 Winter Simulation Conference L. Yilmaz, W. K. V. Chan, I. Moon, T. M. K. Roeder, C. Macal, and M. D. Rossetti, eds.

The stochastic modeling

Random Variables. Cumulative Distribution Function (CDF) Amappingthattransformstheeventstotherealline.

Phenomena in high dimensions in geometric analysis, random matrices, and computational geometry Roscoff, France, June 25-29, 2012

6.041/6.431 Fall 2010 Quiz 2 Solutions

Functions of Several Random Variables (Ch. 5.5)

Random Variables. Random variables. A numerically valued map X of an outcome ω from a sample space Ω to the real line R

On the convergence of sequences of random variables: A primer

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Statistics. Statistics

Terminology Suppose we have N observations {x(n)} N 1. Estimators as Random Variables. {x(n)} N 1

Random Variables and Their Distributions

STATISTICS/ECONOMETRICS PREP COURSE PROF. MASSIMO GUIDOLIN

Stat 451 Lecture Notes Simulating Random Variables

Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics)

Chapter 3, 4 Random Variables ENCS Probability and Stochastic Processes. Concordia University

Midterm 2 Review. CS70 Summer Lecture 6D. David Dinh 28 July UC Berkeley

Time Series and Dynamic Models

Estimation of arrival and service rates for M/M/c queue system

Why experimenters should not randomize, and what they should do instead

A6523 Modeling, Inference, and Mining Jim Cordes, Cornell University. Motivations: Detection & Characterization. Lecture 2.

Estimation of the quantile function using Bernstein-Durrmeyer polynomials

Math Camp II. Calculus. Yiqing Xu. August 27, 2014 MIT

A Review of Basic Monte Carlo Methods

Disjointness and Additivity

8 Laws of large numbers

Lecture 21: Convergence of transformations and generating a random variable

on t0 t T, how can one compute the value E[g(X(T ))]? The Monte-Carlo method is based on the

MATH4210 Financial Mathematics ( ) Tutorial 7

Extreme Value Analysis and Spatial Extremes

Markov chain Monte Carlo

Bayesian Machine Learning

Theory of Stochastic Processes 3. Generating functions and their applications

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix)

Stochastic Convergence, Delta Method & Moment Estimators

Overall Plan of Simulation and Modeling I. Chapters

Complexity of two and multi-stage stochastic programming problems

Chapter 10. Hypothesis Testing (I)

Econometrics I, Estimation

Review: mostly probability and some statistics

Hochdimensionale Integration

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Negative Association, Ordering and Convergence of Resampling Methods

Transcription:

Aula 3. Monte Carlo Integration I 0 Monte Carlo Integration I [RC] Chapter 3 Anatoli Iambartsev IME-USP

Aula 3. Monte Carlo Integration I 1 There is no exact definition of the Monte Carlo methods. In the course Monte Carlo Method means numeric method of a solution of a mathematical problem using a modeling of random variables and statistical estimation of their parameters. Thus, we are talking numerical method, and not analytical; can resolve not only probabilistic/statistical problems. The official year of birth is 1949: Metropolis N., Ulam S.M. The Monte Caro method. J. Amer. Assoc., 44, 247, 335 341, 1949

Aula 3. Monte Carlo Integration I 2 [RC, p62] The major classes of numerical problems that arise in statistical inference are optimization problems and integration problems. Numerous examples show that it is not always possible to analytically compute the estimators associated with a given paradigm (maximum likelihood, Bayes, method of moment, ext.).

Aula 3. Monte Carlo Integration I 3 [RC, p62] The possibility of producing an almost infinite number of random variables distributed according to a given distribution gives us access to the use of frequentist and asymptotic results much more easily than in the usual inferential settings, where the sample size is most often fixed. One can therefore apply probabilistic results such as the LLN or CLT, since they allow assessment of the convergence of simulation methods (which is equivalent to the deterministic bounds used by numerical approaches).

Aula 3. Monte Carlo Integration I 4 Classical Monte Carlo integration. The generic problem is about the representation of an integral F (x)dx = h(x)f(x)dx =: E ( h(x) ) as the expectation of some function h( ) of a r.v. X with density f( ). The principle of the Monte Carlo method for approximating h(x)f(x)dx =: E ( h(x) ) is to generate a sample (X 1,..., X n ) from the density f and propose as an approximation m n = 1 n n i=1 h(x i ), which converges almost surely to E ( h(x) ) by the Strong LLN.

Aula 3. Monte Carlo Integration I 5 Classical Monte Carlo integration. The following questions arise. how to choose a good r.v. X; how to simulate values of r.v. X; convergence, when to stop.

Aula 3. Monte Carlo Integration I 6 Let X be a real-valued random variable, and let X 1, X 2,... be an infinite sequence of independent and identically distributed copies of X. Let X n := 1 n (X 1 +... X n ) be the empirical average of this sequence. Law of Large Numbers (LLN) is known in two form, weak and strong: Weak LLN. If the first moment of X is finite, i.e. converges in probability to E(X): E( X ) <, then X n ( ) lim P X n E(X) ε = 0, for every ε > 0. n Strong LLN. If the first moment of X is finite, i.e. converges almost surely to E(X): E( X ) <, then X n ( ) P lim X n = E(X) = 1. n

Aula 3. Monte Carlo Integration I 7 Classical Monte Carlo integration. By the Strong LLN the integral approximation m n = 1 n h(x i ) E ( h(x) ), a.s. n i=1 If there exists the second moment, by CLT, for large n m n E ( h(x) ) ( ) N(0, 1), Var h(x) n This leads to the confidence bounds on the approximation of E ( h(x) ).

Aula 3. Monte Carlo Integration I 8 Classical Monte Carlo integration. Indeed, let m := E(X), and v := Var(X) (further we omit h) ( lim P 1 n v ) (X i m) < x = 2Φ(x) 1. n n n i=1 thus for n large ( v ) P m n m < x 2Φ(x) 1. n Given 1 α/2 = Φ(x) we find quantile z 1 α/2 and ( v ) P m n m < z 1 α/2 n 1 α.

Aula 3. Monte Carlo Integration I 9 Classical Monte Carlo integration. [As. p70] Being the same dimension as the expectation m, the standard deviation v is the natural measure of precision rather then the variance v. The rate n 1/2 is intrinsic for virtually any Monte Carlo experiment as the optimal rate which can be achieved. In fact, there are quite a few situations in which one get slower rates such as O(n (1/2 ε) ) with ε > 0, e.g., in gradient estimation via finite differences (VII.1), or variance estimation via time series methods (IV.3). In view of these remarks, one often refers to O(n 1/2 ) as the canonical Monte Carlo convergence rate. There are, however, a few isolated examples (but just a few!) in which O(n 1/2 ) can in fact be improved to supercanonical (faster) rates; see V.7.4 for examples.

Aula 3. Monte Carlo Integration I 10 Classical Monte Carlo integration. Example ([As,p.70], see also [RC] Example 3.4). As an illustration of the slow convergence rate of the Monte Carlo method, consider the estimation of π = 3.1415... via the estimator Z := 4 1(U1 2 + U 2 2 < 1), where U 1, U 2 U[0, 1] are independent r.v.s. Here 1(U1 2 + U 2 2 < 1) B(π/4), and m = E(Z) = π, v = Var(Z) = 4 2 π 4 (1 π 4 ) = 2.70. Thus, to get the leading 3 in π correct w.p. 95% we need m n m 0.5 = z 0.975 v n = 1.96 2.70 n thus n = 1.962 2.7 0.5 = 41, whereas for the next 1 we need 2 n = 1.962 2.7 0.05 = 4, 150, for the 4, n = 1.96 2 2.7 2 0.005 = 415, 000, and so on. 2

Aula 3. Monte Carlo Integration I 11 Classical Monte Carlo integration. If there exists a third central moment β 3 = E(X m) 3 <, the rate convergence in CLT can be improved: P(S n mn > σ nx) 1 e u2 /2 du c 0β 3 2π v 3/2 n where c 0 is an absolute constant such that 1/ π c 0 < 0.9051. x

Aula 3. Monte Carlo Integration I 12 Classical Monte Carlo integration. Sometimes the probable error of a method, r n is used: v v r n = z 0.75 n = 0.6745 n. The name probable is because P{ m n m < r n } = 1/2 = P{ m n m > r n }, i.e. the fluctuations greater then r n and fluctuation less then r n are equiprobable. In practice r n is used to estimate an order of an error.

Aula 3. Monte Carlo Integration I 13 Classical Monte Carlo integration. Errors. [As.p71-72] In many computational settings, one wishes to calculate the solution to a desired level of accuracy. Two accuracy criteria are commonly used: absolute accuracy: accuracy ε relative accuracy: accuracy ε m compute the quantity m to an m n m < ε; compute the quantity m to an m n m < ε m. The confidence interval suggests, in principle, what one should do to achieve such accuracies.

Aula 3. Monte Carlo Integration I 14 Classical MC integration. Production runs. [As.p71-72] The confidence interval suggests, in principle, what one should do to achieve such accuracies. n z2 1 α/2 v ε 2 n z2 1 α/2 v ε 2 m 2 As in the setting of confidence intervals, these runlength determination rules (i.e., rules for selecting n) cannot be implemented directly, since they rely on problem-dependent parameters such as v and m that are unknown.

Aula 3. Monte Carlo Integration I 15 Classical MC integration. Production runs. [As.p.72] As a consequence, the standard means of implementing this idea involves first generating a small number of trial runs (say 50) to estimate v and m 2 by ˆv trial and ˆm 2 trial. One then determines the number n of so-called production runs from either n z2 1 α/2ˆv trial or n z2 1 α/2ˆv trial ε 2 ε 2 ˆm 2, trial depending on whether absolute or relative precision is desired.

Aula 3. Monte Carlo Integration I 16 Classical MC integration. Error without ˆv. Suppose v<. There is a way to estimate an error without calculation of ˆv. Let n = kn 1, where k 3 is integer and not large. Suppose that n 1 is large enough to apply the CLT. Calculate the averages ζ 1 = 1 n 1 n 1 i=1 X i, ζ 2 = 1 n 1 n 1 i=1 X i+n1,..., ζ 2 = 1 n 1 n 1 i=1 X i+n1 (k 1). If ζ 1,..., ζ k are i.i.d. with normal distribution with mean m then t = k 1 x m, where x = 1 s k k ζ i, s 2 = 1 k i=1 k (ζ i x) 2, i=1 has t-student distribution with k 1 degree of freedom.

Aula 3. Monte Carlo Integration I 17 Classical MC integration. Error without ˆv. t = k 1 x m, where x = 1 s k k ζ i, s 2 = 1 k i=1 k (ζ i x) 2, i=1 in our case E(ζ i ) = m, x = m n and s 2 = 1 k k i=1 (ζ i m n ) 2. Thus ( ) x P m n m < x s 2 /(k 1) = 2 p Student k 1 (y)dy and P ( m n m < t k 1,1 α s 2 /(k 1)) = 1 α. The probable error of this method is r n = t k 1,0.5 s 2 /(k 1) 0

Aula 3. Monte Carlo Integration I 18 Classical MC integration. Infinite variance. Recommendation: do not use variables with infinite variance.

Aula 3. Monte Carlo Integration I 19 Classical MC integration. Partial integration. [S] Monte Carlo error is proportional Var(h(X))/n. We cannot to improve n, but we can try to decrease Var(h(X)). Thus the aim is to find estimator with lower variance. The aim is to calculate m = h(x)f(x)dx, where G h L 2 (G; f). Suppose that there exists the function g(x) which integral can be calculated explicitly I = g(x)f(x)dx. G

Aula 3. Monte Carlo Integration I 20 Classical MC integration. Partial integration. [S] Aim: m = G h(x)f(x)dx, known: I = G g(x)f(x)dx. Again, X i f( ) and consider two estimators m n = 1 n i h(x i ), m n = 1 n ( ) I + h(xi ) g(x i ), ( ) ( ) with E h(x) = E I + h(x) g(x) = m, ( ) ( ) 2f(x)dx Var I + h(x) g(x) = h(x) g(x) (m I) 2. If g is close enough to h such that G ( h(x) g(x) ) 2f(x)dx ε, i then Var ( I + h(x) g(x) ) G G ( h(x) g(x) ) 2f(x)dx ε.

Aula 3. Monte Carlo Integration I 21 Classical MC integration. Partial integration. [S] Example. Let h(x) = e x, g(x) = 1 + x. Estimate the integral m = 1 0 ex dx. Compare variance of two estimators: m n = 1 e U i n, and m n = 1 (3 n 2 + eu i 1 U ) i. i Essentially we compare Var(e U ) and Var(e U U). Explicit calculations gives us: Var(e U (3 e)(e 1) ) = = 0.2420 2 Var(e U U) = 6e2 + 36e 53 = 0.0436 12 i

Aula 3. Monte Carlo Integration I 22 References: [RC ] Cristian P. Robert and George Casella. Introducing Monte Carlo Methods with R. Series Use R!. Springer [S ] Sobol, I.M. Monte-Carlo numerical methods. Nauka, Moscow, 1973. (In Russian) [As ] Asmussen, S. and Glynn, P.W. Stochastic Simulation. Algorithms and Analysis. Springer. 2010