Is $\Bbb E [XN|N=n] =\Bbb E[nX]$?

69 Views Asked by At

It seems obvious that the statement is true, but I was unable to prove it from the definitions.
In general, I would like to show something like "For a function of two random variables $f(X,N)$ we have $$\Bbb E [f(X,N)|N=n] =\Bbb E[f(X,n)]$$" For a conditional expectation we need a conditional probability density. Letting $Y=f(X,N)$ for brevity, we have to find $f_{Y|N}(y|n)=\frac{f_{Y,N}(y,n)}{f_N(n)}$.
However, I do not know how to compute this conditional density. I tried computing the cumulative density function as $F_{Y,N} (y,n)=\Bbb P (Y<y,N<n)$ but that did not work either because at most I only know that $N<n$, which is insufficient to transform $\Bbb P (Y<y,N<n)$ to $\Bbb P (X<\frac yn, N<n)$.
Then I tried simply plugging into the integral formula in the definition, but there I would have to integrate with respect to $y=xn$, and I am confused on how to deal with the $n$.
In short, I do not know how to prove that, for random variables $X,N$ $$\Bbb E [f(X,N)|N=n] =\Bbb E[f(X,n)]$$ If the statement is false or it requires stronger assumptions or it can be proven more generally/cleanly using measure theory I am all ears.