# Moment-generating function of $m$ independent variables [closed]

Let $$X_1,...,X_n$$ be independent variables, each of them has a Discrete uniform distribution between $$0$$ and $$m$$, $$m= \left( 2,3,4,,... \right)$$.

Let $$Y$$ be a random variable which is defined by $$Y = X_1 + X_2 +...+X_n$$.

What is the Moment-generating function of $$Y$$?

I do know that since the $$X_i$$s are independent, the function is a sum of all the moment generating functions of the $$X_i$$s. I also know that each function is essentially the expected value of $$e^{tx}$$. However, here I'm lost.

• "since the $X_i$s are independent, the function is a sum of all the moment generating functions of the $X_i$" What you mean by that is unclear but almost certainly wrong. – Did Jan 13 at 9:06

$$Ee^{tY}=[\frac 1 {m+1} \frac {e^{t(m+1)}-1} {e^{t-1}}]^{n}$$ for $$t \neq 0$$, $$1$$ for $$t=1$$. I have used the formula for a geometric sum as well as the fact that the MGF of a sum of independent random variables is the product of the individual MGF's.
• Thank you. Why $\frac{1}{m+1}$ and not $\frac{1}{m}$? – Alan Jan 13 at 16:43
• @Alan How many numbers are there from $0$ to $m$ (both included)? There are $m+1$ of them not $m$. – Kabo Murphy Jan 13 at 23:31