Problem 1 on the worksheet

Simulate values of X:

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

Histogram[xvals, 20,"PDF"]

Square the values of X:

yvals=xvals^2

Histogram[yvals,20,"PDF"]