2
$\begingroup$

Let $X,Z$ be random variables with probability density functions $p_X,p_Z$. Suppose $Z=f(X)$, where $f$ is continuous and differentiable. How is $p_Z$ related to $p_X$? It's tempting to say $p_Z(z) = p_X(f^{-1}(z))$, but I think that is not correct: I think it might be

$$p_Z(z) = {p_X(f^{-1}(z)) \over f'(f^{-1}(z))},$$

where $f'$ is the derivative of $f$, but I am not sure whether I've got that right. What is the correct rule?

$\endgroup$

2 Answers 2

2
$\begingroup$

The correct rule is

$$p_Z(z) = \sum_{x \in f^{-1}(z)} {p_X(x) \over f'(x)},$$

as there can be multiple possible values $x$ that satisfy $f(x)=z$.


One way to derive this, in the case of a monotonic $f$ (so there is only a single $x$ such that $f(x)=z$), is to consider the cdfs $f_X,f_Z$. Then we have

$$F_Z(z) = \Pr[Z \le z] = \Pr[f(X) \le z] = \Pr[X \le f^{-1}(x)] = F_X(f^{-1}(z))$$

and

$$\begin{align*} p_Z(z) &= {d \over dz} F_Z(z) = {d \over dz} (F_X(f^{-1}(z)))\\ &= ({d \over dz} F_X)(f^{-1}(z)) \cdot {d \over dz} f^{-1}(z)\\ &= p_X(f^{-1}(z)) \cdot 1/f'(f^{-1}(z)). \end{align*}$$

$\endgroup$
0
$\begingroup$

Think of the density as the number of particles in a volume in the $dx$ area in X space. The particles in the area $\int p(x)dx$ should be the same with $\int q(y)dy$ in the corresponding area in Y space.

$$ \begin{align} \int p(x)dx &= \int q(y)dy \\ x &= f^{-1}(y) \end{align} $$

Hence,

$$q(y) = \left\| \frac {p(f^{-1}(y))}{f'(x)} \right\|$$

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.