Abstract
The Monte Carlo method studies random phenomena using numerous fictitious experiments with computer-generated random numbers. Its principle is explained and also the principle of generation of random numbers with various probability distributions. Also more complex cases, such as the response surface method and generation of correlated random quantities are explained. The use of the Monte Carlo method is illustrated on several examples.
Keywords
- Probability
- random numbers
- Monte Carlo method
- correlation
- response surface method
- probabilistic transformation
Random phenomena or processes can be successfully studied by the Monte Carlo method [1 - 4]. This is a probabilistic method based on performing numerous fictive experiments using random numbers. It is used in various branches of science and technology. For example, in reliability it serves for the analysis of load-carrying capacity or deformations of a construction, for the determination of time to failure, resonant frequency of a mechanical structure, or an electric circuit, or for the study of behavior of a complex transport or production system.
The Monte Carlo method is close to the engineering way of thinking. It is universal and does not need a special knowledge of probability theory. The only information it needs is the relationship between the output and input quantities,
and the knowledge of probability distributions of the input variables. The method uses numerous repetitions of trials with computer-generated random numbers and the relevant mathematical operations. In each ”trial“, the input variables
![](http://cdnintech.com/media/chapter/50119/1512345123/media/image2_w.jpg)
Figure 1.
Histogram obtained by the Monte Carlo simulation program Ant-Hill [
The generated
Today, various commercial computer programs exist for Monte Carlo simulations, but they can also be created. The base of such program is a generator of random numbers. Actually, they are not truly random but computer generated using a suitable deterministic algorithm. However, such algorithms are used, which generate numbers behaving nearly as if they were random.
The principle of these generators is simple. For example, the so-called congruential generator gives random numbers, distributed uniformly in the interval (0; 1), in the following way. One number is chosen as the base for the series of random numbers
1. Creation of random numbers with nonstandard distributions
The commercial programs offer often-used distributions, such as uniform or normal. The random numbers, corresponding to other analytically defined distributions, can be generated via uniform distribution. The basic idea is that the distribution function
Here,
![](http://cdnintech.com/media/chapter/50119/1512345123/media/fig2.png)
Figure 2.
Generation of random numbers
In some cases, the distribution of a random input quantity has a more complex shape and can be described by a histogram, obtained from experiments or monitoring. This histogram is then used for the construction of distribution function
A typical feature of the Monte Carlo method is that the characteristic values (average, quantiles, probabilities corresponding to certain values of
The characteristic features of the Monte Carlo method are illustrated on several examples at the end of this chapter. The reader is encouraged to work them out on a PC.
2. More complex cases — Response Surface Method
The direct use of the Monte Carlo method is suitable for simple relationships
The relationship between the output quantity
This approximation is suitable if the actual relationship between input and output has a similar character (e.g.
![](http://cdnintech.com/media/chapter/50119/1512345123/media/image9_w.jpg)
Figure 3.
Response surface for two independent variables (a schematic, with cuts
The fit of response function can sometimes be improved by dividing the definition interval of some input quantities into subintervals and using different regression functions for each. This may be substantiated by the physical character of the problem. For example, the elastoplastic deflection of a beam obeys another law than purely elastic deformations.
The quality of the fit can be evaluated by means of residual standard deviation
3. Application of the Monte Carlo method for correlated quantities
The application of Monte Carlo simulations in problems with several input variables is simple if the individual input quantities are mutually independent (e.g. Young’s modulus and the cross-section area of a beam). Sometimes, however, a relation between them exists; (e.g. between mass density and Young’s modulus of concrete). In such case, one speaks about statistical dependence or correlation. A special case is the so-called autocorrelation, when the value of a random quantity at some point is related partly to the values at neighboring points or in preceding times. Examples are the properties of concrete or of soil at foundations or the temperature of a building structure: it varies during a day or from a day to day, but depends partly also on the season in the year.
The omission of correlations in the simulations can lead to errors. For example, a very low value of elastic modulus of concrete could be generated simultaneously with a very high value of strength, but this does not correspond to reality. If correlations are respected, the calculations reflect the reality better and the conclusions or predictions are more accurate, with smaller scatter. Sometimes, also, a quantity needed for the analysis is unavailable, but can be replaced by a correlated quantity. For example, if the direct measurement of the tensile strength of components in an existing massive steel structure is impossible, the information from hardness tests can sometimes be adapted.
The tightness of the relationship of two quantities is characterized by the correlation coefficient
where cov(
![](http://cdnintech.com/media/chapter/50119/1512345123/media/image11.png)
Figure 4.
Two correlated quantities
If two correlated random quantities
where
This approach may be used for linear, as well as nonlinear relationships between
More information on the Monte Carlo method, especially on its use in the assessment of reliability of structures, including load-carrying capacity and lifetime, can be found in books [1 – 3] and proceedings of conferences [4], which contain many practical examples.
Generate (e.g. using Excel) 500 random numbers with normal distribution with the mean
Remark: Excel was mentioned here because it is ubiquitous and its use is easy. Everybody can thus try to solve such problems. The necessary routines Descriptive statistics, Histograms, Generation of random numbers, and Solver are installed in every Excel. However, they are not always directly available. If the command Data analysis does not appear on your screen after the command ”Data“, it must be activated. The procedure is as follows. Click on the button File, then on Possibilities (in this menu), then Add-Ins, then Analytical Tools (and Solver), and, finally, OK. After next pressing the command Data, the buttons Data Analysis and Solver appear in the upper part of the screen. It would be a pity not to use such powerful tools !
Generate 10,000 random numbers (
Determine (by the Monte Carlo method) the mean time to failure from Example 5 in Chapter 5 (four elements in a series, each of exponential distribution with
Solution.
The problem was solved using Excel. First, the mean times to failure of individual components were calculated (in standard way) as
The mean values of the simulation series for the individual components are as follows (the numbers in brackets express the standard deviation): No. 1: 120,073 (126,158), No. 2: 161,217 (162,127), No. 3: 104,902 (103,727), and No. 4: 52,001 (53,723), everything in hours. One can see that the parameters of the generated variables are all near the parent parameters. With higher numbers of simulation trials, the differences would be even smaller.
Remark: Systems with parallel arrangement of components can be solved in a similar way, but instead of searching for the minimum of the times to failure in each trial, now the maximum will be sought, because the parallel system fails only after the failure of the component with the longest time to failure.
References
- 1.
Hammersley J M, Handscomb D. Monte Carlo Methods. New York: John Wiley; 1964. 184 p. - 2.
Marek P, Brozetti J, Guštar M, Tikalsky P, editors. Probabilistic Assessment of Structures using Monte Carlo Simulation. Prague: ITAM CAS CR; 2003. 471 p. - 3.
Marek P, Guštar M, Anagnos T: Simulation-based reliability assessment for structural engineers. Boca Raton: CRC Press; 1996. 384 p. - 4.
Marek P (editor): Reliability of constructions (in Czech: Spolehlivost konstrukcí). Proceedings of conferences. Ostrava: Dům techniky Ostrava; 2000–2012. ISBN 80-0201708-0, 800201489-8, 80-0202007-3, 80-0286246-33-8, ISBN 80-0201551-7. - 5.
Menčík J. Simulation assessment of reliability with correlated quantities. (In Czech: Simulační posuzování spolehlivosti při korelovaných veličinách.) In: Spolehlivost konstrukcí (Reliability of structures), 23.-24. 4. 2003; Ostrava: Dům techniky; 2003. 151 – 156. - 6.
Čačko J, Bílý M, Bukoveczky J. Measurement, evaluation and simulation of random processes. (in Slovak: Meranie, vyhodnocovanie a simulácia náhodných procesov.) Bratislava: VEDA; 1984. 210 p.