I wish to simulate the random variable according to pdf $$ f(x)=xe^{-x} $$ I have to feeling that I should first simulate an exponential random variable $t$ with parameter -1 and try to use the composition method, but can't seem to figure out exactly how.
Thank you in advance.