Use the direct inversion method to generate a random variable with Rayleigh distribution with parameter σ >0) where the PDF of the distribution is given by