Finding a moment generating function for a continuous random variable defined by its pdf.

564 Views Asked by At

The pdf of a continuous random variable $X$ is defined by

$$f(x)=\begin{cases} \frac1{10} (5-2x)&,\text{ if } x \in [0,2) \\ \frac1{10}(x-1)&,\text{ if } x \in [2,4] \\ 0 &,\text{ otherwise } \end{cases} $$

Find the moment generating function (mgf) $M_X(t)$ of $X$.

I know that $M_X(t)$ is found through the improper integral $\int_{-\infty}^\infty e^{tx}f_X(x)\,dx$, but I do not know how to fill $f_X(x)$ in this integral.

Thank you for your help.

1

There are 1 best solutions below

2
On

$$\int_{-\infty}^{+\infty}e^{tx}f(x)dx = \int_{-\infty}^{o}e^{tx}f(x)dx + \int_{0}^{2}e^{tx}f(x)dx + \int_{2}^{4}e^{tx}f(x)dx + \int_{4}^{+\infty}e^{tx}f(x)dx = $$

$$\int_{0}^{2}e^{tx}f(x)dx + \int_{2}^{4}e^{tx}f(x)dx = \int_0^2 e^{tx}\frac{1}{10}(5-2x)dx + \int_2^4 e^{tx}\frac{1}{10}(x-1)dx = $$

$$\frac{1}{10}\left(\int_0^2 e^{tx}(5-2x)dx + \int_2^4 e^{tx}(x-1)dx\right) = \frac{1}{10}\left(\int_0^2 \frac{1}{t}(5-2x)de^{tx} + \int_2^4 \frac{1}{t}(x-1)de^{tx}\right) = $$

$$\frac{1}{10t}\left(\int_0^2 (5-2x)de^{tx} + \int_2^4 (x-1)de^{tx}\right) = \frac{1}{10t}(5-2x)e^{tx}|_0^2 + \frac{1}{10t}(x-1)e^{tx}|_2^4 - \frac{1}{10t}\left(\int_0^2 e^{tx}d(5-2x) + \int_2^4 e^{tx}d(x-1)\right) = $$

$$ \frac{1}{10t}(5-2x)e^{tx}|_0^2 + \frac{1}{10t}(x-1)e^{tx}|_2^4 - \frac{1}{10t}\left(\int_0^2 -2e^{tx}dx + \int_2^4 e^{tx}dx\right)$$

Can you cantinue from here?