# Homework Help: Expected value of Rayleigh

1. Dec 10, 2009

### alman9898

1. The problem statement, all variables and given/known data
A density function used is:

$$f(y) = \frac{2y}{\theta}e^{\frac{-y^{2}}{\theta}} y > 0$$

using method of transformations find:

(a) pdf of U = Y^2
(b) E(Y) and V(Y)

2. Relevant equations
f(u) = f(h^-1(u))*|dh^-1/du|
h^-1(u) = sqrt(u)

3. The attempt at a solution

The pdf Y^2 ~ exp(theta)

E(Y) = E(U^1/2).

That is:

$$\int\frac{1}{\theta}u^{1/2}e^{\frac{-u}{\theta}}$$

So, multiply by sqrt(theta)/sqrt(theta) and group terms...

$$\frac{\sqrt{\theta}}{\theta}\int\sqrt{\frac{u}{\theta}}e^{\frac{-u}{\theta}}$$

The integral is the Gamma function with parameter 3/2. So I get...

sqrt(PI/THETA)/2 as the answer....but a little internets research reveals the expected value *should* be sqrt(PI * THETA)/2. I can't find out where my math went wrong, it's something stupid but I've been stuck for a whole day...

2. Dec 10, 2009

### LCKurtz

Try changing the variable from u to s by letting $s = u/\theta,\ du = \theta ds$:

$$\int_0^\infty\frac 1 \theta e^{-\frac u \theta}\, du= \int_0^\infty\frac 1 \theta(\theta s)^{\frac 1 2}e^{-s}\theta\, ds = \int_0^\infty\sqrt{\theta}s^{\frac 1 2}e^{-s}\,ds = \sqrt\theta\ \Gamma(\frac 3 2)$$

3. Dec 10, 2009

### alman9898

That helps alot, but if it wasn't for checking my work I would've been surely wrong. Any idea why my method didn't work; it's a trick my professor uses to solve problems with 'known' solutions.

4. Dec 10, 2009

### Dick

It's because the gamma function is the integral of sqrt(v)*exp(-v)*dv. Or the integral of sqrt(u/theta)*exp(-u/theta)*d(u/theta). Not the integral of sqrt(u/theta)*exp(-u/theta)*du. The last one is what you were putting to be gamma(3/2). That's not right. You are off by a factor of theta because you didn't change the integration variable. Probably happened because you were omitting the d(something) after your integrals.

Last edited: Dec 10, 2009
5. Dec 10, 2009

### alman9898

Ok I understand it now. That clears up a lot, and explains the missing term I needed to make things all nice. (I would have another theta term in the numerator to cancel the one out in the denominator).