Copyright © 2010 Lumina Decision Systems, Inc. Monte Carlo Simulation Analytica User Group Modeling Uncertainty Series #3 13 May 2010 Lonnie Chrisman,

Slides:



Advertisements
Similar presentations
How do we generate the statistics of a function of a random variable? – Why is the method called “Monte Carlo?” How do we use the uniform random number.
Advertisements

Chapter 6 Sampling and Sampling Distributions
Copyright © 2010 Lumina Decision Systems, Inc. Measures of Risk and Utility Analytica Users Group Gentle Intro to Modeling Uncertainty Webinar Series Session.
Bayesian Estimation in MARK
Materials for Lecture 11 Chapters 3 and 6 Chapter 16 Section 4.0 and 5.0 Lecture 11 Pseudo Random LHC.xls Lecture 11 Validation Tests.xls Next 4 slides.
Sampling: Final and Initial Sample Size Determination
Chapter 21 Value at Risk Options, Futures, and Other Derivatives, 8th Edition, Copyright © John C. Hull 2012.
Copyright © 2010 Lumina Decision Systems, Inc. Risk Analysis for Portfolios Analytica Users Group Modeling Uncertainty Webinar Series, #5 3 June 2010 Lonnie.
Sampling Distributions (§ )
Physics 114: Lecture 7 Uncertainties in Measurement Dale E. Gary NJIT Physics Department.
Copyright © 2010 Lumina Decision Systems, Inc. Common Parametric Distributions Gentle Introduction to Modeling Uncertainty Series #6 Lonnie Chrisman, Ph.D.
Engineering Economic Analysis Canadian Edition
Resampling techniques Why resampling? Jacknife Cross-validation Bootstrap Examples of application of bootstrap.
CF-3 Bank Hapoalim Jun-2001 Zvi Wiener Computational Finance.
Chapter 7 Sampling and Sampling Distributions
Discrete Event Simulation How to generate RV according to a specified distribution? geometric Poisson etc. Example of a DEVS: repair problem.
Continuous Random Variables Chap. 12. COMP 5340/6340 Continuous Random Variables2 Preamble Continuous probability distribution are not related to specific.
Topic 2: Statistical Concepts and Market Returns
Evaluating Hypotheses
1 Pertemuan 06 Sebaran Normal dan Sampling Matakuliah: >K0614/ >FISIKA Tahun: >2006.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 6-1 Chapter 6 The Normal Distribution and Other Continuous Distributions.
A) Transformation method (for continuous distributions) U(0,1) : uniform distribution f(x) : arbitrary distribution f(x) dx = U(0,1)(u) du When inverse.
Getting Started with Hypothesis Testing The Single Sample.
Slide 1 Detecting Outliers Outliers are cases that have an atypical score either for a single variable (univariate outliers) or for a combination of variables.
Lecture II-2: Probability Review
Copyright © 2010 Lumina Decision Systems, Inc. Statistical Hypothesis Testing (8 th Session in “Gentle Introduction to Modeling Uncertainty”) Lonnie Chrisman,
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Options, Futures, and Other Derivatives 6 th Edition, Copyright © John C. Hull Chapter 18 Value at Risk.
1 Statistical Mechanics and Multi- Scale Simulation Methods ChBE Prof. C. Heath Turner Lecture 11 Some materials adapted from Prof. Keith E. Gubbins:
Advanced Risk Management I Lecture 6 Non-linear portfolios.
Copyright © 2010 Lumina Decision Systems, Inc. Modeling Uncertainty: Probability Distributions Lonnie Chrisman, Ph.D. Lumina Decision Systems Analytica.
Estimation of Statistical Parameters
© 2003 Prentice-Hall, Inc.Chap 6-1 Business Statistics: A First Course (3 rd Edition) Chapter 6 Sampling Distributions and Confidence Interval Estimation.
Monte Carlo Simulation CWR 6536 Stochastic Subsurface Hydrology.
The AIE Monte Carlo Tool The AIE Monte Carlo tool is an Excel spreadsheet and a set of supporting macros. It is the main tool used in AIE analysis of a.
Probabilistic Mechanism Analysis. Outline Uncertainty in mechanisms Why consider uncertainty Basics of uncertainty Probabilistic mechanism analysis Examples.
Continuous Probability Distributions Continuous random variable –Values from interval of numbers –Absence of gaps Continuous probability distribution –Distribution.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
Theory of Probability Statistics for Business and Economics.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Sampling Methods  Sampling refers to how observations are “selected” from a probability distribution when the simulation is run. 1.
1 Statistical Distribution Fitting Dr. Jason Merrick.
Engineering Economic Analysis Canadian Edition
Mixture Models, Monte Carlo, Bayesian Updating and Dynamic Models Mike West Computing Science and Statistics, Vol. 24, pp , 1993.
“ Building Strong “ Delivering Integrated, Sustainable, Water Resources Solutions Statistics 101 Robert C. Patev NAD Regional Technical Specialist (978)
Lab 3b: Distribution of the mean
MEGN 537 – Probabilistic Biomechanics Ch.5 – Determining Distributions and Parameters from Observed Data Anthony J Petrella, PhD.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Limits to Statistical Theory Bootstrap analysis ESM April 2006.
1 2 nd Pre-Lab Quiz 3 rd Pre-Lab Quiz 4 th Pre-Lab Quiz.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 14 Comparing Groups: Analysis of Variance Methods Section 14.1 One-Way ANOVA: Comparing.
Copyright © 2010 Lumina Decision Systems, Inc. Common Parametric Distributions Gentle Introduction to Modeling Uncertainty Series #6 Lonnie Chrisman, Ph.D.
Machine Design Under Uncertainty. Outline Uncertainty in mechanical components Why consider uncertainty Basics of uncertainty Uncertainty analysis for.
Value at Risk Chapter 20 Options, Futures, and Other Derivatives, 7th International Edition, Copyright © John C. Hull 2008.
1 CLUSTER VALIDITY  Clustering tendency Facts  Most clustering algorithms impose a clustering structure to the data set X at hand.  However, X may not.
© 2002 Prentice-Hall, Inc.Chap 5-1 Statistics for Managers Using Microsoft Excel 3 rd Edition Chapter 5 The Normal Distribution and Sampling Distributions.
Options, Futures, and Other Derivatives, 4th edition © 1999 by John C. Hull 14.1 Value at Risk Chapter 14.
Measurements and Their Analysis. Introduction Note that in this chapter, we are talking about multiple measurements of the same quantity Numerical analysis.
CHAPTER – 1 UNCERTAINTIES IN MEASUREMENTS. 1.3 PARENT AND SAMPLE DISTRIBUTIONS  If we make a measurement x i in of a quantity x, we expect our observation.
Copyright © Cengage Learning. All rights reserved. 5 Joint Probability Distributions and Random Samples.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © 2005 Dr. John Lipp.
Ka-fu Wong © 2007 ECON1003: Analysis of Economic Data Lesson0-1 Supplement 2: Comparing the two estimators of population variance by simulations.
MEGN 537 – Probabilistic Biomechanics Ch.5 – Determining Distributions and Parameters from Observed Data Anthony J Petrella, PhD.
Chapter 6 Sampling and Sampling Distributions
Statistics and probability Dr. Khaled Ismael Almghari Phone No:
Fundamentals of Data Analysis Lecture 11 Methods of parametric estimation.
Lecture 2 – Monte Carlo method in finance
Sampling Distributions (§ )
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Presentation transcript:

