MONTE CARLO SIMULATION

Slides:



Advertisements
Similar presentations
11 Simulation. 22 Overview of Simulation – When do we prefer to develop simulation model over an analytic model? When not all the underlying assumptions.
Advertisements

Random variables 1. Note  there is no chapter in the textbook that corresponds to this topic 2.
Random number generation Algorithms and Transforms to Univariate Distributions.
CDA6530: Performance Models of Computers and Networks Chapter 5: Generating Random Number and Random Variables TexPoint fonts used in EMF. Read the TexPoint.
Monte Carlo Simulation Methods - ideal gas. Calculating properties by integration.
4.4 Mean and Variance. Mean How do we compute the mean of a probability distribution? Actually, what does that even mean? Let’s look at an example on.
Monte-Carlo Techniques Roger Crawfis. June 9, 2015OSU/CIS 5412 Monte-Carlo Integration Overview 1.Generating Psuedo-Random Numbers 2.Multidimensional.
Sampling Attila Gyulassy Image Synthesis. Overview Problem Statement Random Number Generators Quasi-Random Number Generation Uniform sampling of Disks,
Pseudorandom Number Generators
Statistics.
Chapter 14 Simulation. Monte Carlo Process Statistical Analysis of Simulation Results Verification of the Simulation Model Computer Simulation with Excel.
Random Thoughts 2012 (COMP 066) Jan-Michael Frahm Jared Heinly.
Monte Carlo Simulation 1.  Simulations where random values are used but the explicit passage of time is not modeled Static simulation  Introduction.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Simulation of Random Walk How do we investigate this numerically? Choose the step length to be a=1 Use a computer to generate random numbers r i uniformly.
Random Number Generators CISC/QCSE 810. What is random? Flip 10 coins: how many do you expect will be heads? Measure 100 people: how are their heights.
1 Theoretical Physics Experimental Physics Equipment, Observation Gambling: Cards, Dice Fast PCs Random- number generators Monte- Carlo methods Experimental.
Chapter 14 Monte Carlo Simulation Introduction Find several parameters Parameter follow the specific probability distribution Generate parameter.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
Some Uses of Probability Randomized algorithms –for CS in general –for games and robotics in particular Testing Simulation Solving probabilistic problems.
Random Number Generators 1. Random number generation is a method of producing a sequence of numbers that lack any discernible pattern. Random Number Generators.
Monte Carlo Methods.
Experimental Method and Data Process: “Monte Carlo Method” Presentation # 1 Nafisa Tasneem CHEP,KNU
Monte Carlo Methods Versatile methods for analyzing the behavior of some activity, plan or process that involves uncertainty.
14.3 Simulation Techniques and the Monte Carlo Method simulation technique A simulation technique uses a probability experiment to mimic a real-life situation.
Areas Of Simulation Application
Random Thoughts 2012 (COMP 066) Jan-Michael Frahm Jared Heinly.
Monte Carlo Methods So far we have discussed Monte Carlo methods based on a uniform distribution of random numbers on the interval [0,1] p(x) = 1 0  x.
Monté Carlo Simulation  Understand the concept of Monté Carlo Simulation  Learn how to use Monté Carlo Simulation to make good decisions  Learn how.
Formula-Free Geometry. Area and Volume Exact Geometry Easy! Pretty easy!
Economics 173 Business Statistics Lecture 10 Fall, 2001 Professor J. Petry
An Introduction to Monte Carlo Methods in Statistical Physics Kristen A. Fichthorn The Pennsylvania State University University Park, PA
摹擬介紹: 問題求解: 確定及不確定 摹擬模式: 隨機及機遇. How did Monte Carlo simulation get its name? Monte Carlo simulation was named for Monte Carlo, Monaco, where the primary.
Simulation Chapter 16 of Quantitative Methods for Business, by Anderson, Sweeney and Williams Read sections 16.1, 16.2, 16.3, 16.4, and Appendix 16.1.
CS774. Markov Random Field : Theory and Application Lecture 15 Kyomin Jung KAIST Oct
MAT 4830 Mathematical Modeling 04 Monte Carlo Integrations
G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1 Statistical Data Analysis: Lecture 5 1Probability, Bayes’ theorem 2Random variables and.
COMPUTERS SIMULATION IN MATHEMATICS EDUCATION Dr. Ronit Hoffmann Kibbutzim College of Education, Israel.
Module 9.2 Simulations. Computer simulation Having computer program imitate reality, in order to study situations and make decisions Applications?
MONTE CARLO METHOD DISCRETE SIMULATION RANDOM NUMBER GENERATION Chapter 3 : Random Number Generation.
Chapter 19 Monte Carlo Valuation. © 2013 Pearson Education, Inc., publishing as Prentice Hall. All rights reserved.19-2 Monte Carlo Valuation Simulation.
Computer Simulation Henry C. Co Technology and Operations Management,
Random Numbers and Simulation
Monte Carlo Methods Some example applications in C++
The Divisibility & Modular Arithmetic: Selected Exercises
3. Random Number Generator
Monte Carlo simulation
Basic simulation methodology
4. Numerical Integration
Monte Carlo methods 10/20/11.
Parallel Programming in C with MPI and OpenMP
CHAPTER 6 Random Variables
Probability and Statistics for Computer Scientists Second Edition, By: Michael Baron Section 11.1: Least squares estimation CIS Computational.
Monte-Carlo Techniques
Transforming and Combining Random Variables
Mathematics for Computer Science MIT 6.042J/18.062J
Chapter 7 Random Number Generation
Properties of Random Numbers
Lecture 2 – Monte Carlo method in finance
Computing and Statistical Data Analysis Stat 3: The Monte Carlo Method
Homework #5 — Monte Carlo Simulation
Monte Carlo Methods A so-called “embarrassingly parallel” computation as it decomposes into obviously independent tasks that can be done in parallel without.
Continuous Random Variables
Monte Carlo Rendering Central theme is sampling:
Chapter 14 Monte Carlo Simulation
More Monte Carlo Methods
Generating Random and Pseudorandom Numbers
Generating Random and Pseudorandom Numbers
Monte Carlo simulation
Presentation transcript:

