# stat341 / CM 361

Computational Statistics and Data Analysis is a course offered at the University of Waterloo
Spring 2009
Instructor: Ali Ghodsi

$Insert formula here$

## Sampling (Generating Random numbers)

### Inverse Transform Method

Step 1: Draw $U~ \sim~ Unif [0,1]$.
Step 2: Compute $X = F^{-1}(U)$.
Example:
Suppose we want to draw a sample from [itex] f(x) = \lambda e^{-\lambda x} <\math>