[Math] the pdf of $Y = \log X$

probability distributions

Let $X$ be a standard exponential random variable, and $Y = \log X$.

(a) Find DIRECTLY the c.d.f of $Y$ and use it to calculate the density of $Y$.

(b) Find DIRECTLY the p.d.f of $Y$.


So far, I did:

(a) $F_Y(y) = P(\log X \leq y) = P(X \leq e^y) = F_X(e^y)
f_Y(y) = F'_Y(y) = F'_X(e^y) = [f_X(e^y)][e^y] = (e^{-e^y})(e^y) = e^{y-e^y}$

(b) $f_Y(y) = P(\log X = y) = P(X = e^y) = f_X(e^y) = e^{-e^y}$

How come the answers I got for part a and b are not the same. What did I do wrong?

Best Answer

Because PDFs don't work like this. The issue is you need to change of variables on the probability $P(Y=y)=f_Y(y)dy$, and not just the density. More precisely, if $y=\log(x)$ then $dy=e^{-y}dx$, so $P(Y=y)=f_Y(y)dy=P(\log X=y)=f_X(e^y)dx=f_X(e^y)e^ydy$ so that you recover your answer from the first part.