Moment-Generating Function and Expected Value

69 Views Asked by At

A continuous random variable X has the probability density function f(x). where $$ f(x)=\left\{\begin{matrix} &\frac{1}{\beta -\alpha } \:\:\:\: for \:\:\alpha < x< \beta \\ & 0 \:\:\:\:\:\:\:\:\:\:\:\:\:\:\: elsewhere \end{matrix}\right. $$ Find the expected value of X. Here is my try, but for some reason, I got zero devision at the end. $$ M_{X}(t)=E(e^{tX})=\int_{-\infty }^{\infty}e^{tx}*f(x)\:dx = \frac{e^{\beta t}-e^{\alpha t}}{t(\beta -\alpha )} $$ To find E(X), I took the first order derivative on the previous output $$ \frac{d}{dt}(\frac{e^{\beta t}-e^{\alpha t}}{t(\beta -\alpha )}) = \frac{\alpha e^{t\alpha }-\beta e^{t\beta }}{t(\alpha -\beta )}-\frac{e^{t\alpha }- e^{t\beta }}{t^{2}(\alpha -\beta )}\left.\begin{matrix} & \\ & \end{matrix}\right|_{t=0} = \mathbf{division\: by \:zero} $$ Could someone point out to me where I got it wrong? Many thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

It seems fine so far. Next you can apply L'Hospital's Rule to find the value at $t=0$.

$$\frac{\alpha e^{t\alpha }-\beta e^{t\beta }}{t(\alpha-\beta )}-\frac{e^{t\alpha }- e^{t\beta }}{t^{2}(\alpha-\beta )}=\frac{e^{t\alpha }\cdot (1-\alpha x)+ e^{t\beta }\cdot (\beta x-1)}{t^{2}(\beta-\alpha )}$$

Derivative of the numerator and denominator gives

$$\frac{\alpha\cdot e^{t\alpha }\cdot (1-\alpha t)-e^{t\alpha }\cdot \alpha+ \beta\cdot e^{t\beta }\cdot (\beta t-1)+e^{t\beta }\cdot \beta }{2\cdot t(\beta-\alpha )}$$

$$=\frac{\beta^2\cdot t\cdot e^{t\beta }-\alpha^2\cdot t\cdot e^{t\alpha }}{2\cdot t( \beta-\alpha )}$$

We can cancel $t$.

$$=\frac{\beta^2\cdot e^{t\beta }-\alpha^2\cdot e^{t\alpha }}{2\cdot ( \beta-\alpha )}$$

Next we take the limit at $t=0$

$$\lim_{t\to 0} \frac{\beta^2\cdot e^{t\beta }-\alpha^2\cdot e^{t\alpha }}{2\cdot (\beta-\alpha )}=\frac{\beta^2-\alpha^2}{2\cdot (\beta-\alpha )}$$

Finally see, that the third binomial formula can be applied.