Copyright © 2010 Lumina Decision Systems, Inc. Monte Carlo Simulation Analytica User Group Modeling Uncertainty Series #3 13 May 2010 Lonnie Chrisman, Ph.D. Lumina Decision Systems

Copyright © 2010 Lumina Decision Systems, Inc. Course Syllabus (tentative) Over the coming weeks: What is uncertainty? Probability. Probability Distributions Monte Carlo Sampling (today) Measures of Risk and Utility Common parametric distributions Assessment of Uncertainty Risk analysis for portfolios (risk management) Hypothesis testing

Copyright © 2010 Lumina Decision Systems, Inc. Today’s Outline LogNormal exercise (review) Another way to represent uncertainty The representative sample Computing result uncertainty The Run index and Sample(..) Sample error Latin Hypercube Viewing uncertainty Evaluation modes

Copyright © 2010 Lumina Decision Systems, Inc. Modeling Exercise A mining company obtains rights to extract a gold deposit during a one-week window next year, before a construction project starts on the site. Extracting the deposit will cost $900K. The size of the deposit: LogNormal(Mean:1K,Stddev:300) oz. The price of gold next year: LogNormal(Mean:$1K, stddev:$500) What is the expected value of these mining rights? Compare to result ignoring uncertainty. Hint: The price of gold next year becomes known before the decision to proceed with extraction.