MONTE CARLO SIMULATION MATH 182

SIMULATION Simulation of a process – the examination of any emulating process simpler than that under consideration. Examples: System’s Simulation such as simulation of engineering systems, large organizational systems, and governmental systems Operational Gaming such as military gaming and business gaming Monte Carlo Simulation Agent-Based simulation

AGENT-BASED SYSTEMS Using Netlogo

MONTE CARLO SIMULATION The process is similar to gambling in casinos such as using roulette wheels, dice and playing cards. Monte Carlo is a technique for selecting numbers randomly from a probability distribution (not necessarily from a standard distribution).

MONTE CARLO SIMULATION The computer-generated random numbers are called pseudo- random numbers.

A PSEUDO-RANDOM NUMBER GENERATOR ≈FOLLOWING Uniform Distribution [0,1] Linear Congruential Generator (LCG) Period=m–1 x0 ≠0 is the seed number Example: a=13, b=0, m=31, x0 =8 Hence, u0 =0.2581; x1 =11, u1=0.3548 Minimal Standard Random Number Generator: a=75, b=0, m=231–1 (a Mersenne prime)

EXAMPLE 1 DEMAND RANGE OF RANDOM NUMBER Let rϵ{1,2,…,100} 10 1-20 15 21-50 20 51-100 A simple example:

IF(B2<=20,10,IF(B2<=50,15,20)) Example 1 Run Random Number Simulated Demand 1 83 20 2 45 15 3 48 4 14 10 5 52 6 7 67 8 42 9 81 73 11 21 12 22 13 77 Sample Formula: ROUNDUP(RAND()*100,0) IF(B2<=20,10,IF(B2<=50,15,20))

example 1 So the average demand is: Using simulation (15 runs): 16.333… Using expected value: 0.2*10+0.3*15+0.5*20=16.5 Notice that Monte Carlo simulation is just a statistical experiment.

State1 State2 State3 State4 ANOTHER EXAMPLE: State1 State2 State3 State4 RAND RAND RAND RAND RAND

Integration by MC Simulation Generate n random sequence xi є [a,b], then for m clusters of runs If you want to consolidate your m clusters of runs into just one cluster.

RAND()*5 CLUSTER RUNS 1 RAND CLUSTER RUNS 2 CLUSTER RUNS 3 3.58 12.81 1.22 1.49 4.29 18.37 0.76 0.58 1.12 1.26 1.46 2.12 4.50 20.22 2.68 7.17 4.58 20.93 4.90 24.02 4.74 22.49 0.33 0.11 3.97 15.77 0.26 0.07 3.89 15.11 3.50 12.25 2.04 4.15 0.80 0.64 5.00 24.96 2.25 5.07 1.58 2.49 2.17 4.72 0.08 0.01 0.73 0.53 2.83 8.00 4.66 21.75 3.31 10.94 1.62 2.62 4.54 20.63 2.64 6.95 Ave SUM(B2:B11)/10*5 62.98   42.04 39.09 48.04

Integration by MC Simulation Generate n random sequence xi є [a,b], n random sequence yi є [c,d] and n random sequence zi є [e,f] , then for m clusters of runs If you want to consolidate your m clusters of runs into just one cluster.

HIT OR MISS MONTE CARLO Find the AREA of the set of points (x,y) inside the unit square x,yϵ[0,1] that satisfy: Area=(length of interval1)x(length of interval2)x(number of hits)/(total count of generated random pairs) Area≈0.547

HIT OR MISS MONTE CARLO Find the VOLUME:

IF(AND(A3^2+B3^2<=C3^2,A3^2+B3^2+(C3-1)^2<=1),1,0) x y z count RAND()*2-1 RAND()*2 IF(AND(A3^2+B3^2<=C3^2,A3^2+B3^2+(C3-1)^2<=1),1,0) 0.142973094 -0.166680645 1.407409063 1 -0.783836654 -0.936474685 1.659525168 -0.272318721 0.131424335 0.899121291 0.309445838 -0.02570091 0.717548985 -0.770113876 -0.638294195 0.509448198 0.475610449 0.012623621 0.507359561 0.644456842 0.19929642 0.36582555 -0.04857905 0.476761013 0.167943641 -0.222669404 0.803157266 1.339139434 1 0.987939698 -0.642931976 0.836244323 -0.115050608 -0.189584746 0.361764572 0.815099685 0.757810953 0.243549675 -0.045867733 -0.675279504 0.271011819   SUM(D3:D502) 205 D503/500*8 3.28

MONTE CARLO ERROR