# PDF of function of Random Variable (alternative without differenciating CDF)?

I am still trying to do the same question I was asking about in another question. Basically, I have a random variable $X \sim \mathcal{G}(n, \lambda)$ and $Y = n\tau + X$ where $n, \tau$ are constants. I need to find the PDF of $Y$. In the other question, I learnt that I can use $F_y(y) = F_x(g^{-1}(y))$ then differenciate to find the PDF. I have problems differenciating the gamma distribution back to the PDF correctly (math.SE question). So I am trying a different approach ... wondering if its valid:

$$f_x(x)=Pr(X=x)=Pr(n\tau + X = n\tau + x)$$

I added $n\tau$ to both sides (is this valid in this context)?

$$...=Pr(Y=n\tau + x) = Pr(Y = y) = f_y(y)$$

Now I continue by trying to make $X$ the subject

$$... = Pr(X = Y - n\tau) = f(y-n\tau)$$

The final answer is right from my previous question. But the intermediate steps seem wrong? How do I make a better explaination? Or is this valid?

• It is rather surprising to see that nobody saw fit to mention that in your context Pr(X=x) = Pr(nτ+X=nτ+x) = Pr(Y=nτ+x) = Pr(Y=y) = Pr(X=y−nτ) = 0 for every x and every y (as was already explicitly mentioned to you).
– Did
Nov 14, 2013 at 12:40

You are simply shifting the pdf of X $n\tau$ units to the right, which is what your last expression is saying.
$Y=X+ n\tau \rightarrow X=Y-n\tau \rightarrow f(y-n\tau)=f(x)$ So, yes, your derivation is OK, you are simply subsituting an expression equivalent to x as the argument of the density function.
• Oh I should have mentioned $n,\tau$ are positive. Is my argument/proof correct tho? Nov 6, 2013 at 4:59