FREDRIK BAJERS VEJ 7 G 9220 AALBORG ØST Tlf.: URL: Fax: Monte Carlo methods

Similar documents
Posterior Inference. , where should we start? Consider the following computational procedure: 1. draw samples. 2. convert. 3. compute properties

ELEMENTS OF MONTE CARLO SIMULATION

Monte Carlo Simulations in the Teaching Process

Strategies for Improving the Efficiency of Monte-Carlo Methods

Monte Carlo Methods in Option Pricing. UiO-STK4510 Autumn 2015

Statistical Computing (36-350)

Generating Random Numbers

IEOR E4703: Monte-Carlo Simulation

Chapter 2 Uncertainty Analysis and Sampling Techniques

Interval estimation. September 29, Outline Basic ideas Sampling variation and CLT Interval estimation using X More general problems

MATH 3200 Exam 3 Dr. Syring

Corso di Identificazione dei Modelli e Analisi dei Dati

Confidence Intervals Introduction

Chapter 7: Point Estimation and Sampling Distributions

درس هفتم یادگیري ماشین. (Machine Learning) دانشگاه فردوسی مشهد دانشکده مهندسی رضا منصفی

Advanced Financial Economics Homework 2 Due on April 14th before class

CPSC 540: Machine Learning

University of California Berkeley

IEOR E4703: Monte-Carlo Simulation

Point Estimation. Stat 4570/5570 Material from Devore s book (Ed 8), and Cengage

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMSN50)

Much of what appears here comes from ideas presented in the book:

Version A. Problem 1. Let X be the continuous random variable defined by the following pdf: 1 x/2 when 0 x 2, f(x) = 0 otherwise.

Applied Statistics I

CPSC 540: Machine Learning

Chapter 4: Asymptotic Properties of MLE (Part 3)

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMSN50)

Chapter 5. Sampling Distributions

Exam in TFY4275/FY8907 CLASSICAL TRANSPORT THEORY Feb 14, 2014

Ch4. Variance Reduction Techniques

Importance Sampling for Option Pricing. Steven R. Dunbar. Put Options. Monte Carlo Method. Importance. Sampling. Examples.

Bias Reduction Using the Bootstrap

Exact Sampling of Jump-Diffusion Processes

Lecture 17: More on Markov Decision Processes. Reinforcement learning

Hand and Spreadsheet Simulations

Back to estimators...

Importance Sampling and Monte Carlo Simulations

Two hours. To be supplied by the Examinations Office: Mathematical Formula Tables and Statistical Tables THE UNIVERSITY OF MANCHESTER

Summary Sampling Techniques

Chapter 7: SAMPLING DISTRIBUTIONS & POINT ESTIMATION OF PARAMETERS

Point Estimation. Copyright Cengage Learning. All rights reserved.

Chapter 7 - Lecture 1 General concepts and criteria

F19: Introduction to Monte Carlo simulations. Ebrahim Shayesteh

EE641 Digital Image Processing II: Purdue University VISE - October 29,

Chapter 4: Commonly Used Distributions. Statistics for Engineers and Scientists Fourth Edition William Navidi

1. Covariance between two variables X and Y is denoted by Cov(X, Y) and defined by. Cov(X, Y ) = E(X E(X))(Y E(Y ))

Chapter 5. Statistical inference for Parametric Models

GENERATION OF STANDARD NORMAL RANDOM NUMBERS. Naveen Kumar Boiroju and M. Krishna Reddy

Calibration of Interest Rates

STAT 825 Notes Random Number Generation

Point Estimation. Principle of Unbiased Estimation. When choosing among several different estimators of θ, select one that is unbiased.

Distribution of the Sample Mean

Application of MCMC Algorithm in Interest Rate Modeling

Chapter 8. Introduction to Statistical Inference

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

Section 2.4. Properties of point estimators 135

Point Estimation. Some General Concepts of Point Estimation. Example. Estimator quality

Statistical analysis and bootstrapping

Quantitative Introduction ro Risk and Uncertainty in Business Module 5: Hypothesis Testing Examples

Sampling and sampling distribution

1. Statistical problems - a) Distribution is known. b) Distribution is unknown.

Week 2 Quantitative Analysis of Financial Markets Hypothesis Testing and Confidence Intervals

8.1 Estimation of the Mean and Proportion

... About Monte Cario Simulation

Theory and practice of option pricing

Analysis of truncated data with application to the operational risk estimation

Lecture 5: Fundamentals of Statistical Analysis and Distributions Derived from Normal Distributions

COS 513: Gibbs Sampling

Monte Carlo Path Simulation and the Multilevel Monte Carlo Method. Krister Janzon

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMSN50)

Chapter 8: Sampling distributions of estimators Sections

