Random number generators
Random events are usually modelled and simulated using pseudo-random number generators. If an event has to occur with probability p, then a continuous random variable which is uniformly distributed between 0 and 1 is sampled and if its realization is less than p the event occurs, otherwise the event does not occur. So the problem reduces to the problem of realizing uniformly distributed random numbers. Another related problem is the production of random variables with other distributions, such as an exponentially distributed arrival time. A continuous random variable X is exponentially distributed with parameter λ (mean 1/λ) if its probability density function is
Its distribution function Fx(x) (which yields the probability that X ≤ x) is
This function (which is strictly increasing) has an inverse function (which is also strictly increasing):
A random quantity X with the distribution function Fx(x) can now be computed by setting
Questia, a part of Gale, Cengage Learning. www.questia.com
Publication information: Book title: Simulation for the Social Scientist. Edition: 2nd. Contributors: Nigel Gilbert - Author, Klaus G. Troitzsch - Author. Publisher: Open University Press. Place of publication: Maidenhead, England. Publication year: 2005. Page number: 272.
This material is protected by copyright and, with the exception of fair use, may not be further copied, distributed or transmitted in any form or by any means.