Section 2.3: Monte Carlo Simulation

Similar documents
Random Number Generation and Monte Carlo Simulation

Section 4.2: Discrete Data Histograms

Discrete-Event Simulation:

Math 136 Exam 1 Practice Problems

Parametric and Polar Curves

Double Integrals over Polar Coordinate

Prime Time (Factors and Multiples)

DD2429 Computational Photography :00-19:00

Conics, Parametric Equations, and Polar Coordinates. Copyright Cengage Learning. All rights reserved.

5/27/12. Objectives. Plane Curves and Parametric Equations. Sketch the graph of a curve given by a set of parametric equations.

Polar Coordinates. 2, π and ( )

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

13 Distribution Ray Tracing

Differential Geometry: Circle Patterns (Part 1) [Discrete Conformal Mappinngs via Circle Patterns. Kharevych, Springborn and Schröder]

Parametric and Polar Curves

Parametric and Polar Curves

Conics, Parametric Equations, and Polar Coordinates. Copyright Cengage Learning. All rights reserved.

Efficacy of Numerically Approximating Pi with an N-sided Polygon

Geometry GEOMETRY. Congruence

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

Random Numbers Random Walk

is a plane curve and the equations are parametric equations for the curve, with parameter t.

Math 7 Glossary Terms

The figures below are all prisms. The bases of these prisms are shaded, and the height (altitude) of each prism marked by a dashed line:

Geometry I Can Statements I can describe the undefined terms: point, line, and distance along a line in a plane I can describe the undefined terms:

Polar Coordinates. Chapter 10: Parametric Equations and Polar coordinates, Section 10.3: Polar coordinates 27 / 45

10 Polar Coordinates, Parametric Equations

12 Polar Coordinates, Parametric Equations

Common Core State Standards for Mathematics High School

1 Trigonometry. Copyright Cengage Learning. All rights reserved.

angle The figure formed by two lines with a common endpoint called a vertex. angle bisector The line that divides an angle into two equal parts.

Maths Assessment Framework Year 8

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

10.3 Probability Using Areas

A small review, Second Midterm, Calculus 3, Prof. Montero 3450: , Fall 2008

Math 52 Homework 2 Solutions

Pick s Theorem and Lattice Point Geometry

Introduction. Chapter Overview

Appendix E. Plane Geometry

Instructional Unit CPM Geometry Unit Content Objective Performance Indicator Performance Task State Standards Code:

What is the Monte Carlo Method?

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

Worksheet 3.5: Triple Integrals in Spherical Coordinates. Warm-Up: Spherical Coordinates (ρ, φ, θ)

Integration using Transformations in Polar, Cylindrical, and Spherical Coordinates

MCAS/DCCAS Mathematics Correlation Chart Grade 6

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

MATH115. Polar Coordinate System and Polar Graphs. Paolo Lorenzo Bautista. June 14, De La Salle University

Polar Coordinates. Calculus 2 Lia Vas. If P = (x, y) is a point in the xy-plane and O denotes the origin, let

Chapter 11. Parametric Equations And Polar Coordinates

Mathematics Placement Assessment

MATH203 Calculus. Dr. Bandar Al-Mohsin. School of Mathematics, KSU

Double Integrals in Polar Coordinates

Geometry. Given a rectangle, parallelogram, trapezoid, or regular polygon, describe the rotations and reflections that carry it onto itself.

Lecture 15. Lecturer: Prof. Sergei Fedotov Calculus and Vectors. Length of a Curve and Parametric Equations

Parameterization with Manifolds

Mathematics - LV 6 Correlation of the ALEKS course Mathematics MS/LV 6 to the Massachusetts Curriculum Framework Learning Standards for Grade 5-6

Math Girls rock! Math Club for Young Women Project 2. Geometric Probability and Buffon s Needle Problem

Math for Geometric Optics

Section Parametrized Surfaces and Surface Integrals. (I) Parametrizing Surfaces (II) Surface Area (III) Scalar Surface Integrals

Bramhall high school Year 9 Assessment descriptor Mathematics

Infinite Geometry supports the teaching of the Common Core State Standards listed below.

Chapter 8.1: Circular Functions (Trigonometry)

Math 6, Unit 8 Notes: Geometric Relationships