STOCHASTIC VOLATILITY AND OPTION PRICING

Monte Carlo and Empirical Methods for Stochastic Inference (MASM11/FMS091)

Chapter 7: Estimation Sections

A potentially useful approach to model nonlinearities in time series is to assume different behavior (structural break) in different subsamples

ST440/550: Applied Bayesian Analysis. (5) Multi-parameter models - Summarizing the posterior

Introduction to Algorithmic Trading Strategies Lecture 8

UQ, STAT2201, 2017, Lectures 3 and 4 Unit 3 Probability Distributions.

1 Rare event simulation and importance sampling

Chapter 7 Sampling Distributions and Point Estimation of Parameters

IEOR E4703: Monte-Carlo Simulation

Construction and behavior of Multinomial Markov random field models

Section 8.2: Monte Carlo Estimation

Probability. An intro for calculus students P= Figure 1: A normal integral

Technische Universiteit Delft Faculteit Elektrotechniek, Wiskunde en Informatica Delft Institute of Applied Mathematics

Chapter 4 Continuous Random Variables and Probability Distributions

Tutorial 6. Sampling Distribution. ENGG2450A Tutors. 27 February The Chinese University of Hong Kong 1/6

Value at Risk and Self Similarity

Definition 9.1 A point estimate is any function T (X 1,..., X n ) of a random sample. We often write an estimator of the parameter θ as ˆθ.

Probability Theory and Simulation Methods. April 9th, Lecture 20: Special distributions

IEOR 3106: Introduction to OR: Stochastic Models. Fall 2013, Professor Whitt. Class Lecture Notes: Tuesday, September 10.

Lecture Notes 6. Assume F belongs to a family of distributions, (e.g. F is Normal), indexed by some parameter θ.

1. Variability in estimates and CLT

Computer Statistics with R

Unit 5: Sampling Distributions of Statistics

Unit 5: Sampling Distributions of Statistics

Probability & Statistics

10. Monte Carlo Methods

Statistical estimation

MLLunsford 1. Activity: Mathematical Expectation

Transcription:

INSTITUT FOR MATEMATISKE FAG AALBORG UNIVERSITET FREDRIK BAJERS VEJ 7 G 9220 AALBORG ØST Tlf.: 96 35 88 63 URL: www.math.auc.dk Fax: 98 15 81 29 E-mail: jm@math.aau.dk Monte Carlo methods Monte Carlo methods are used for estimating integrals based on pseudo-random numbers. Typically the integrals can not be performed by other means such as numerical methods; this is particularly the case for high-dimensional integrals. The perhaps earliest application of the simple Monte Carlo method is Buffon s needle, see Exercise 2 below (this experiment by Buffon goes back to 1777). Enrico Fermi and Stanislaw Ulam reinvented the method in physics. Fermi worked on neutron diffusion in Rome in the early 1930s. Ulam, and two other pioneers, John von Neumann and Nicholas Metropolis, worked on the Manhattan Project at Los Alamos during the Second World War (the atomic bomb was constructed at Los Alamos). In 1947 Metropolis and von Neumann showed how the Monte Carlo method could solve a number of problems concerned with neutron export in the hydrogen bomb. This work was an impressive success, but they were not able to publish their results, because they were classified as secret. Over the following two years however, they and others applied the method to a variety of more mundane problems in physics, and published a number of papers which drew the world s attention to this emerging technique. Of particular note to us is the publication in 1953 of the paper by Metropolis and coworkers, in which they describe for the first time the Monte Carlo technique that has come to be known as the Metropolis algorithm (which we study later on this course). As indicated much of the theoretical and practical development of Monte Carlo methods have appeared in physics. In the last twenty years, statisticians have contributed substantially to this development. Due to the exponential growth in computer power and the invention of new algorithms, Monte Carlo methods are widely used today in science and technology. 1

Exercise 1 (The simple Monte Carlo method) For specificity, suppose that X is a continuous random variable with density function f (the results and ideas described below apply as well if X is a discrete random variable), and we want to calculate the mean θ = E(h(X)) = h(x)f(x)dx where h : R n R is a function such that the mean exists. Recall the following important result: Theorem 1 the strong law of large numbers If X 1, X 2,... are iid with density f, then with probability one, ˆθ n = 1 n h(x i ) n converges to θ: P (ˆθ n θ as n ) = 1. Definition: We say then that ˆθ n is an consistent estimator of θ. 1. Show that ˆθ n is unbiased, i.e. E ˆθ n = θ. 2. Show that a) 1 u du = 1 log(2) and b) construct a Monte Carlo method for 0 1+u estimating this integral. Hint: a) Use substition of u by x = 1 + u. b) Use Z = U/(1 + U) where U unif(0,1). 3. Use R to estimate the integral for n = 10, 100, 1000, 10000, 100000, 1000000. Investingate how the estimates converges. 4. Recall that if the variance V ar(h(x)) exists, then by the CLT, n(ˆθn θ) N(0, σ 2 ) as n where σ = V ar(h(x)). Show that the probability that θ is included in the interval [ ˆθ n 1.96σ, ˆθ n + 1.96σ ] n n is approximately 95%; this interval is called a 95% confidence interval for θ. 2