Copyright © 2010 Lumina Decision Systems, Inc. Another representation of Uncertainty: A Representative Sample 10 possible prices for gold next year (in $ per oz): $411/oz $548 $650 $746 $843 $949 $1,073 $1,230 $1,459 $1,945 This “sample” is a way to represent our uncertainty about the quantity. It captures the range of possibilities. ~$100/oz spacing ~$500/oz spacing

Copyright © 2010 Lumina Decision Systems, Inc. How uncertain is a computed result? Profit := f(Price) Compute each “scenario” separately. The result is a representative sample for Profit. This sample becomes our representation for the uncertainty in the result. This method works when computing any function! PriceProfit $411f(411) $548f(548) $650f(650) $746f(746) $843f(843) $949f(949) $1073f(1073) $1230f(1230) $1459f(1459) $1945f(1945) { The model’s result }

Copyright © 2010 Lumina Decision Systems, Inc. Mean(profit)=394K Multiple Uncertain Inputs bad EstimatedComputed Price ($/oz) Deposit sizeExtract?Profit $ $ $ $ $ $ K $ K $ K $ K $ M Each line here is a separate “scenario”. Oops: The computed results here are not representative. Why?

Copyright © 2010 Lumina Decision Systems, Inc. Multiple Uncertain Inputs bad EstimatedComputed Price ($/oz) Deposit sizeExtract?Profit $ K $ M $ $ K $ $ $ $ $ K $ K Each line here is a separate “scenario”. Shuffle each sample separately. (They are independent) Mean(profit)=232K

Copyright © 2010 Lumina Decision Systems, Inc. Analytica’s Internal representation of Uncertainty bad EstimatedComputed Price ($/oz) Deposit sizeExtract?Profit $ K $ M $ $ K $ $ $ $ $ K $ K Mean(profit)=231K Run index Analytica represents (and computes) uncertainty using samples indexed by Run.

Copyright © 2010 Lumina Decision Systems, Inc. Analytica Generates the Sample for you We usually encode uncertainty assessments using distribution functions (for convenience). Analytica generates sample from the distribution and uses these for computations. We can, however, supply the sample directly if we want (e.g., if we have measurements). Leak rate Definition: LogNormal(mean:10K,stddev:8K) Sample(Leak_rate): Array(Run,[3.5K,18.3K,12.1K,…])

Copyright © 2010 Lumina Decision Systems, Inc. Exercise Try this in Analytica: Mean( Normal(0,1) * Normal(0,1) ) Is the computed result correct? Why not? (use SampleSize=100) Theoretical answer = 0.0 Computed result: e.g., (your result will vary, due to randomness in sample generation)

Copyright © 2010 Lumina Decision Systems, Inc. Sample Error A sample is an approximate representation of the analytic distribution. Computations based on the this sample end up with some error as a result of the approximation. This error is called “Sample Error”. Sample error reduces with larger sample size.

Copyright © 2010 Lumina Decision Systems, Inc. Notice: Sample Error: Precision of computed mean You compute the mean for an uncertain result. You want to be 95% sure that: Guaranteed when: Where σ = SDeviation(y) is estimated first by using a small sample. Reference: Appendix A, Analytica Users Guide

