<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}
\begin{document}

QUESTION
  Find the mgf for a random variable which is uniform on the
  interval $a&lt;x&lt;b$. Use the mgf to find the mean and variance of
  the distribution.


ANSWER
 $f(x)=\frac{1}{b-a}\ a&lt;x&lt;b$\\
  \begin{eqnarray*}
   M(t)&amp;=&amp;\int_a^b\frac{e^{xt}}{b-a}\,dx\\
   &amp;=&amp;\frac{1}{t}[\frac{e^{xt}}{b-a}]_a^b\\
   &amp;=&amp;\frac{e^{bt}-e^{at}}{t(b-a)}\\
   &amp;=&amp;\frac{1}{t(b-a)}[(1+bt+\frac{(bt^2)}{2!}+\frac{(bt)^3}{3!}+\ldots
   )-(1+at+\frac{(at)^2}{2!}+{(at)^3}{3!}\\
   &amp;=&amp;\frac{1}{t(b-a)}[(b-a)t+\frac{t^2}{2!}(b^2-a^2)+\frac{t^3}{3!}(b^3-a^3)+\ldots]\\
   &amp;=&amp;1+\frac{t(b+a)}{2}+\frac{t^2}{3!}(b^2+ab+a^2)+\ldots
  \end{eqnarray*}
  $\mu$= the coefficient of t =$\frac{b+a}{2}\ \ E(X^2)=2!\times$
  the coefficient of t62=$\frac{b^2+ab+a^2}{3}\\
  \sigma^2=\frac{b^2+ab+a^2}{3}-\frac{(b+a)^2}{4}=\frac{(b-a)^2)}{12}$
  Note that differentiation doesn't work well here because of
  difficulties at t=0.

\end{document}
</pre></body></html>