Moment Generating Function

1. Apr 14, 2009

cse63146

1. The problem statement, all variables and given/known data

Let f(x) = 2x 0<x<1

a) Determing the Moment Generating function M(t) of X
b) Use the MGT to determine all moments about the origin
c) Give the 3rd central moment called the skewness

2. Relevant equations

3. The attempt at a solution

a) $$\int^1_0 e^{tx}2x dx = \frac{2xe^{tx}}{t} - \int^1_0 e^{tx}2 dx = \frac{2}{t}(xe^{tx} - e^t + 1)$$

b)

$$E\left(X^n\right)=M^{(n)}(0)=\left.\frac{\mathrm {d}^n M_(t)}{\mathrm{d}t^n}\right|_{t=0}$$

$$E\left(X^n\right)=M^{(n)}(0)=\left.\frac{\mathrm {d}^n \frac{2}{t}(xe^{tx} - e^t + 1)}{\mathrm{d}t^n}\right|_{t=0}$$

Is that what I'm supposed to do for part b)?

Last edited: Apr 14, 2009
2. Apr 14, 2009

Billy Bob

(a) can't be right because the x should have been integrated out. It's easy to correct what you did wrong.

(b) is the correct method, OR it might be easier to express the answer to (a) as a known power series, depending on what it really turns out to be.

3. Apr 15, 2009

cse63146

Sorry, I'm not sure what you meant by " x should have been integrated out". Does that mean that I did the integral wrong?

4. Apr 15, 2009

Billy Bob

I meant $$\int_a^b F(x,t)\,dx$$ depends on t only, not x. Your (a) has an x in it so there is an (easy to fix) error.

5. Apr 15, 2009

cse63146

Is the 'x' you're referring to - $$\frac{2xe^{tx}}{t}$$. If so, I'm not sure how to get rid of it.

Sorry if I'm being difficult

Last edited: Apr 15, 2009
6. Apr 16, 2009

Billy Bob

You're not being difficult.

For integration by parts, you tried

$$\int_a^b u\,dv=uv-\int_a^b v\,du$$

but the correct formula

$$\int_a^b u\,dv=uv\bigr|_a^b-\int_a^b v\,du$$

7. Apr 16, 2009

cse63146

In $$uv|^1_0,$$ the $$|^1_0$$ applies to both u and v, or just v?

8. Apr 16, 2009

Billy Bob

Both u and v

9. Apr 17, 2009

cse63146

Once I use $$uv|^1_0$$, I get this:

$$\frac{2e^t}{t} - \frac{2}{t}(e^t -1) = \frac{2}{t}$$.

So when I apply I take the nth derivative I get:

$$- \frac{2}{nt^n}$$

but I can't evaluate it at 0 since the denominator = 0. Did I make a mistake somewhere?

10. Apr 17, 2009

Billy Bob

Double check your integration to see if it should be $$\frac{2e^t}{t} - \frac{2}{t^2}(e^t -1)=\frac{2te^t-2e^t+2}{t^2}$$

This is made continuous at t=0, which you can verify by l'Hopital or by substituting the Maclaurin series for e^t. In fact, I think it might be easier to use Maclaurin series for e^t to find the moments as well, but I admit I didn't try differentiating.

11. Apr 19, 2009

cse63146

Can I leave it like this (cause I don't know how the to find the nth derivative of a quotient)

$$\frac{d^n \frac{2te^t-2e^t+2}{t^2}}{dt}$$

12. Apr 19, 2009

Billy Bob

I would prefer to substitute the power series for e^t, simplify, then get the derivatives at 0 from that, to see if there is a pattern to the nth moment.