Copyright © 2010 Lumina Decision Systems, Inc. Precision required for Mean(Normal(0,1) * Normal(0,1)) Computed mean should be within 0.05 of the correct mean. (Δ=0.05) How many samples do we need? StdDev  1.2 sampleSize > (4.8/0.05) 2 = 9216

Copyright © 2010 Lumina Decision Systems, Inc. Pure Monte Carlo Randomness (20 points sampled) Poor Coverage Clusters of over-coverage

Copyright © 2010 Lumina Decision Systems, Inc. Pure Monte Carlo Randomness (20 points sampled) Poor Coverage Clusters of over-coverage

Copyright © 2010 Lumina Decision Systems, Inc. Pure Monte Carlo Randomness (20 points sampled) Poor Coverage Clusters of over-coverage

Copyright © 2010 Lumina Decision Systems, Inc. Latin Hypercube Sampling Every 5% of area has one point. Vertical green lines every 10%. Two points always in each 10% region.

Copyright © 2010 Lumina Decision Systems, Inc. Latin Hypercube Sampling CDF of same sample Vertical green lines every 10%. Two points always in each 10% region.

Copyright © 2010 Lumina Decision Systems, Inc. Sample Error for Latin Hypercube Latin Hypercube often obtains smaller sampling error than Monte Carlo at the same sample size. For some smooth functions with a single uncertain scalar variable: (i.e., quadratically faster than Monte Carlo) For non-smooth functions, it can be worse than Monte Carlo in some cases, but these are rare. With many uncertain inputs, convergence rates are very similar to Monte Carlo.

Copyright © 2010 Lumina Decision Systems, Inc. Exercise Compute π by sampling. Use SampleSize=100 Compare precision for: Pure Monte Carlo Median Latin Hypercube Random Latin Hypercube Here’s how: x,y ~ Uniform(-1,1) Probability(x^2+y^2<1) is π /4 Area of circle = π Area of square = 4 x y

Copyright © 2010 Lumina Decision Systems, Inc. Uncertainty Views All uncertainty views are computed from the sample. Mean Value Statistics Bands PDF CDF Sample

Copyright © 2010 Lumina Decision Systems, Inc. Sample Statistics Given the 10-point sample: [2.0, 2.5, 2.9, 3.2, 3.5, 3.9, 4.3, 4.8, 5.5, 7.0] What is the median? ( )/2 = 3.7 What is the sample mean? ( )/10=3.96 What is the sample variance? ( ) 2 +( ) ( ) 2 ) / 9 = 2.26 What is the sample standard deviation? Sqrt(2.26) = 1.5

Copyright © 2010 Lumina Decision Systems, Inc. Fractiles (percentiles, Probability Bands) Given the 10-point sample: [2.0, 2.5, 2.9, 3.2, 3.5, 3.9, 4.3, 4.8, 5.5, 7.0] What is the 25% fractile? Answer: 2.9 What is the 60% fractile? Answer: 4.1 0% 10% 20% 30%40%50%60%70%80%90% 100%

Copyright © 2010 Lumina Decision Systems, Inc. Tricks for Smoothing Probability Density Plots Sample Size Samples per PDF step  1.6 * 2.5^logten(sampleSize) Equal P vs. Equal X Line style Histo vs. line Manual axis scaling (when extremes present)

Copyright © 2010 Lumina Decision Systems, Inc. Evaluation Modes Analytica has two evaluation modes: Mid mode Sample mode Mid result view uses Mid-mode Uncertainty functions return the Median. All other result views use Sample-mode Uncertainty functions return a sample.

Copyright © 2010 Lumina Decision Systems, Inc. Summary A Sample is a way of representing an arbitrary distribution of uncertainty. Enables uncertainty analysis for arbitrary computations (Monte Carlo). Analytica’s Run index associates scenarios between the samples of different variables. All result uncertainty views are derived from the computed sample.