Given a variable $X$ with a PDF, what is the PDF of $\sqrt{X}$ I feel this is simple and I'm overlooking something really basic. Let's say a have a variable $x$ which obeys the exponential distribution. So if collect 100000 occurrences of $x$ and plot its histogram along with the formula for the exponential distribution (with $\lambda=1$), we have the following graph, where the blue bars are the "actual" values taken experimentally and the green line is theoretical prediction.

Now to my question: If instead I get the occurrences of $x^{1/2}$ instead of $x$ (with $x$ still obeying the same PDF), take the histogram of the 100000 positions array and plot it, I have something like the following graph.

The problem is that I can't figure out the probability distribution in this case. I have found similar answers here and here but none of them quite solve it for me.
Any help is appreciated. Thank you.
 A: The simplest way is probably using the CDF, which is known in this case. Let $X \sim Exp(1)$ and $Y = \sqrt{X}.$  The CDF of $X$ is
$F_X(x) = 1 - e^{-x}$, for $x > 0.$ Then
$$F_Y(y) = P(Y \le y) = P(\sqrt{X} \le y) = P(X \le y^2)
= 1 - e^{-y^2},$$
for $y > 0.$
Then take the derivative of the CDF of $Y$ to get 
$F_Y^\prime(y) = f_Y(y) = 2ye^{-y^2},$ for $y > 0.$
Below is R code for the simulation, and a histogram of the
simulated $Y$ values, with the PDF overlaid. (Note the curve
function is programmed to require argument x, regardless
of the rest of the code.)
 x = rexp(10^5, 1);  y = sqrt(x)
 hist(y, prob=T, col="wheat")
 curve(2*x*exp(-x^2), add=T, lwd=2, col="blue")


Notes: (a) It is not exactly clear whether you want what I did
or $Y = X^2.$ If the latter, $F_Y(y) = 1- e^{-\sqrt{y}}$ and 
$f_Y(y) = e^{-\sqrt{y}}/(2\sqrt{y}),$ for $y> 0.$ The distribution is mainly crowded against the origin with a long 'tail' to the right (as in your upper figure). (b) When squaring, you need to make sure you have not
gained or lost a 'chunk' of probability; not an issue here
because we're dealing entirely with positive numbers. (c) When the density function is known and the CDF is not, there
is another method. You can google 'pdf transformation method'
or look in most any basic probability book under 'transformations
of random variables'.
A: Let $X$ be a random variable with density function $f_X(x)$, $g(x)$ be a monotone increasing
function of $x$, and $Y = g(X)$. We seek the density function $f_Y(y)$ of $Y.$ In this instance it can be shown that
$$f_Y(y) = f_X(g^{-1}(y)) \frac{dg^{-1}(y)}{dy},$$
where $g^{-1}$ is the inverse function of $g$.
In your Question, $X \sim Exp(1),\;$$g(x) = \sqrt{x}$ (for $x>0),\;$ $g^{-1}(y) = y^2,$ and $dg^{-1}(y)/dy = 2y.$ Thus $f_Y(y) = e^{-y^2}(2y)$ (for $y > 0), $ which is the same result obtained using the CDF method. Indeed, the density method is derived using the CDF method. The PDF method is
especially useful when the CDF of $X$ cannot be expressed in closed form.
The histogram below illustrates this transformation. Histogram bars of the same color have the same area and represent the same simulated values (original at left and transformed at right). The factor $dg^{-1}(y)/dy$ can be
considered a mechanism that adjusts the heights of histogram bars
so that area remains the same when the base has been shortened or lengthened as a result of the transformation. (Based on 100,000 simulated values of $X$. About 0.2% of of the points in the far right tail of the exponential curve have been omitted to make graphs easier to read.)
 
Note: $Y \sim Weibull (\text{shape} = 2, \text{scale} = 1).$ See Wikipedia 'Weibull distribution' if interested. Weibull distributions are widely used in reliability theory.
