### 8.3.7 Producing random numbers with an exponential distribution: randexp

Recall that given a positive number a, the corresponding exponential distribution satisfies

Prob(X ≤ t) = a | ∫ |
t
0
| exp(−a * u) du

Given a parameter a, the command randexp(a) will return a number chosen randomly according to the corresponding exponential distribution. For example, if you enter

randexp(1)

you might get

0.193354391918