# Thread: Moment Generating Function of a Discrete Uniform Distr

1. ## Moment Generating Function of a Discrete Uniform Distr

I've proven the first part, but I don't seem to know how to take the derivative of this function to find the mean of the distribution.

The question is If a random variable x has the discrete uniform distribution
f(x;k) = 1/k, x = 1,2,3,...k and 0 elsewhere, can it be shown that
the MGF of x is Mx(t) = (e^t(1-e^kt)/k(1-e^t) ? This part I've proven

We define Mx(t) = E(e^(xt)). Then for the uniform distribution given,
Mx(t) = ∑▒〖[e^(xt)(1/k)]〗
= (1/k)[e^t + e^(2t) + e^(3t) + ..... + e^(kt)]
= (1/k)e^t[1-e^(kt)]/(1-e^t)

The last part says find the mean of this distribution by evaluating lim t->0 M'X(t).

So I guess its asking to take the derivative of MGF of x is Mx(t) = (e^t(1-e^kt)/k(1-e^t) but I can't seem to get it to the mean of (K+1)/2

Sorry if this post is kind of confusing, its because I'm quite confused on how to do this problem. Can someone please lend a hand on that last part? Thanks!

2. Originally Posted by xuyuan
I've proven the first part, but I don't seem to know how to take the derivative of this function to find the mean of the distribution.

The question is If a random variable x has the discrete uniform distribution
f(x;k) = 1/k, x = 1,2,3,...k and 0 elsewhere, can it be shown that
the MGF of x is Mx(t) = (e^t(1-e^kt)/k(1-e^t) ? This part I've proven

We define Mx(t) = E(e^(xt)). Then for the uniform distribution given,
Mx(t) = ∑▒〖[e^(xt)(1/k)]〗
= (1/k)[e^t + e^(2t) + e^(3t) + ..... + e^(kt)]
= (1/k)e^t[1-e^(kt)]/(1-e^t)

The last part says find the mean of this distribution by evaluating lim t->0 M'X(t).

So I guess its asking to take the derivative of MGF of x is Mx(t) = (e^t(1-e^kt)/k(1-e^t) but I can't seem to get it to the mean of (K+1)/2

Sorry if this post is kind of confusing, its because I'm quite confused on how to do this problem. Can someone please lend a hand on that last part? Thanks!
$M = \frac{1}{k} \left( \frac{1 - e^{kt}}{e^{-t} - 1}\right)$. Differentiate this. Then take the limit t --> 0.

And if all you want to do is get the mean, it might even be easiest to first substitute the Maclaurin series for e^x and e^kx, simplify the result and then take the derivative and get the limit ....