# Thread: mean of continuous random variable

1. ## mean of continuous random variable

This is really a calculus question, but is part of a probability problem. Apologies if I've posted in the wrong place.

I'm given a cumulative distribution function $F(x)=1-(x+1)^{-2}, x>0$ and 0 elsewhere. I use this to find the probability density function and then evaluate $P\{1, and I'm okay through all this.

When I go to calculate the mean, $E[X]=\int_{-\infty}^{\infty}xp(x)\,dx=\int_{0}^{\infty}xp(x)\, dx$, I get a $ln(0)$ in the final step of the evaluation. Where'd I go wrong?

2. Originally Posted by cribby
This is really a calculus question, but is part of a probability problem. Apologies if I've posted in the wrong place.

I'm given a cumulative distribution function $F(x)=1-(x+1)^{-2}, x>0$ and 0 elsewhere. I use this to find the probability density function and then evaluate $P\{1, and I'm okay through all this.

When I go to calculate the mean, $E[X]=\int_{-\infty}^{\infty}xp(x)\,dx=\int_{0}^{\infty}xp(x)\, dx$, I get a $ln(0)$ in the final step of the evaluation. Where'd I go wrong?
Since you haven't shown your working it's impossible to know where you went wrong. You might have the wrong expression for the pdf. Or you might have the correct expression but not integrated correctly. The list goes on.

For what it's worth:

1. The pdf is $f(x) = \frac{2}{(x+1)^3}$ ....

2. Pr(1 < X < 3) can be found without the pdf. It's F(3) - F(1) .....

3. Apologies for not showing my work, but I was being intentionally vague. All I really wanted to know was whether the $ln(0)$ showing up in my evaluation of the mean was reasonable. If it was, I didn't know how to handle that. Apparently, though, I did not correctly calculate the pdf.

I would greatly appreciate a confirmation or denial of the following: With the new pdf I get a mean of 0.

And thanks for the tip on finding the probability using F. I've missed a few days of my classes lately and hadn't come across that in the text yet.

4. $E(X) = \int\frac{2x}{(x+1)^3}dx = \frac{-2x-1}{(x+1)^2}$

Evaluate at the bounds, you find the mean is -1.

5. Oops...when I did the integration I was fine, but when I evaluated I only carried "2x" through the numerator...what a goon.