# How can I find the probability of a continous random variable given its mgf?

The following question is from my book:

If the mgf of $X$ is

$M(t) = \dfrac {e^{5t} - e^{4t}}{t}, t \not = 0$, and $M(0)=1$,

find (a) $E(X)$, (b) Var$(X)$, and (c) $P(4.2 < X \le 4.7)$

I that to find the mean and the variance I just compute $M'(0)$ and $M''(0)-[M'(0)]^2$. But I'm not sure how to do part c. Am I supposed to guess the PDF $f(x)$, knowing that $\displaystyle \dfrac {e^{5t} - e^{4t}}{t} = \int_{-\infty}^{\infty} e^{tx} f(x)dx?$

• can you add the self-study tag? – kjetil b halvorsen Jun 8 '17 at 13:52
• This should not be a guess. The question should provide enough information to derive the pdf. from the properties given for the mgf. – Michael R. Chernick Jun 8 '17 at 14:00
• Here is a hint: the probability you are looking for is equal to 0.5. Can you tell why? – JohnK Jun 8 '17 at 14:02
• @JohnK Well I see that $4.7-4.2=.5$, and $5-4 = 1$, and $\dfrac {.5}{1} = .5$ So I'm guessing this is the mgf of a uniform distribution over the interval $(4, 5)$? – Ovi Jun 8 '17 at 14:07
• You can verify this. – JohnK Jun 8 '17 at 14:14

From wikipedia on the Uniform distribution: The moment-generating function is: $$M_{x}=E(e^{tx})={\frac {e^{tb}-e^{ta}}{t(b-a)}}\,\!}$$ In your case, b = 5 and a = 4. So the distribtuion is a uniform distribution from 4 to 5.
• This is a self-study question, hence providing the entire solution does not help in understanding the principle behind the question. – Xi'an Jun 16 '17 at 8:51