Density function of the square root of a random number (uniformly distributed from 0 to 1)

1.6k Views Asked by At

These questions were posted as review for material I've been covering in class.

Suppose we execute the following code: U = MTUniform (0); X = sqrt(U); Here both U and X are doubles. What is the density function of X?

Suppose we execute the following code: U = MTUniform (0); X = -2*log(U); Here both U and X are doubles. What is the density function of X?

I understand that the first bit of the code generates a random number from the uniform distribution 0 to 1. Then (in both questions) the random variable X is created that contains that random number that was generated. How would I find that density function? I am having a lot of trouble understanding this intuitively.