Pseudorandom Number Generation with Specific Non-Uniform Distributions
Posted
by
carnun
on Stack Overflow
See other posts from Stack Overflow
or by carnun
Published on 2010-12-27T06:25:07Z
Indexed on
2011/01/02
19:54 UTC
Read the original article
Hit count: 176
Hello all,
I'm writing a program that simulates various random walks (with differing distributions). At each timestep, I need randomly generated, two dimensional step distances and angles from the distribution of the random walk. I'm hoping someone can check my understanding of how to generate these random numbers.
As I understand it I can use Inverse Transform Sampling as follows:
If f(x) is the pdf of our random walk that has a non-uniform distribution, and y is a random number from a uniform distribution. Then if we let f(x) = y and solve to find x then we have a random number from the non-uniform distribution.
Is this a feasible solution?
© Stack Overflow or respective owner