views:

102

answers:

2

how could i change a random non-uniform distribution to a uniform distribution ? Is there a formula ? thanks .

+2  A: 

Suppose you have samples from a random variable X with CDF function F_X. Then F_X(X) has a uniform distribution.

John D. Cook
oh i see ...Did u mean F(X) = CDF and i need to find the F(X)square ?
Scheery
or did i need to integrate F(X) by xd(x) ? thanks
Scheery
No integration. Just take samples and stick them into F_X to make uniform samples. For example, the CDF of an exponential random variable is F(x) = 1 - exp(-x). If you take a bunch of samples x_i from an exponential distribution, the numbers F(x_i) have a uniform distribution.
John D. Cook
Usually this theorem is applied the other way around: it's standard to generate uniform samples and then apply the *inverse* CDF of another distribution family to get samples from that distribution.
John D. Cook
ok thanks a lot ^-^
Scheery
A: 

The standard approach is to only use some lower-order bits, which are reasonably uniform.

starblue
sorry i don't really understand what you meant ...care to explain please ? thanks !
Scheery