Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I came across a piecewise function which seems pretty basic, but I don't know how to find the moment-generating function. If $X$ has the pdf $f_X(x)=x$ for $0\leq x\leq 1$, $2-x$ for $1\leq x \leq 2$ and $0$ elsewhere, how do we find $M_X(t)$?

share|improve this question
add comment

1 Answer

$f_X$ is defined piecewise, so you'll need to split the integral defining $M(t)$ up as follows $$\eqalign{M_X(t)&= \int_{-\infty}^\infty e^{tx} f_X(x)\,dx\cr &= \int_{-\infty}^0e^{tx} f_X(x)\,dx+\int_{0}^1 e^{tx} f_X(x)\,dx +\int_{1}^2 e^{tx} f_X(x)\,dx +\int_{2}^\infty e^{tx} f_X(x)\,dx\cr \cr &= 0+ \int_0^1 e^{tx} \cdot x\,dx+\int_1^2 e^{tx}\cdot(2-x) \,dx+0\cr &= \int_0^1x e^{tx} \,dx+\int_1^2 (2-x)e^{tx} \,dx. } $$

To evaluate the remaining intergrals, you may use integration by parts.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.