5. Consider again the integral in 2. Show that V ar(z) = 1/2 (log(2)) 2. Use this in R to obtain 95% confidence intervals for the estimates in 3. Hint: Find the derivative of 2(u log(u + 1)) u 2 /(1 + u) and obtain thereby E(Z 2 ). Exercise 2 (Buffon s needle) The following relates to the webpage http://www.mste.uiuc.edu/reese/buffon/buffon.html. See also http://www.angelfire.com/wa/hurben/buff.html. 1. Consider the paragraph The Simplest Case. The problem is not completely formulated because the randomness in the needle drop is not completely specified. a) So how are the random variables D and θ distributed? b) Why is the suggested method for calculating π the same as simple Monte Carlo? Remark: An actual experiment of this type was carried out by the astronomer R. Wolf in Zurich about 1850 making this probably the first Monte Carlo procedure. He dropped a needle 5000 times on a ruled grating and got the value 3.1596 for π, about 0.6ths of a percent in error. 2. Answer the questions in the paragraph Questions. Exercise 3 (The weighted Monte Carlo method: importance sampling) Suppose that θ = P (X > x) is unknown, where X is a random variable and x is a real number. When x is large, θ becomes small and the event {X > x} is called a rare event. Let 1 A (y) denote the indicator function for A R: 1 A (y) = 1 if y A and 1 A (y) = 0 if y A. Since θ = P (X > x) = E1 (x, ) (X), we may suggest to estimate θ by ˆθ n obtained by simple Monte Carlo. However, as shown below, the weighted Monte Carlo method (also called importance sampling) provides a much better method for estimating rare events. 1. Show that V ar ˆθ n = θ(1 θ)/n. 2. If e.g. θ = 0.001, then how large need n to be if we want the standard deviation of ˆθ n to be at most θ/10? (This indicates that a better method than simple Monte Carlo is needed). 3

3. Verify the following useful result: If Y 1,..., Y n are iid with density q such that where f denotes the density of X, then q(x) > 0 whenever f(x) > 0 θ n = 1 n n 1 (x, ) (Y i ) f(y i) is an unbiased consistent estimator of θ (see Theorem 1). The weighted Monte Carlo method (or importance sampling) is an evaluation of θ n ; more details are given below. 4. Show that if q(y) = 1 (x, ) (y)f(y)/θ, then θ n = θ. (Of course, since θ is assumed to be unknown, we cannot chose q in this way; however, it shows that ideally q should be chosen such that q(y) is large whenever y > x and f(y) is large). 5. a) Suppose that f(y) = exp( y) for y > 0 (the standard exponential density) and express V ar ˆθ n in terms of x > 0. b) Suppose that q(y) = (1/x) exp( y/x) for y > 0 (the exponential density with parameter x > 0). It can be shown that V ar X n = 1 ( ) x 2 n 2x 1 e1 2x e 2x if x > 2 while V ar X n = if 0 < x 2. Plot log(v ar θ n /V ar ˆθ n ) as a function of x > 2. Importance sampling Exercise 3 shows a simple example of importance sampling when estimating probabilities. In general importance sampling is based on Theorem 2 Consider a general setting as at the beginning of Exercise 1, and let Y 1,..., Y n be iid with density q such that where f denotes the density of X. Then q(x) > 0 whenever f(x) > 0 θ n = 1 n n 4 h(y i ) f(y i) (1)

is an unbiased consistent estimator of θ = E(h(X)). The method of importance sampling is an evaluation of (1). Typical in applications, we use (1) for estimating several mean values corresponding to different h functions. We call f the target density and q the instrumental density or the importance sampling density. Moreover, w(y i ) = f(y i), i = 1,..., n, are called the importance weights. As demonstrated in Exercise 3, the variation of the importance weights should not be too large: if one or a few of the importance weights can be large compared to the others, importance sampling will in general not work well as the variance of θ n can be huge. Particularly, problems may be encountered when E(f(Y )/q(y )) =. Apart from this, there is normally no restriction on the choice of the instrumental density q. Furthermore, the same sample (generated from q) can be used repeatedly for estimating different mean values. A good discussion on importance sampling (and many other Monte Carlo methods, including inversion and rejection) can be found in Robert, C. P. and Casella, G. (1999). Monte Carlo Statistical Methods. Springer. 5