MGF of a random variable sum

150 Views Asked by At

To the bank comes $N \sim Bin(4, 0.5)$ people
$X_i$ is an indicator of an event- person $i$ has deposited cash, $P(X_i) = 0.5, \quad X_i, X_j$ are independent $\forall i \neq j$
The number of people who deposited cash that day is $X = \displaystyle \sum_{i=1}^N X_i$
I need to calculate $M_x(2)$ where $M_x$ is the MGF of X.

I didn't manage to go too far:
$M_x(t) = M_{\sum_{i=1}^N X_i}(t) = (M_{X_1}(t))^N$

Edit: I came across a solution that states at the beggining : $M_x(t) = M_n(ln(M_{X_1}(t))$ But I don't understand why

2

There are 2 best solutions below

2
On BEST ANSWER

There are 4 people who each have a 1/4 chance of depositing cash (1/2 of going to the bank and 1/2 of then depositing cash). Let $Y_{i}$ be the indicator that person $i$ deposits cash, then: $$\begin{align} M_{Y_i}(t) &= E[e^{Y_{i}t}] \\ &= .75e^{0} + .25e^{t} \end{align}$$ The moment generating function for the sum $N = \sum\limits_{i=1}^{4} Y_{i}$ is:

$$\begin{align} M_N(t) &= M_{\sum_{i=1}^4 Y_i}(t) \\ &= (M_{Y_1}(t))^4 \\ &= (.75 + .25e^{t})^4 \end{align}$$ Evaluating this at $t=2$ gives the answer in your textbook: $$\begin{align} M_{N}(2) &= (.75 + .25e^{2})^4 \\ &= 45.5 \end{align}$$

2
On

Let $N \sim \mathcal B(4,\frac{1}{2})$, let $\{X_n\}_{n \in \mathbb N}$ be independent random variables such that $\mathbb P(X_n = 1) = \mathbb P(X_n =0 ) = \frac{1}{2}$.

Let $X = \sum_{k=1}^N X_k$. I assume that $N$ is independent of $\{X_k\}$.

Then $$M_X(t) = \mathbb E[\exp(tX)] = \mathbb E[ \mathbb E[\exp(tX)|N]] = \mathbb E(M_{X_1}(t))^N = \sum_{j=0}^4 {4 \choose j}M_{X_1}(t)^j\frac{1}{2}^j(1-\frac{1}{2})^{4-j} $$

The last sum is binomial $(\frac{M_{X_1}(t)}{2} + (1-\frac{1}{2}))^4$

To end, note that $M_{X_1}(t) = \frac{1}{2}(\exp(t) + 1)$

Hence $$ M_X(t) = (\frac{3}{4} + \frac{1}{4}\exp(t))^4 $$