Example for video

Simulate values of a uniform random variable X on 0<x<1.

xvals=RandomReal[{0,1},100000];
Take[xvals,20]

Check that the distribution looks like the pdf:

Histogram[xvals,{.04},"PDF"]

Now transform the values of X to obtain values of Y=(e^X):

yvals=Map[Exp,xvals];
Take[yvals,20]

Make a histogram to see the distribution of values of Y:

yhist=Histogram[yvals,{1,E,(E-1)/25},"PDF"]

Show[{yhist,Plot[1/y,{y,1,E}]}]

Worksheet Problem 1

xvals=RandomVariate[ProbabilityDistribution[x/2,{x,0,2}],100000];
Take[xvals,20]

Histogram[xvals,20,"PDF"]

yvals=xvals^2;
Take[yvals,20]

Histogram[yvals,20,"PDF"]