1 / 29

BSTA 670 – Statistical Computing

BSTA 670 – Statistical Computing. Lecture 13: Monte Carlo Simulation. Monte Carlo Simulation. A statistical method used in the simulation of data. Provides approximate solutions to an array of mathematical problems via statistical sampling experiments on a computer.

winda
Download Presentation

BSTA 670 – Statistical Computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BSTA 670 – Statistical Computing Lecture 13: Monte Carlo Simulation

  2. Monte Carlo Simulation • A statistical method used in the simulation of data. • Provides approximate solutions to an array of mathematical problems via statistical sampling experiments on a computer. • Allows examination of complex systems without closed form solutions.

  3. Simulation Simulation Simulation is an important tool for meterologists (weather prediction), engineers (test structural integrity of design), military gaming, and of course Statisticians. In many cases, it is not possible or is too expensive to obtain data from the process of interest. In such cases. Simulation can help. Simulation generates observations or measurements that might have been made on the system considered, with certain probabilities.

  4. The Setup: System • System: A statistical process or physical process of interest. • A system is a set of related entities, called elements. Example: A hospital can be considered a system with doctors, nurses, and patients as elements. The elements have specific attributes that have numeric (or logical) values. Attributes may be the number of beds, the number of MRI scanners, skill of nurses, number of nurses, etc.

  5. The Setup: System Relationships can exist among any combination of the elements and the attributes within the elements. Example: The MRI machine is operated by a technician. If there is no available MRI technician, then the doctors cannot order an MRI.

  6. Simulation The Setup: System An internal relationship connects the elements within the system. (Ex. Relationship or interaction between the doctors and nurses, nurses and patients, etc.) An external relationship connects the elements with influences outside of the system. (Ex. Delivery mechanism for patients to the emergency room, time to repair MRI when needs repairs, etc.)

  7. The Setup: Model • Model: A mathematical representation of the system. Can be applied to problems with or without probabilistic structure. Deterministic simulation models have no randomness (e.g. systems of complex differential equations) Stochastic simulation models (Monte Carlo) have randomness.

  8. The Setup: Model • Model: A mathematical representation of the system. Can be applied to problems that do or do not evolve over time. Static simulation models have no time component, System does not change over time (e.g. power or level of statistical test, integration problem) Dynamic simulation models evolve over time. System changes over time (weather model, stock price model).

  9. Simulation The Setup: Model First step in studying a system is to build a model. A scientific model is defined as an abstraction of some system, and is used for prediction. The purpose of the scientific model is to enable one to determine how a change in one or more aspects (parameters) of the system, as represented by the model, affects other aspects (parameters) of the system.

  10. The Setup: Model It is critical that the mathematical model is a valid representation of the problem. Adding more details of problem to model provides more realistic system representation of the problem. However, more details increases the possibility that a numerical assessment will be needed as opposed to an analytic solution.

  11. The Setup • Simulation: The computer is used to imitate the system • Monte Carlo Simulation: A simulation that utilizes random numbers to examine a problem to be solved. Allows examination of complex systems without closed form solutions.

  12. The Setup Simulation yields numerical data about the system. Sensitivity analysis, running the model with differing parameters, should be done.

  13. Monte Carlo Simulation: First Significant Application • Manhatten Project scientists had intractable system of equations to solve. The equation involved the probability of a neutron from one fissioning Uranium atom causing another Uranium atom to fission. The equations took into account the exact shape of the actual atomic bomb. • They realized that they could follow the trajectories of individual neutrons using real people with mechanical calculators.

  14. Monte Carlo Simulation: First Significant Application • At each stage of a reaction for each neutron, they mechanically calculated the probability that the neutron was: (1) Absorbed, (2) escaped from the bomb, (3) started another fission reaction. • The scientists picked random numbers at each step for the movement based on “appropriate” probabilities, and also to stop simulated neutrons and to initiate new fission chains.

  15. Monte Carlo Simulation: First Significant Application • They realized that the simulated trajectories have the identical statistical properties of the actual neutron trajectories. • Thus, they were able to compute with sufficient accuracy the probability that a neutron would cause another fission reaction (chain reaction). Ref: Metropolis, N. and Ulam, S., 1949, "The Monte Carlo Method." J. Amer. Stat. Assoc. 44, 335-341

  16. First Known Application:Buffon’s Needle Problem • One of the earliest problems that utilized the Monte Carlo method is the Buffon needle problem, a well known problem in statistics (Buffon, 1733,1777).

  17. First Known Application:Buffon’s Needle Problem • The problem: Have a floor composed of parallel planks of equal width, D. • A needle of length L is thrown randomly onto the floor.

  18. Buffon’s Needle Problem Buffon’s Needle Problem For a nice description of the solution, see http://mathworld.wolfram.com/BuffonsNeedleProblem.html (above graphic is from this website)

  19. Buffon’s Needle Problem Buffon’s Needle Problem • What is the probability that the needle comes to rest in a position that crosses or touches a crack separating the planks of the floor. • The answer is: p=2L/πD, =Proportion of throws hitting a crack.

  20. Buffon’s Needle Problem • Captain O.C. Fox (1864) used Buffon’s needle problem to compute π, dropping needle on floor boards. This was a Monte Carlo simulation for the estimation of π. This was done by setting =2L/ πD, yielding, (Run applet of Buffon Needle Problem)

  21. Schrodinger Equation Solution Buffon’s Needle Problem • In the early 1900’s, experimental evidence showed that a wave equation could explain the behavior of atomic particles. Erwin Schrodinger was first to write down such a wave equation.

  22. Schrodinger Equation Solution Buffon’s Needle Problem • The Schrodinger equation is used to find the allowed energy levels of quantum mechanical systems (such as atoms, or transistors). The associated wave function gives the probability of finding the particle at a specified position. • Fermi, Metropolis, and Ulam (1948) obtained Monte Carlo estimates for the eigenvalues of the Schrodinger equation (a differential equation).

  23. Birthday Problem Buffon’s Needle Problem • Take a class with N students. What is the probability that no two students in the class share the same birthday? http://www.mste.uiuc.edu/reese/birthday/ http://www-stat.stanford.edu/%7Esusan/surprise/Birthday.html

  24. Monte Carlo Simulation Buffon’s Needle Problem General Procedure: • Specify problem to be explored • Develop mathematical model • Determine the set of PDFs that define the model, and that will be used to generate the data • Identify parameters to be explored (key parameters) • Identify range of key parameters to be explored • Determine sampling rules, the prescription for sampling from the specified PDFs

  25. Monte Carlo Simulation Buffon’s Needle Problem General Procedure: • Draw random values for each PDF required for the model to obtain a simulated data set. • Determine the statistic(s) or system variables of interest and store them. • Repeat this process for many iterations (simulated data set is generated at each iteration). • Determine when to stop the simulation: Convergence: Sufficient data is gathered about distribution of interest, convergence of estimated probability, etc. Time: Simulation over real underlying time. End is reached.

  26. Monte Carlo Simulation Buffon’s Needle Problem General Procedure: • At simulation end: compute desired statistic or distributions based on simulated system values. This may be means, variances, distributions, etc.

  27. Monte Carlo Simulation Buffon’s Needle Problem Exploring Power over a Parameter Space: • Specify statistical test to be explored • Determine underlying model of data to be considered for model. • Determine the set of PDFs that define the model, and that will be used to generate the data • Identify parameters to be explored (key parameters) • Identify range of key parameters to be explored • Determine sampling rules, the prescription for sampling from the specified PDFs

  28. Monte Carlo Simulation Buffon’s Needle Problem General Procedure: • Determine combinations of parameters to be considered. • Determine sequence of combinations of parameters to be considered. • For each combination of parameters, repeat the following 2 steps, M times: • Draw random values for each PDF required for the model to obtain a simulated data set. • Determine the test statistic and the test decision (Reject H0 or not), and store result.

  29. Monte Carlo Simulation Buffon’s Needle Problem General Procedure: • When the M simulations are completed at the combination of parameters, determine the power of the test at this setting by taking the probability of rejecting H0. Store this value along with the associated parameter combination. • Repeat the above simulation process for each parameter combination of interest. • Create table or graphic of power versus parameter settings (e.g. Power curve or grid).

More Related