VARIANCE REDUCTION TECHNIQUES IN MONTE CARLO SIMULATIONS K. Ming Leung

Intersection of an Oriented Box and a Cone

θ as rectangular coordinates)

Discrete Mathematics Course Review 3

Parallel Techniques. Embarrassingly Parallel Computations. Partitioning and Divide-and-Conquer Strategies

Math 11 Fall 2016 Section 1 Monday, October 17, 2016

MIDTERM. Section: Signature:

Pearson Mathematics Geometry Common Core 2015

Double Integrals, Iterated Integrals, Cross-sections

Los Angeles Unified School District. Mathematics Grade 6

2003/2010 ACOS MATHEMATICS CONTENT CORRELATION GEOMETRY 2003 ACOS 2010 ACOS

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

GEOMETRY Graded Course of Study

Polar Coordinates. Chapter 10: Parametric Equations and Polar coordinates, Section 10.3: Polar coordinates 28 / 46

1. A model for spherical/elliptic geometry

Carnegie Learning Math Series Course 2, A Florida Standards Program

Prentice Hall Mathematics: Course Correlated to: Colorado Model Content Standards and Grade Level Expectations (Grade 8)

Mathematics Placement Assessment. Courage, Humility, and Largeness of Heart. Grade Entering

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

Correlation of the ALEKS courses Algebra 1 and High School Geometry to the Wyoming Mathematics Content Standards for Grade 11

GEOMETRY CCR MATH STANDARDS

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

1. Suppose that the equation F (x, y, z) = 0 implicitly defines each of the three variables x, y, and z as functions of the other two:

Sampling and Monte-Carlo Integration

Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. Y. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds.

Kevin James. MTHSC 206 Section 15.6 Directional Derivatives and the Gra

Prentice Hall Mathematics: Pre-Algebra 2004 Correlated to: Colorado Model Content Standards and Grade Level Expectations (Grade 8)

Mathematics Geometry

Number/Computation. addend Any number being added. digit Any one of the ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9

10.2 Calculus with Parametric Curves

Ohio s Learning Standards Mathematics Scope and Sequence YEC Geometry

2 + (-2) = 0. Hinojosa 7 th. Math Vocabulary Words. Unit 1. Word Definition Picture. The opposite of a number. Additive Inverse

Unit Activity Correlations to Common Core State Standards. Geometry. Table of Contents. Geometry 1 Statistics and Probability 8

Review of Trigonometry

Middle School Math Course 2

Math 5320, 3/28/18 Worksheet 26: Ruler and compass constructions. 1. Use your ruler and compass to construct a line perpendicular to the line below:

Transcription:

Section 2.3: Monte Carlo Simulation Discrete-Event Simulation: A First Course c 2006 Pearson Ed., Inc. 0-13-142917-5 Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 1/1

Section 2.3: Monte Carlo Simulation With Empirical Probability, we perform an experiment many times n and count the number of occurrences n a of an event A The relative frequency of occurrence of event A is n a /n The frequency theory of probability asserts that the relative frequency converges as n n a Pr(A) = lim n n Axiomatic Probability is a formal, set-theoretic approach Mathematically construct the sample space and calculate the number of events A The two are complementary! Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 2/1

