Re:Monte Carlo theory, methods and examples (2013)
by nerdponx on Friday July 07, 2017 @09:00AM
(#14717966)
Their work answers the question "how do I take what's coming out of /dev/random and turn it into a disctete probability distribution?"
A "random" process is one in which every outcome is independent and unrelated to every other outcome. Drawing "random numbers" doesn't always mean drawing them uniformly at random, where every number in some range, like 0 to 1, is equally likely. You can draw random numbers according to a probability distribution, which is a mathematical expression describing the probability of drawing one number or another.
One very popular distribution is called the "normal distribution" (named for the "normal equations" of physics) or the "Gaussian distribution" (named for Karl Gauss). Normally-distributed random numbers tend to follow a "bell curve" pattern, with values closer to the peak of the bell curve being more probable than numbers further away.
That's a continuous distribution. You can also have a discrete distribution. Some examples of physical processes that can be moseled with discrete probability distributions:
- Coin toss: do I get a Heads?
- A sequence of coin tosses: how many Heads do I get?
- A die roll: do I get a 5?
- A sequence of die rolls: do I get at least one 5? Is the sum of the die rolls at most 30?
- A poker hand: will I get a flush on my next draw?
- Traffic accidents at an intersection: will there be more than 2 accidents in the next 5 days?
These are all "stochastic" questions, meaning that there is uncertainty, in their answers. So we use probability, and therefore randomness, usually non-uniform, to model these scenarios.
Sometimes you need to generate new random numbers from these distributions as part of your analysis, or for generating predictions. In those cases, you need to take a continuous stream of uniform random numbers, like /dev/random, and turn them into a sequence of numbers that follows one of these distributions.
A "random" process is one in which every outcome is independent and unrelated to every other outcome. Drawing "random numbers" doesn't always mean drawing them uniformly at random, where every number in some range, like 0 to 1, is equally likely. You can draw random numbers according to a probability distribution, which is a mathematical expression describing the probability of drawing one number or another.
One very popular distribution is called the "normal distribution" (named for the "normal equations" of physics) or the "Gaussian distribution" (named for Karl Gauss). Normally-distributed random numbers tend to follow a "bell curve" pattern, with values closer to the peak of the bell curve being more probable than numbers further away.
That's a continuous distribution. You can also have a discrete distribution. Some examples of physical processes that can be moseled with discrete probability distributions:
- Coin toss: do I get a Heads?
- A sequence of coin tosses: how many Heads do I get?
- A die roll: do I get a 5?
- A sequence of die rolls: do I get at least one 5? Is the sum of the die rolls at most 30?
- A poker hand: will I get a flush on my next draw?
- Traffic accidents at an intersection: will there be more than 2 accidents in the next 5 days?
These are all "stochastic" questions, meaning that there is uncertainty, in their answers. So we use probability, and therefore randomness, usually non-uniform, to model these scenarios.
Sometimes you need to generate new random numbers from these distributions as part of your analysis, or for generating predictions. In those cases, you need to take a continuous stream of uniform random numbers, like /dev/random, and turn them into a sequence of numbers that follows one of these distributions.