What is Monte carlo simulation: Definition and 29 Discussions

Monte Carlo methods, or Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. The underlying concept is to use randomness to solve problems that might be deterministic in principle. They are often used in physical and mathematical problems and are most useful when it is difficult or impossible to use other approaches. Monte Carlo methods are mainly used in three problem classes: optimization, numerical integration, and generating draws from a probability distribution.
In physics-related problems, Monte Carlo methods are useful for simulating systems with many coupled degrees of freedom, such as fluids, disordered materials, strongly coupled solids, and cellular structures (see cellular Potts model, interacting particle systems, McKean–Vlasov processes, kinetic models of gases).
Other examples include modeling phenomena with significant uncertainty in inputs such as the calculation of risk in business and, in mathematics, evaluation of multidimensional definite integrals with complicated boundary conditions. In application to systems engineering problems (space, oil exploration, aircraft design, etc.), Monte Carlo–based predictions of failure, cost overruns and schedule overruns are routinely better than human intuition or alternative "soft" methods.In principle, Monte Carlo methods can be used to solve any problem having a probabilistic interpretation. By the law of large numbers, integrals described by the expected value of some random variable can be approximated by taking the empirical mean (a.k.a. the sample mean) of independent samples of the variable. When the probability distribution of the variable is parametrized, mathematicians often use a Markov chain Monte Carlo (MCMC) sampler. The central idea is to design a judicious Markov chain model with a prescribed stationary probability distribution. That is, in the limit, the samples being generated by the MCMC method will be samples from the desired (target) distribution. By the ergodic theorem, the stationary distribution is approximated by the empirical measures of the random states of the MCMC sampler.
In other problems, the objective is generating draws from a sequence of probability distributions satisfying a nonlinear evolution equation. These flows of probability distributions can always be interpreted as the distributions of the random states of a Markov process whose transition probabilities depend on the distributions of the current random states (see McKean–Vlasov processes, nonlinear filtering equation). In other instances we are given a flow of probability distributions with an increasing level of sampling complexity (path spaces models with an increasing time horizon, Boltzmann–Gibbs measures associated with decreasing temperature parameters, and many others). These models can also be seen as the evolution of the law of the random states of a nonlinear Markov chain. A natural way to simulate these sophisticated nonlinear Markov processes is to sample multiple copies of the process, replacing in the evolution equation the unknown distributions of the random states by the sampled empirical measures. In contrast with traditional Monte Carlo and MCMC methodologies, these mean field particle techniques rely on sequential interacting samples. The terminology mean field reflects the fact that each of the samples (a.k.a. particles, individuals, walkers, agents, creatures, or phenotypes) interacts with the empirical measures of the process. When the size of the system tends to infinity, these random empirical measures converge to the deterministic distribution of the random states of the nonlinear Markov chain, so that the statistical interaction between particles vanishes.

