Since random numbers are generated for the uniform distribution p(x) with x∈[0,1], we need to perform a change of variables x→y through x(y)=∫yap(y′)dy′, where we used p(x)dx=dx=p(y)dy. If we can invert x(y), we find y(x) as well.