Example 2.3.1 Roll two dice and observe the up faces (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (6,1) (6,2) (6,3) (6,4) (6,5) (6,6) If the two up faces are summed, an integer-valued random variable, say X, is defined with possible values 2 through 12 sum, x : 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 5 4 3 2 1 Pr(X = x) : 36 36 36 36 36 36 36 36 36 36 36 Pr(X = 7) could be estimated by replicating the experiment many times and calculating the relative frequency of occurrence of 7 s Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 3/1

Random Variates A Random Variate is an algorithmically generated realization of a random variable u = Random() generates a Uniform(0,1) random variate How can we generate a Uniform(a,b) variate? b x. x = a + (b a)u a 0.0 u 1.0 Generating a Uniform Random Variate double Uniform(double a, double b) /* use a < b */ { return (a + (b - a) * Random()); } Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 4/1

Equilikely Random Variates Uniform(0,1) random variates can also be used to generate an Equilikely(a,b) random variate 0 < u < 1 0 < (b a + 1)u < b a + 1 0 (b a + 1)u b a a a + (b a + 1)u b a x b Specifically, x = a + (b a + 1)u Generating an Equilikely Random Variate long Equilikely(long a, long b) /* use a < b */ { return (a + (long) ((b - a + 1) * Random())); } Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 5/1

Examples Example 2.3.3 To generate a random variate x that simulates rolling two fair dice and summing the resulting up faces, use x = Equilikely(1, 6) + Equilikely(1, 6); Note that this is not equivalent to x = Equilikely(2, 12); Example 2.3.4 To select an element x at random from the array a[0], a[1],..., a[n 1] use i = Equilikely(0, n - 1); x = a[i]; Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 6/1

Galileo s Dice If three fair dice are rolled, which sum is more likely, a 9 or a 10? There are 6 3 = 216 possible outcomes Pr(X = 9) = 25 216 = 0.116 and Pr(X = 10) = 27 216 = 0.125 Program galileo calculates the probability of each possible sum between 3 and 18 The drawback of Monte Carlo simulation is that it only produces an estimate Larger n does not guarantee a more accurate estimate Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 7/1

Example 2.3.6 Frequency probability estimates converge slowly and somewhat erratically Pr(X = 10) estimates 0.165 0.155 0.145 0.135 0.125 0.115 0.105 0.095 0.085 Initial seed 12345 54321 2121212 0 100 200 300 400 500 600 700 800 900 1000 Number of replications, n You should always run a Monte Carlo simulation with multiple initial seeds Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 8/1

Geometric Applications Generate a point at random inside a rectangle with opposite corners at (α 1,β 1 ) and (α 2,β 2 ) β 2 y (x, y) β 1 x = Uniform(α 1, α 2 ); y = Uniform(β 1, β 2 ); α 1 x α 2 Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 9/1

Geometric Applications Generate a point (x,y) at random on the circumference of a circle with radius ρ and center (α,β) y β ρ. θ (x, y).. α x θ = Uniform(-π, π); x = α + ρ * cos(θ); y = β + ρ * sin(θ); Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 10/1

Example 2.3.8 Generate a point (x,y) at random interior to the circle of radius ρ centered at (α,β) α β. θ = Uniform(-π, π); r = Uniform(0, ρ); INCORRECT! x = α + r * cos(θ); y = β + r * sin(θ); Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 11/1

Acceptance/Rejection Generate a point at random within a circumscribed square and then either accept or reject the point Generating a Random Point do { x = Uniform(-ρ, ρ); y = Uniform(-ρ, ρ); } while (x * x + y * y >= ρ * ρ); x = α + x; y = β + y; return (x, y); α β. Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 12/1

Buffon s Needle Suppose that an infinite family of infinitely long vertical lines are spaced one unit apart in the (x,y) plane. If a needle of length r > 0 is dropped at random onto the plane, what is the probability that it will land crossing at least one line? y r. θ. 0 u v 1 x u is the x-coordinate of the left-hand endpoint v is the x-coordinate of the right-hand endpoint, v = u + r cosθ The needle crosses at least one line if and only if v > 1 Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 13/1

Program buffon Program buffon is a Monte Carlo simulation The random number library can be used to automatically generate an initial seed Random Seeding PutSeed(-1); /* any negative integer will do */ GetSeed(&seed); /* trap the value of the initial seed */... printf("with an initial seed of %ld", seed); Inspection of the program buffon illustrates how to solve the problem axiomatically Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 14/1

Axiomatic Approach to Buffon s Needle Dropped at random is interpreted (modeled) to mean that u and θ are independent Uniform(0,1) and Uniform( π/2, π/2) r.v.s 0 1 r u 1 π/2 0 θ π/2. v < 1 v > 1 Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 15/1

Axiomatic Approach to Buffon s Needle The shaded region has a curved boundary defined by the equation u = 1 r cos(θ) If 0 < r 1, the area of the shaded region is π/2 ( ) π/2 π 1 r cos θ dθ = r cos θ dθ = = 2r π/2 π/2 Therefore, because the area of the rectangle is π the probability that the needle will cross at least one line is 2r/π Discrete-Event Simulation: A First Course Section 2.3: Monte Carlo Simulation 16/1