# Transformation of PDF

The random variable X has probability density function

\begin{cases} \frac{x}{8} & 0<x<4 \\ 0 & otherwise \end{cases}

Find the probability density function of $Z = \log_e (X/4)$

I tried and got this:

\begin{cases} \frac{4e^z}{8} & 0<Z<e^z \\ 0 & otherwise \end{cases} but the limits don't seem right to me, is this correct?

• Hint: what values can $Z$ get for $0<x<1$? – karakfa Nov 16 '16 at 20:32
• would it be $0<Z<\infty$? – charliejs Nov 16 '16 at 20:45
• @charliejs ?? How do you realize $Z=42$ from some $X$ in $(0,4)$ through the transform $Z=\ln(X/4)$? – Did Nov 16 '16 at 21:03
• @Did I haven't got $Z=42$?? – charliejs Nov 16 '16 at 21:10
• You suggested that the range of $Z$ is $(0,\infty)$, right? And $42$ is in $(0,\infty)$, yes? So... – Did Nov 16 '16 at 21:16

if $f(x)$ is the profability density function for $x$ and $z = z(x)$, then the pdf for $z$ can be calculated as

$$f(z) = f(x)\left|\frac{dx}{dz}\right| \tag{1}$$

In this case you already know the expression $z=z(x)$:

$$z = \ln x/4 \quad\Rightarrow\quad x = 4e^{z}$$

so that

$$\frac{dx}{dz} = 4e^z$$

Before replacing in (1) note that when $z(x\to 0^+) = -\infty$, and $z(x=1) = 0$, so the $z$ will range in $(\infty, 0)$. So in the this range

$$f(z) = f(x)|4e^z| = 2e^{2z} \quad\mbox{for}\quad z<0$$

or in other words

$$f(z) = \left\{\begin{array}{lcl} 2e^{2z} &,& z < 0 \\ 0 &,& {\rm otherwise}\end{array}\right.$$

Here's a simulation, the dashed line is the function $2e^{2z}$