- pdf

- cdf

- The idea is to solve
for
*x*where*y*is uniformly distributed on (0,1) because it is a cdf. Then*x*is exponentially distributed. - This method can be used for any distribution in theory. But it
is particularly useful for random variates that their inverse function
can be easily solved.
- Steps involved are as follows.
**Step 1.**- Compute the cdf of the desired random variable .
For the exponential distribution, the cdf is .

**Step 2.**- Set
*R = F(X)*on the range of .For the exponential distribution, on the range of .

**Step 3.**- Solve the equation
*F(X) = R*for in terms of .For the exponential distribution, the solution proceeds as follows.

**Step 4.**- Generate (as needed) uniform random numbers
and compute the desired random variates by

In the case of exponential distribution

for*i = 1, 2, 3, ...*where is a uniformly distributed random number on (0,1).In practice, since both AND are uniformly distributed random number, so the calculation can be simplified as

- To see why this is correct, recall

and

Because is equivelant to , and is a non-decreasing function (so that if then ) we get is equivelant to , which implies that which is equivelant to .

This means

Since is uniformly distributed on (0,1) and is the cdf of exponential function which is between 0 and 1, so

which means

This says the is the cdf for and has the desired distribution.

Once we have this procedure established, we can proceed to solve other similar distribution for which a inverse function is relatively easy to obtain and has a closed formula.