Thursday, March 24, 2011

Simulation of different random variables

To simulate a random variable of CDF (note its CDF not PDF) the easiest way is
x = F(inverse) [rand()]
rand() = uniform random variable(matlab and excel has standard functions for this)
Of course this works only when we have some closed form expression for CDF..
Hence will not work for distributions like Gaussian etc.
I will be updating this page for simulating different distributions using matlab

No comments:

Post a Comment