I have been giving two discrete random variables $X$ and $ Y$ and their probability distribution functions.
$X$ and $ Y$ are independent of each other.
I have to calculate $E(Xe^{X-Y})$. I know what the answer is, since that has been given to me, but I would like to know how to solve especially the part containing $e^{X-Y}$.
First of all, since X and Y are independent, can I split it up so that it becomes $E(X)\cdot E(e^{X-Y})?$
Furthermore, if it was just $e^X$ for instance, then I would just use the probability distribution function for $X$ and calculate $P_1e^{X_1} + P_2e^{X_2} + \ldots + P_ne^{X_n}$.
How do I deal with specifically this kind of exercise?
No, you cannot split $EXe^{X-Y}$ to $EX\; Ee^{X-Y}$ since $X$ and $e^{X-Y}$ are dependent, in general. But you can split it to $$EXe^{X-Y} = EXe^X \; Ee^{-Y}$$ since $Xe^X$ and $e^{-Y}$ are independent. Then calculate both as you wrote above: $$EXe^X = x_1e^{x_1}p_1+x_2e^{x_2}p_2+\ldots,$$ $$Ee^{-Y}=e^{-y_1}q_1+e^{-y_2}q_2+\ldots,$$ where $P(X=x_i)=p_i$, $P(Y=y_i)=q_i$.