Monte Carlo Simula/on and Copula Func/on. by Gerardo Ferrara

Similar documents
SIMULATION AND MONTE CARLO

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

APPENDIX K MONTE CARLO SIMULATION

Scientific Computing: An Introductory Survey

Random Numbers and Monte Carlo Methods

Computational Methods for Finding Probabilities of Intervals

Page 129 Exercise 5: Suppose that the joint p.d.f. of two random variables X and Y is as follows: { c(x. 0 otherwise. ( 1 = c. = c

Lecture 8: Jointly distributed random variables

Today s outline: pp

Learning Objectives. Continuous Random Variables & The Normal Probability Distribution. Continuous Random Variable

Integration. Volume Estimation

Lecture 7: Monte Carlo Rendering. MC Advantages

Monte Carlo Methods; Combinatorial Search

PHYSICS 115/242 Homework 5, Solutions X = and the mean and variance of X are N times the mean and variance of 12/N y, so

Monte Carlo methods for risk analysis

Simulation: Solving Dynamic Models ABE 5646 Week 12, Spring 2009

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

Probability and Statistics for Final Year Engineering Students

STAT 725 Notes Monte Carlo Integration

Monte Carlo Integration and Random Numbers

A Random Number Based Method for Monte Carlo Integration

Combinatorial Search; Monte Carlo Methods

CVEN Computer Applications in Engineering and Construction. Programming Assignment #2 Random Number Generation and Particle Diffusion

You ve already read basics of simulation now I will be taking up method of simulation, that is Random Number Generation

Overview. Monte Carlo Methods. Statistics & Bayesian Inference Lecture 3. Situation At End Of Last Week

Professor Stephen Sekula

Monte Carlo Integration

Stochastic Simulation: Algorithms and Analysis

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit IV Monte Carlo

Introduction to Computer Programming with MATLAB Calculation and Programming Errors. Selis Önel, PhD

Chapter 1. Introduction

Chapter 3. Bootstrap. 3.1 Introduction. 3.2 The general idea

METROPOLIS MONTE CARLO SIMULATION

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

Monte Carlo Techniques. Professor Stephen Sekula Guest Lecture PHY 4321/7305 Sep. 3, 2014

Function f. Function f -1

Bayesian Statistics Group 8th March Slice samplers. (A very brief introduction) The basic idea

Monte Carlo Methods and Statistical Computing: My Personal E

Numerical Integration

Random Numbers Random Walk

CS 563 Advanced Topics in Computer Graphics Monte Carlo Integration: Basic Concepts. by Emmanuel Agu

Testing Random- Number Generators

Bootstrapping Method for 14 June 2016 R. Russell Rhinehart. Bootstrapping

Monte Carlo integration

The Plan: Basic statistics: Random and pseudorandom numbers and their generation: Chapter 16.

Chapter 2 Random Number Generators

Lab 5 Monte Carlo integration

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. - Statistical Methods -

Probability Models.S4 Simulating Random Variables

ESTIMATING AND CALCULATING AREAS OF REGIONS BETWEEN THE X-AXIS AND THE GRAPH OF A CONTINUOUS FUNCTION v.07

Math 494: Mathematical Statistics

ACCURACY AND EFFICIENCY OF MONTE CARLO METHOD. Julius Goodman. Bechtel Power Corporation E. Imperial Hwy. Norwalk, CA 90650, U.S.A.

VARIANCE REDUCTION TECHNIQUES IN MONTE CARLO SIMULATIONS K. Ming Leung

Generative and discriminative classification techniques

Problem #3 Daily Lessons and Assessments for AP* Calculus AB, A Complete Course Page Mark Sparks 2012

What is the Monte Carlo Method?

Chapter 6: Simulation Using Spread-Sheets (Excel)

Design of Experiments

In the real world, light sources emit light particles, which travel in space, reflect at objects or scatter in volumetric media (potentially multiple

Quantitative Biology II!

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Use of Extreme Value Statistics in Modeling Biometric Systems

= f (a, b) + (hf x + kf y ) (a,b) +

CHAPTER 8: INTEGRALS 8.1 REVIEW: APPROXIMATING INTEGRALS WITH RIEMANN SUMS IN 2-D

Intensity Transformations and Spatial Filtering

Statistics I 2011/2012 Notes about the third Computer Class: Simulation of samples and goodness of fit; Central Limit Theorem; Confidence intervals.

Monte Carlo Methods. Named by Stanislaw Ulam and Nicholas Metropolis in 1940s for the famous gambling casino in Monaco.

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

Topic 5.1: Line Elements and Scalar Line Integrals. Textbook: Section 16.2

The Maximum Area of a Cyclic (n+2)-gon Theorem

Laplace Transform of a Lognormal Random Variable

Computational modeling

Simulation. Chapter Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

Exercises C-Programming

ISyE 6416: Computational Statistics Spring Lecture 13: Monte Carlo Methods

We can conclude that if f is differentiable in an interval containing a, then. f(x) L(x) = f(a) + f (a)(x a).

CS321. Introduction to Numerical Methods

Variance Reduction. Computer Graphics CMU /15-662, Fall 2016

Monte Carlo Simulations

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.

Decision Support Risk handout. Simulating Spreadsheet models

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods

Randomized algorithms have several advantages over deterministic ones. We discuss them here:

Methods of Technical Risk Assessment in a Regional Context

Sampling and Monte-Carlo Integration

Table 3: Midpoint estimate

Computational Methods. Randomness and Monte Carlo Methods

Lecture 4. Digital Image Enhancement. 1. Principle of image enhancement 2. Spatial domain transformation. Histogram processing

HSC Mathematics - Extension 1. Workshop E2

Monte Carlo Integration COS 323

CHAPTER 11: UNCERTAINTY ANALYSIS IN MCNP

CS 112: Computer System Modeling Fundamentals. Prof. Jenn Wortman Vaughan April 21, 2011 Lecture 8

Uncertainty analysis in spatial environmental modelling. Kasia Sawicka Athens, 29 Mar 2017

Stat 528 (Autumn 2008) Density Curves and the Normal Distribution. Measures of center and spread. Features of the normal distribution

Measures of Central Tendency

Monte Carlo Method for Definite Integration

A study of simulated normal probability functions using Microsoft Excel

Package simed. November 27, 2017

Process Capability Calculations with Extremely Non-Normal Data

CSE 586 Final Programming Project Spring 2011 Due date: Tuesday, May 3

Transcription:

Monte Carlo Simula/on and Copula Func/on by Gerardo Ferrara

Introduc)on A Monte Carlo method is a computational algorithm that relies on repeated random sampling to compute its results. In a nutshell, instead of performing long complex calculations, we perform a large number of experiments using a quasi random number generation and see what happens. Monte Carlo methods tend to be used when it is infeasible or impossible to compute an exact result with a deterministic algorithm.

Background/History Monte Carlo from the gambling town of the same name (no surprise). First applied in 1947 to model diffusion of neutrons through fissile materials. Limited use because time consuming. Much more common since late 80.

The steps in Monte Carlo simulation corresponding to the uncertainty propagation are relatively simple: Step 1: Create a parametric model, y = f(x1, x2,..., xq). Step 2: Generate a set of random inputs, xi1, xi2,..., xiq. Step 3: Evaluate the model and store the results as yi. Step 4: Repeat steps 2 and 3 for i = 1 to n. Step 5: Analyze the results using histograms, summary statistics, confidence intervals, etc.

EXAMPLE Area of a figure Cover the figure by a grid, calculate the number of grid cells which are inside and this gives you the area. Shoot at random at the figure. Count the bullets that hit it. The area of then figure is S=(Nhit/Ntotal)*S(rectangle)

Monte Carlo Methods A Monte Carlo simulation creates samples from a known distribution. For example, if you know that a coin is weighted so that heads will occur 90% of the time, then you might assign the following values: X 0 1 f X (x) 0.10 0.90

Monte Carlo Methods (cont.) If you tossed the coin, the expected value would be 0.9 However, a sample simulation might yield the results 1, 1, 1, 0, 1, 1, 0, 1, 0, 1. The average of the sample is 0.7 (close, but not the same as the expected average).

Value at Risk (VaR) We are X percent certain that we will not lose more than V dollars in time T. Function of confidence level X and time T.

Pseudo Random Number Generators Monte Carlo simulations are based on computer generation of pseudo random numbers. Starting point is generation of sequence of independent, identically distributed uniform (U(0,1)) random variables: U(0,1) random numbers of direct interest in some applications; More commonly, U(0,1) numbers transformed to random numbers having other distributions. 9

Example Use of Simulation: Monte Carlo Integration Common problem is estimation of ( x ) dx where f is a Ω function, x is vector and Ω is domain of integration Monte Carlo integration popular for complex f and/or Ω. b Special case: Estimate f ( x ) dx for scalar x, and limits of a integration a, b. One approach: f Let p(u) denote uniform density function over [a, b] Let U i denote i th uniform random variable generated by Monte Carlo according to the density p(u) Then, for large n: b a b a f ( x) dx f ( U ) n n i= 1 i 10

Numerical Example of Monte Carlo Integration b Suppose interested in sin( xdx ) 0 Simple problem with known solution. Considerable variability in quality of solution for varying b Accuracy of numerical integration sensitive to integrand and domain of integration. Integral estimates for varying n n = 20 n = 200 n = 2000 b = π (ans.=2) b = 2π (ans.=0) 2.296 2.069 2.000 0.847 0.091-0.0054 11

Homework Exercise 1 This problem uses the Monte Carlo integration technique to estimate for varying a, b, and n. Specifically: b a 2x 2 + 3x 1dx (a) To at least 3 post-decimal digits of accuracy, what is the true integral value when a = 0, b = 1? And for a = 0, b = 4? (b) Using n = 20, 200, and 2000, estimate (via Monte Carlo) the integral for the two combinations of a and b in part (a). (c) Comment on the relative accuracy of the two settings. 12

Copulas Suppose you want to generate samples from some distribution with probability density f(x). All you need is a source of uniform random variables, because you can transform these random variables to have the distribution that you want (Sklar s Theorem).

General algorithm Generate (w1,w2) from a Multivariate Normal. Get u = F(w1), v = F(w2) where F(x) is normal cumulative distribution function (CDF). Generate x = G -1 (u), y = G -1 (v) where G -1 is empirical CDF from data. The distribution multivariate normal distribution is important; this is what controls dependence at the uniform density stage.

What is an empirical CDF? Given a vector S t of observations (then you can use the ecdf function in R). The methodology assigns a 1/n probability to each observation, orders the data from smallest to largest in value, and calculates the sum of the assigned probabilities up to and including each observation. The result is a step function that increases by at each datum. p = G(z) = fraction(s t z) G -1 (p) = quantile(s t, p)