# Stuck on 'differentiating the integral from above' for computing of a PDF

I am stuck on a math derivation that has to do with statistics, so I am putting the statistical context here for context. In short, I am stuck on understanding how the answer to the PDF was attained.

Let $Y$ be ~$N(0, \ \sigma^2)$, and let $Z = |Y|$. The objective is to compute the Probability Distribution Function of $Z$.

The PDF of $Z$, given by $f_Z(z)$, is given by the following:

$$f_Z(z) = \begin{cases} \frac{d}{dz} \int_{-z}^{z} f_Y(y) \ dy = 2 f_Y(z), & z \geq 0 \\ 0 & z < 0 \end{cases}$$

I understand the entire setup, however I do not understand how this was evaluated to $2 f_Y(z)$. FWIW though, I do understand how this works intuitively. I do not understand how it was mathematically derived though.

The paper I am reading says that this was found out by "differentiating the integral from above with respect to the upper and lower limits". I do not know what that means exactly, and how the final answer was derived.

Thanks.

-

From the symmetry of the cumulative distribution $F_Y$:
$$\frac{d}{dz}\left[\int_{-z}^{z}f_{Y}\left(y\right)dy\right]=\frac{d}{dz}\left[F_{Y}\left(z\right)-F_{Y}\left(-z\right)\right]=f_{Y}\left(z\right)-\left(-f_{Y}\left(z\right)\right)=2f_{Y}\left(z\right)$$
Thanks, but can you please explain how $\frac{d}{dz}F_Y(-z) = -f_Y(z)$?.... –  Mohammad May 2 '13 at 23:37
Wait... is it because $\frac{d}{dz}F_Y(-z) = \frac{d}{dz}[F_Y(\infty) - F_Y(z)] = \frac{d}{dz}[1 - F_Y(z)] = -f_Y(z)$ ?... –  Mohammad May 2 '13 at 23:49
Note that $\frac{d}{dz}F_Y\left(-z\right)=-f_Y\left(-z\right)=-f_Y\left(z\right)$. The first equality is an application of chain rule. The second equality follows from $f_Y$ being an even function ($f_Y\left(z\right)=f_Y\left(-z\right)$, you can verify this directly from the probability density) –  par May 2 '13 at 23:59