# Moment Generating Function Given pdf

1. Nov 30, 2012

### Aaron10

1. The problem statement, all variables and given/known data
X is distributed exponentially with λa=2. Y is distributed exponentially with λb = 3. X and Y are independent.
Let W=max(X,Y), the time until both persons catch their first fish. Let k be a positive integer. Find E(W^k).

Also, find P{(1/3)<X/(X+Y)<(1/2)}

2. Relevant equations
f(X) = λa e^(-λa x)
f(Y) = λb e^(-λb y)
f(X,Y) = f(X)f(Y)
Mx(t) = E(e^t)
Mx^k(0)=E(W^k)

3. The attempt at a solution
I found f(w)=3e^(-3w)+2e^(-2w)-5e^(-2w-3w) but not sure where to go from here

2. Nov 30, 2012

### haruspex

Having found the pdf of W, how do you calculate its moment generating function?
(You quote that it's E[et], but it's E[etW].)

3. Nov 30, 2012

### Aaron10

That's correct, sorry, typo on my part. It's actually where to go from there that confuses me. I know the ∫0 to ∞((e^tw)f(w)dw gives me Mw(t), so I think ∫0 to ∞ ((w^k)f(w))dw should give me E(W^k), but I don't know how to actually find this or if it is the best way to approach it.

Also, I got the second probability part on my own. I really just need help with the E(W^k).

4. Nov 30, 2012

### Aria1

I have f(w) = 3e^(-3w)+2e^(-2w)-5e^(-5w), w>0 for the pdf, but I am not sure how to proceed to E(W^k) from here.

5. Nov 30, 2012

### Ray Vickson

In other words,
$$f(w) = 2e^{-2w} + 3 e^{-3w} - 5e^{-5w} = f_2(w) +f_3(w) - f_5(w),$$ where f_r(w) is the exponential density for rate r. Do you know how to compute
$$E_r(W^k) \equiv \int_0^{\infty} r e^{-rw} w^k \, dw ?$$

6. Nov 30, 2012

### Aria1

My solution: E(X^k) for an exponential is k!/(λ^k), so E(W^k) = k!/(3^k)+k!/(2^k)-k!/(5^k) = k!(10^k + 15^k - 6^k)/(30^k). Say λ=r, and this is exactly what you are saying, yes?

7. Nov 30, 2012

### Aria1

If not, then I am not sure how to compute an integral involving (w^k)e^(-rw)...

8. Nov 30, 2012

### Ray Vickson

Just to be accurate: No, you are saying it, not me. However, your result is correct.