Find the moment generating function, mean, and variance of the piecewise function

706 Views Asked by At

Find the moment generating function, mean, and variance.

$$F(x) = \begin{cases} {1 \over \phi} e^{-x/\phi}, & 0 \le x < \infty \\ 0, & x < 0\end{cases} $$

I'm just a little confused how to approach this since it looks like a piecewise function. Do I just find the mgf for one than the other and then add the two?

2

There are 2 best solutions below

4
On

Just use the definition. The integrand of your expectation integral will have limits corresponding to your pdf being zero.

0
On

$\phi$ is just a positive constant, so $$ F(x)=\int_{-\infty}^x f(t)\mathrm dt=\begin{cases} 1-\mathrm e^{-x/\phi} & x\ge 0,\phi>0\\ 0 & x<0 \end{cases} $$ observing that $\int_{-\infty}^x f(t)\mathrm dt=\int_{0}^x \frac{1}{\phi}\mathrm e^{-x/\phi}\mathrm dt=\frac{1}{\phi}\int_{0}^x \mathrm e^{-x/\phi}\mathrm dt=\frac{1}{\phi}\left[\frac{\mathrm e^{-x/\phi}}{-1/\phi}\right]_0^x=1-\mathrm e^{-x/\phi} $ The moment generating function is $$M_X(t)=\Bbb{E}(\mathrm{e}^{tX})=\int_{-\infty}^{\infty}\mathrm{e}^{tX}f(x)\mathrm dx=\int_{0}^{\infty}\mathrm e^{tX}\frac{1}{\phi}\mathrm e^{-x/\phi}\mathrm dx =\frac{1}{\phi} \int_{0}^{\infty}\mathrm e^{(t-1/\phi)x}\mathrm dx =\frac{1}{\phi} \frac{1}{t-\frac{1}{\phi}}\left[ e^{(t-1/\phi)x}\right]_0^{\infty} =\frac{\frac{1}{\phi}}{t-\frac{1}{\phi}}=\frac{1}{t\phi-1}\quad\text{for }t<\frac{1}{\phi}$$

So you can easily find $$ \Bbb{E}(X)=M'(0)=\phi, \;\Bbb{E}(X^2)=M''(0)=2\phi^2\qquad \mathrm{Var}(X)=\Bbb{E}(X^2)-[\Bbb{E}(X)]^2=\phi^2 $$