User:Vojtech.zrust/sandbox
Stochastic simulation is a simulation that operates with variables that can change with certain probability. Stochastic means that particular factors (values) are variable or random.[1]
With stochastic model we create a projection which is based on a set of random values. Outputs are recorded and the projection is repeated with a new set of random (variable) values. Previous steps are repeated until reasonable amout of data is gathered (thousandfold, millionfold, ..). In the end, the distribution of the outputs shows the most probable estimates as well as a frame of expectations (fringe values dividing those we still can expect from the ones we should not).[1]
Stochastic
Stochastic means "pertaining to conjecture"; from Greek stokhastikos "able to guess, conjecturing"; from stokhazesthai "guess"; from stokhos "a guess, aim, target, mark". The sense of "randomly determined" was first recorded in 1934, from German Stochastik. [2]
Discrete-event simulation
In order to determine the next event in a stochastic simulation, the rates of all possible changes to the state of the model are computed, and then ordered in an array. Next, the cumulative sum of the array is taken, and the final cell contains the number R, where R is the total event rate. This cumulative array is now a discrete cumulative distribution, and can be used to choose the next event by picking a random number z~U(0,R) and choosing the first event, such that z is less than the rate associated with that event.
Continuous simulation
While in discrete state space it is cleary distinguished between particular states (values) in continuous space it is not possible due to certain continuity. The system usually change over time, variables of the model, then change continuously as well. Continuous simulation thereby simulates the system over time, given differential equations determining the rates of change of state variables. [3] Exemple of continuous system is the predator/prey model[4] or cart-pole balancing [5]
Combined simulation
It is often possible to model one and the same system by use of completely different world views. Discrete event simulation of a problem as well as continuous event simulation of it (continuous simulation with the discrete events that disrupt the continuous flow) may lead eventually to the same answers. Sometimes however, the techniques can answer different questions about a system. If we necessarily need to answer all the questions, or if we don't know what purposes is the model going to be used for, it is convenient to apply combined continuous/discrete methodology. [6]
Monte Carlo Simulation
Monte Carlo is an estimation procedure. The main idea is that if it is necessary to know the average value of some random variable and its distribution can not be stated, and if it is possible to take samples from the distribution, we can estimate it by taking the samples, independenty, and averaging them. If there are sufficiently enough samples, then the law of large numbers says the average must be close to the tru value. The cenrtal limit theorem says that the average has a Gaussian distribution around the true value.[7]
Simple example: We need to measure area of a shape with a complicated, irregular outline. The Monte Carlo approach is to draw a square around the shape and measure the square. Then we throw darts into the square, as uniformly as possible. The fraction of darts falling on the shape gives the ratio of the area of the shape to the area of the square. In fact, it is possible to cast almost any integral problem, or any averaging problem, into this form. It is necessary to have a good way to tell if you're inside the outline, and a good way to figure out how many darts to throw. Last but not least, we need to throw the darts uniformly, i.e., a good random number generator.[7]
Application
There are wide possibilities for use of Monte Carlo Method [1]:
- Statistic experiment using generation of random variables (e.g. dice)
- sampling method
- Mathematics (e.g. numerical integraion, multiple integrals)
- Reliability Engineering
- Project Mnagement (SixSigma)
- Experimental particle physics
- Simulations
- Risk Measurement/Risk Mangement (e.g. Portfolio value estimation)
- Economy (e.g. finding the best fitting Demand)
- Process Simulation
- Operation Research
Random Number Generators
For simulation experiments (including Monte Carlo) it is necessary to generate random numbers (as values of variables). The problem is, that the computer is highly deterministic machine - basicaly, behind each process there is always an algorithm, deterministic computation changing inputs to outuputs, therefore it is not easy to generate uniformly spread random numbers over a defined interval or set. [1]
References
- ^ a b c d DLOUHÝ, M.; FÁBRY, J.; KUNCOVÁ, M.. Simulace pro ekonomy. Praha : VŠE, 2005.
- ^ stochastic. (n.d.). Online Etymology Dictionary. Retrieved January 23, 2014, from Dictionary.com website: http://dictionary.reference.com/browse/stochastic
- ^ Crespo-Márquez, A., R. R. Usano and R. D. Aznar, 1993, "Continuous and Discrete Simulation in a Production Planning System. A Comparative Study"
- ^ Louis G. Birta, Gilbert Arbez (2007). Modelling and Simulation, p. 255. Springer.
- ^ http://anji.sourceforge.net/polebalance.htm
- ^ Francois E. Cellier, Combined Continuous/Discrete Simulation Applications, Techniques, and Tools
- ^ a b Cosma Rohilla Shalizi, Monte Carlo, and Other Kinds of Stochastic Simulation, [online] available at http://vserver1.cscs.lsa.umich.edu/~crshalizi/notebooks/monte-carlo.html