Use as your random sample, where is a computer-generated (pseudo-)random number drawn from a Uniform(0,1) distribution.

You need to find a formula for in order to make this practical.

(This is a general method for generating numbers from arbitrary distributions on a computer.)