Generating random numbers with
Monte Carlo method using
1.
Exponential
distribution
2.
Uniform
distribution
3.
Binomial
distribution
Concept:
Monte Carlo methods (or Monte
Carlo experiments) are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results;
i.e., by running simulations many times over in order to calculate those same
probabilities heuristically just like actually playing and recording your
results in a real casino situation: hence the name. They are often used in physical and mathematical problems and are most suited to be
applied when it is impossible to obtain a closed-form expression or infeasible to apply a deterministic algorithm.
Monte Carlo methods are mainly used in three distinct problems: optimization, numerical integration and generation of samples from a probability distribution.
Monte Carlo simulation methods do not always require truly random numbers to be useful —
while for some applications, such as primality
testing, unpredictability is vital.[10] Many
of the most useful techniques use deterministic,pseudorandom sequences, making it
easy to test and re-run simulations. The only quality usually necessary to make
good simulations is
for the pseudo-random sequence to appear "random enough" in a certain
sense.
What this means depends on the application, but typically they should
pass a series of statistical tests. Testing that the numbers are uniformly distributed or
follow another desired distribution when a large enough number of elements of
the sequence are considered is one of the simplest, and most common ones. Weak
correlations between successive samples is also often desirable/necessary.
Sawilowsky lists the
characteristics of a high quality Monte Carlo simulation:
·
the (pseudo-random) number generator has certain characteristics (e.g.,
a long “period” before the sequence repeats)
·
the (pseudo-random) number generator produces values that pass tests for
randomness
·
there are enough samples to ensure accurate results
·
the proper sampling technique is used
·
the algorithm used is valid for what is being modeled
·
it simulates the phenomenon in question.
Comments
Post a Comment