Problem calculating MGF (expectation) using just the definition. Assume $ (\Omega,\mathcal{F})=([0,1],[0,1]\cap\mathcal{B}(\mathbb{R})$  . Let $(X_j)_{j\geq1}$ be a sequence of independent random variables s.t. 
$\mathbb{P}(X_j=k)=\frac{1}{3}, k=0,1,2,  j=1,2,..$
Now, one of the parts of the question asks me to calculate the MGF $F(t)=\mathbb{E}[e^{tX_j}] , t\in \mathbb{R}, j\geq1$.
By definition $\mathbb{E}[e^{tX_j}] =\int e^{tX_j}d\mathbb{P}  $ . My problem is that I don't quite understand over what region I should integrate. According to literature it looks like it should be over the whole sample space , in this case $\Omega=[0,1]$ and since also- I assume $X_j:\Omega \longrightarrow \mathbb{R}  $.
But then I ran into troubles because if I just look at it from measure theory point of view, then $X_j$ is just a simple function taking 3 values and the integral is a sum. But then to get my answer I need to evaluate it say over whole real line, or at least over [0,2] , i.e.
$ \int_\mathbb{R} e^{tX_j}d\mathbb{P}= \int_\mathbb{0,1,2} e^{tX_j}d\mathbb{P} = \int ( e^{t0}\mathbb{1}_{0} +e^{t1}\mathbb{1}_{1} + e^{t2}\mathbb{1}_{2} )      d\mathbb{P} = e^{t0}\mathbb{P}(0)+e^{t1}\mathbb{P}(1)+e^{t2}\mathbb{P}(2)= \frac{1}{3}(1+e^t+e^{2t})$
I must be getting something wrong. Would be very grateful for pointing out what exactly!
 A: What do you think is wrong with your answer?  The MGF will be a function of $t$, so don't let that throw you off.
If you'd like to attack it measure-theoretically, you're correct that
$$
E(e^{tX_j}) = \int_\Omega e^{tX_j(\omega)} \, dP(\omega).
$$
Almost always, for computation we apply the change of variables theorem to transition to the law $\Lambda_{X_j}$ of $X_j$, then apply the definition of the pmf $f_{X_j}$ to transition to the counting measure $\delta$ (since $X_j$ is discrete) for computation.  To see this, let $X_j: \Omega \to \mathbb{N}$.  Then 
\begin{align*}
\int_\Omega e^{tX_j(\omega)} \, dP(\omega) & = \int_\mathbb{N} e^{tx} \, d\Lambda_{X_j}(x) \\
& = \int_\mathbb{N} e^{tx} f_{X_j}(x)\, d\delta(x) \\
& = \int_\mathbb{N} e^{tx} \frac{1}{3}\mathbb{I}_{\{0,1,2\}}(x)\, d\delta(x) \\
& = \frac{1}{3}(1 + e^t + e^{2t}).
\end{align*}
The first equality is the change of variables theorem, the second is the definition of a pmf (it's a Radon-Nikodym derivative of the Law of $X_j$ w.r.t. the counting measure), the third equality is the definition of the pmf $f_{X_j}$ you gave, and the fourth equality is because integration w.r.t. the counting measure is just summation (nice explanation here).