View More On Wikipedia.org
  1. emilmammadzada

    Error running example ICRP145_HumanPhantoms in Geant4

    Dear experts , when I run the ICRP145_Human Phantoms example following the instructions in the user manual, I get this error response [ VirtualBox:~/Geant4/share/Geant4/examples/advanced/ICRP145_HumanPhantoms/build$./ICRP145phantoms ./Internal -i 9500 -m example.in -o example.out Usage...
  2. emilmammadzada

    Double differential cross section in Fluka

    Dear experts, I would like to do a double differential cross section calculation for iron at 90 degrees and at 22 MeV in Fluka. What changes should I make in the input and output files of the application and what transformations should I make in order to see the double differential cross section...
  3. I

    A Monte Carlo simulation for the classical isotropic 3D Heisenberg model

    here is my attempt to implement using python import numpy as np import matplotlib.pyplot as plt def initialize_spins(L): """Initialize a random spin configuration with unit magnitudes.""" spins = np.random.normal(size=(L, L, L, 3)) magnitudes = np.linalg.norm(spins, axis=-1...
  4. jj8bmk

    What is a unit of time listed in MCNP6 PTRAC output file?

    Hi everyone, I've been trying to analyze PTRAC output file from MCNP6 here we can see the location , cell, particle, time, and so on... My question is, I have trouble finding the unit of time listed in PTRAC, (ex, 0.30113E-02), which is hard to find in MCNP manual My intuition is that the...
  5. user366312

    A What is meant by pruning and enrichment?

    As far as I understand: Pruning means deleting something. Enrich means to enhance/increase weight. Now my question is, in the case of the PERM algorithm, Are we deleting some polymers chains? Or, are we deleting some beads in all polymer chains? Are we increasing the weights of some...
  6. user366312

    Polymer simulation source code in C++ and Python

    I am absolutely new to Polymer simulation. I am trying to understand the simulation by analyzing source code written by others. Can anyone tell me what are the differences between the following three source code in terms of their objectives? Monte-Carlo-simulation-of-polymers...
  7. Ramil

    Quantum Monte-Carlo calculation of Green's function

    Introducing the spacetime spherical symmetric lattice, I use the following notifications in my program. i - index enumerating the nodes along t-coordinate, j - along the r-coordinate, k - along the theta-coordinate, l - along the phi-coordinate. N_t - the number of nodes along t-coordinate. N_r...
  8. UFSJ

    Thermodynamic limit in Monte Carlo simulation

    Hi guys. I'm using the Monte Carlo method to simulate a spin lattice. If I have a square lattice, L x L, I can plot the phase transition temperature by the inverse of the lattice length (1/L) to find the phase transition temperature in the thermodynamic limit (extrapolating the curve for 1/L =...
  9. A

    Simulating quantum coefficients

    Hi everyone, I want to generate 8 random variables (in reality to form 4 complex numbers) such that the sum of the 8 variables squared is equal to unity. The aim of generating such numbers is to perform a quantum simulation of 4 qubits (thus the 8 parameters). I've been trying to use...
  10. Ramil

    QFT on the lattice and Green's functions

    Homework Statement [/B] I'm trying to write a program for caclulating Green's function using Monte Carlo method (Metropolis algorithm) in scalar field theory with a potential λφ4 in 4D. I'm writing it in python. N_t, N_x, N_y, N_z - total number of lattice sites in each directions. Field...
  11. T

    Performing Metropolis-Hastings algorithm for a Poisson Distribution

    Homework Statement The number of busy lines in a trunk group (Erlang system) is given by a truncated Poisson distribution. I am asked to generate values from this distribution by applying the Metropolis-Hastings algorithm. Homework Equations The distribution is given in the attached picture...
  12. F

    Monte Carlo Simulation, Ising model in 2D

    Homework Statement Lo,Im stuck on how to retrieve the specific heat capacity from an MC simulation, with the metropolis algorithm. I want my graph to look something like this: https://i.stack.imgur.com/NXeXs.png Homework Equations C_v = ((<E^2>-<E>^2)/T^2 The Attempt at a Solution My code is...
  13. N

    I Why Monte Carlo Simulations? What do they tell us?

    I am an undergraduate working in my university's high energy physics lab. I'm still new to particle physics, so I have to learn/understand a bunch of things on the fly. We are currently searching for a new state theorized to occur in a specific decay process. I know we have to work with data...
  14. D

    Using Monte Carlo simulation to calculate Value At Risk

    Homework Statement Calculate 5-day 1% Value at Risk of a portfolio using Monte Carlo simulation. Homework EquationsThe Attempt at a Solution I've found an article explaining how to perform Monte Carlo simulation on portfolio returns therefore calculating the Value At Risk (pdf attachment)...
  15. C

    A Where to start with path integral Monte Carlo?

    Trying to accomplish a monte carlo simulation on the condensed state of 4He, yet I am in my sophomore year and know only a bit of quantum statistical physics. Is there any documentations recommended for beginners to the algorithm applied to 4He? I've found some but they are not friendly to...
  16. H

    What Does True Mean in Particle Simulation Data?

    Hi there! I'm new here and have a pretty basic and maybe stupid question: What exactly does one mean when talking about "truth information"? I'm working with a simulation of a particle detector and I've been trying to make sense out of all the data that is stored in the ouput files. Words like...
  17. A

    Average energy vs Energy of average

    Hey, When performing Molecular dynamic or Monte Carlo simulation (in NPT or NVT ensemble), I'm wondering whether there is any difference between the average energy of the system and the energy of the average structure. If there is a difference, how munch should it be? and why? Does the the...
  18. J

    Teaching finance with Monte Carlo simulation

    Some of the social sciences suffer from "physics envy". This malady causes educators to inject an unnecssary amount of mathematics into the curriculum as a way of gaining scientific letgitimacy. Sadly for most undergrads, the math actually gets in the way. I wrote a paper in which I describe the...
  19. P

    NPT monte carlo simulation pressure calculation

    Hello all, I have been working on an NPT monte carlo simulation. I would like to know how I can measure the instantaneous pressure of the system at each monte carlo step?
  20. S

    Monte Carlo Simulation: Exploring Error, Accuracy and Variance

    Hello, 1. Does anybody know which book that gives a good explanation about monte carlo simulation? I've read many tutorials, it mentions about its error, accuracy, variance. But, many of them don't actually show, how to perform monte carlo simulation. Questions 2. Is it actually the same...
  21. A

    How do they simulate the g4numi beamline and particle interactions?

    The Monte Carlo simulation is a very important tool in particle physics specially to tune in the preciseness of the real time experiment. In particle physics, I had an opportunity to work on the data analysis of neutrino flux produced from the g4numi (the Neutrino beam from main injector, in...
  22. J

    Monte Carlo Simulation of a liquid - Need help computing g(r)

    EDIT: I'm not in my sharpest moment. I just found a bunch of posts that discuss this. I'll read them and update this post if I find an answer. I'm working on a hard-sphere MC simulation (for a class). I want to compute the radial distribution function g(r). To put you in context, as to my...
  23. K

    Nucleation and growth in a 2D Ising Model with Monte Carlo Simulation

    I'm currently working on a project for a code that does umbrella sampling of a 2-D Ising model [size LxL of a magnet (analyzing up or down spins)]. The next step is to take my code to analyze a nucleation region and its growth by varying the temperature above critical. Before I even attempt to...
  24. M

    Understanding the Role of Uniform Random Variables in Monte Carlo Simulation

    Hi all! I started learning about Monte Carlo Simulation. However, one thing that I don't quite get is that why for generating any random variable, we have to first generate a Uniform RV? What is the reason behind that? Thanks!
  25. B

    Question about a monte carlo simulation of car travel patterns

    Hi there, I have a question about probability, conditional expectations, copula functions and their use in a Monte carlo simulation. I'd appreciate any help or comments that you can offer. I'll describe briefly what I am trying to simulate and I'll ask the specific question at the end...
  26. L

    Mathematica Gillespie Algorithm (Monte Carlo Simulation) for simple process in Mathematica

    I am trying to model a simple birth and death process in Mathematica using the Gillespie Algorithm. I am using 1 DNA molecule that is transcribed to mRNA with rate k1, \mbox{DNA} \longrightarrow \mbox{DNA + RNA} and the transcribed RNA are subject to degradation with rate k2...
  27. G

    Lattice-gas Monte Carlo Simulation

    Hi all... Im trying to model a simple lattice-gas ( ising model ) system , using MC metropolis algorithm. I am having trouble with the code. I am trying to do it in matlab. My lattice gas does not show the characteristics it should. I used my old Ising Model code, which I modified to do...
  28. T

    Markov Chain/ Monte Carlo Simulation

    Let \bold{X} be a discrete random variable whose set of possible values is \bold{x}_j, \ j \geq 1 . Let the probability mass function of \bold{X} be given by P \{\bold{X} = \bold{x}_j \}, \ j \geq 1 , and suppose we are interested in calculating \theta = E[h(\bold{X})] =...
  29. A

    Troubleshooting Monte Carlo Simulation Compiler Issues

    Hello, my colleague has a problem. He has a Monte Carlo simulation written in C. But his program gives different outputs in case he compile it using g++ or icc. He has nothing changed in his source. He is using standard random number generator drand() with initialization srand((unsigned) time...