Question: Using python Python Homework 3: Monte Carlo Method The Monte Carlo Method (Monte Carlo Simulation) was first published in 1949 by Nicholas Metropolis and Stanislaw
Python Homework 3: Monte Carlo Method The Monte Carlo Method (Monte Carlo Simulation) was first published in 1949 by Nicholas Metropolis and Stanislaw Ulam in the work "The Monte Carlo Method" in the Journal of American Statistics Association. The name Monte Carlo has its origins in the fact that Ulam had an uncle who regularly gambled at the Monte Carlo casino in Monaco. In fact, way before 1949 the method had already been extensively used as a secret project of the U.S. Defense Department during the so-called "Manhattan Project" The basic principle of the Monte Carlo Method is to implement on a computer the Strong Law of Large Numbers (SLLN) If we can generate a sequence X1 ,Xe ,X3, . .. of i.i.d. random variables (i.e., independent and identically distributed) with finite mean E [X] = , then the SLLN guarantees that the sample mean (or empirical mean) Hasnoo with probability 1 In other words, Xn is a good approximation for u if the number of simulations n is large enough: x,, for n large. In addition, if we are interested in approximating the probability that some event A occurs, we might adopt the SLLN as follows: We simulate repeated independent trials of a random experiment and define the sequence of random variables Xi ,Xy, via 1 0 if A occurs on the i-th simulation if A does not occur on the i-th simulation Then, Xn is the proportion of the n trials in which A occurs. By construction the random variables XI,X2. are independent and identically distributed with mean E[X1 PIA]. Thus, by the SLLN we again obtain ariants/Regular/Main.js PIAasowith orobabilitv 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
