1. Probability Density Functions Variance

I know how to calculate the variance of a set of numbers but not of a probability density function. I'm guessing it requires some calculus (which I'm not too great with). Could someone give me a few hints to get through this one?

f(x) = ce^(2x), 0 < x < 1

Determine Var(x)

2. You only need to know how to take the integral of a probability distribution function to determine the variance. So:

$\displaystyle c\int_0^1x^2(e^{2x})dx-\mu_{x}^2$;

is the "computational" form of the variance of a pdf over a certain limit of integration; all you need to know really is your sample mean, and you are good to go with plugging and chugging.

I know how to calculate the variance of a set of numbers but not of a probability density function. I'm guessing it requires some calculus (which I'm not too great with). Could someone give me a few hints to get through this one?

f(x) = ce^(2x), 0 < x < 1

Determine Var(x)
$\displaystyle Var(X) = E(X^2) - [E(X)]^2$.

$\displaystyle E(X) = \int_0^1 x f(x) \, dx$ and $\displaystyle E(X^2) = \int_0^1 x^2 f(x) \, dx$.

(The above integrals can be done using integration by parts).

To get the value of c, you need to note that $\displaystyle \int_0^1 x f(x) \, dx = 1$.

If you're studying probability distribution functions (pdf's), then you better get your calculus up to speed otherwise you're in for a world of pain.

Edit: How to do the integrations is discussed here http://www.mathhelpforum.com/math-he...beyond-me.html

4. @ANDS!

Thanks. I'm going to try to figure it out from your equation. Will post my results here.

@Mr Fantastic

are you missing a 'c' from those equations? or is it just implied to be to the left of the integral sign?

5. ok, so this is what I ended up with:

$\displaystyle E(X) = c \left ( {e^2 + 1} \over 4 \right )$

and

$\displaystyle E(X^2) = c \left ( {e^2 - 1} \over 4 \right )$

is this right?

@Mr Fantastic:

So is what you were saying about finding the value of c that

$\displaystyle E(X) = c \left ( {e^2 + 1} \over 4 \right ) = 1$

That doesn't seem right. I think I misunderstood. Could you clarify?

I think I misunderstood. Could you clarify?
You should the value of c first.

Because $\displaystyle \int_0^1 {e^{2x} dx} = \frac{{e^2 - 1}}{2}$ and the total mass is 1 we get $\displaystyle c = \frac{2}{{e^2 - 1}}$

7. Sigh... I'm going to take a break from this question, because I'm just not getting it. I'll come back to it soon.

8. Ok, I know it seems like you're hand-holding me through the entire process but I really don't get it.

What is meant by the "total mass is 1" and how is c suddenly equal to the reciprocal of $\displaystyle \int_0^1 {e^{2x} dx} = \frac{{e^2 - 1}}{2}$

9. If $\displaystyle f(x)$ is probability distribution function then $\displaystyle \int_{ - \infty }^\infty {f(x)dx} = 1$.
In this problem, outside $\displaystyle [0,1]$ we have $\displaystyle f(x)=0$.

10. $\displaystyle Var(X) = E(X^2) - \left[ E(X) \right]^2$

Since:
$\displaystyle \int_0^1 ce^{2x} = 1$
$\displaystyle {c{e^{2} - 1} \over 2} = 1$
$\displaystyle c = {2 \over {e^2 - 1}}$

$\displaystyle E(X) = \int cxe^{2x}$
$\displaystyle = {{c} \over {2}}xe^{2x} - {{c} \over {2}} \int e^{2x}dx$
$\displaystyle = {{c} \over {2}} e^{2x}x - {{c} \over {4}} e^{2x} + C$
$\displaystyle = ce^{2x} \left( {x \over 2} - {1 \over 4} \right) + C$

$\displaystyle E(X^2) = \int cx^2e^{2x}$
$\displaystyle = {c \over 2} e^{2x}x^2 - c \int e^{2x}xdx$
$\displaystyle = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 2} int e^{2x} dx$
$\displaystyle = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 4} e^{2x} + C$
$\displaystyle = {ce^{2x} \over 4} \left( 2x^2 - 2x + 1 \right) + C$

Now we need to integrate from zero to one.
$\displaystyle E(X) = \int_0^1 cxe^{2x}$
$\displaystyle = c \left | e^{2x} \left( {x \over 2}-{1 \over 4} \right) \right | _0^1$
$\displaystyle = c \left[ e^2 \left( {1 \over 2} - {1 \over 4} \right) - e^0 \left( {0 \over 2} - {1 \over 4} \right) \right]$
$\displaystyle = c \left({{e^2 + 1} \over 4} \right)$

$\displaystyle E(X^2) = \int_0^1 cx^2e^{2x}$
$\displaystyle = c \left | {{e^{2x}} \over 4} ( 2x^2 - 2x + 1 ) \right |_0^1$
$\displaystyle = c \left [ {e^2 \over 4} (2 - 2 + 1) - {e^0 \over 4} \right ]$
$\displaystyle = c \left ( {{e^2 - 1} \over 4} \right )$

Plugging in we get:
$\displaystyle Var(X) = c \left ( {{e^2-1} \over 4} \right) - \left [ c \left ( {{e^2 + 1} \over 4} \right ) \right ]^2$
$\displaystyle = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^4 + 2e^2 + 1)} \over 16}$
$\displaystyle = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^2 + 1)^2} \over 16}$

Now plug in the value of c:
$\displaystyle = {2 \over e^2 - 1} \left( {e^2 - 1 \over 4} \right) - {\left( {2 \over e^2 - 1} \right)^2(e^2 + 1)^2 \over 16}$
$\displaystyle = {1 \over 4} - {e^2 + 1 \over 8}$
$\displaystyle = {1 - e^2 \over 8}$

Therefore:
$\displaystyle Var(X) = {1 - e^2 \over 8}$

Is any of this right?

NOTE: I had to translate from Open office's formula expressions to the latex ones used here. I don't think I made any error's but some of the equations may make no sense and then go back to what it would have been had it made sense. I hope that makes sense

@ANDS!

Thanks. I'm going to try to figure it out from your equation. Will post my results here.

@Mr Fantastic

are you missing a 'c' from those equations? or is it just implied to be to the left of the integral sign?
c is in the rule for f(x). It appears when you substitute the rule for f(x).

$\displaystyle Var(X) = E(X^2) - \left[ E(X) \right]^2$

Since:
$\displaystyle \int_0^1 ce^{2x} = 1$
$\displaystyle {c{e^{2} - 1} \over 2} = 1$
$\displaystyle c = {2 \over {e^2 - 1}}$

$\displaystyle E(X) = \int cxe^{2x}$
$\displaystyle = {{c} \over {2}}xe^{2x} - {{c} \over {2}} \int e^{2x}dx$
$\displaystyle = {{c} \over {2}} e^{2x}x - {{c} \over {4}} e^{2x} + C$
$\displaystyle = ce^{2x} \left( {x \over 2} - {1 \over 4} \right) + C$

$\displaystyle E(X^2) = \int cx^2e^{2x}$
$\displaystyle = {c \over 2} e^{2x}x^2 - c \int e^{2x}xdx$
$\displaystyle = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 2} int e^{2x} dx$
$\displaystyle = {c \over 2} e^{2x}x^2 - {c \over 2} e^{2x}x + {c \over 4} e^{2x} + C$
$\displaystyle = {ce^{2x} \over 4} \left( 2x^2 - 2x + 1 \right) + C$

Now we need to integrate from zero to one.
$\displaystyle E(X) = \int_0^1 cxe^{2x}$
$\displaystyle = c \left | e^{2x} \left( {x \over 2}-{1 \over 4} \right) \right | _0^1$
$\displaystyle = c \left[ e^2 \left( {1 \over 2} - {1 \over 4} \right) - e^0 \left( {0 \over 2} - {1 \over 4} \right) \right]$
$\displaystyle = c \left({{e^2 + 1} \over 4} \right)$

$\displaystyle E(X^2) = \int_0^1 cx^2e^{2x}$
$\displaystyle = c \left | {{e^{2x}} \over 4} ( 2x^2 - 2x + 1 ) \right |_0^1$
$\displaystyle = c \left [ {e^2 \over 4} (2 - 2 + 1) - {e^0 \over 4} \right ]$
$\displaystyle = c \left ( {{e^2 - 1} \over 4} \right )$

Plugging in we get:
$\displaystyle Var(X) = c \left ( {{e^2-1} \over 4} \right) - \left [ c \left ( {{e^2 + 1} \over 4} \right ) \right ]^2$
$\displaystyle = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^4 + 2e^2 + 1)} \over 16}$
$\displaystyle = c \left({{e^2 - 1} \over 4} \right) - {{c^2(e^2 + 1)^2} \over 16}$

Now plug in the value of c:
$\displaystyle = {2 \over e^2 - 1} \left( {e^2 - 1 \over 4} \right) - {\left( {2 \over e^2 - 1} \right)^2(e^2 + 1)^2 \over 16}$
$\displaystyle = {1 \over 4} - {e^2 + 1 \over 8}$
$\displaystyle = {1 - e^2 \over 8}$

Therefore:
$\displaystyle Var(X) = {1 - e^2 \over 8}$

Is any of this right?

NOTE: I had to translate from Open office's formula expressions to the latex ones used here. I don't think I made any error's but some of the equations may make no sense and then go back to what it would have been had it made sense. I hope that makes sense
Sorry, but I don't check details. Here's how you can check:

The definite intergrals (omit the value of c) can be checked using WolframAlpha in the way that Plato has already shown. Then multiply the result by the value of c (which is just arithmetic, no calculus).

12. Originally Posted by mr fantastic
c is in the rule for f(x). It appears when you substitute the rule for f(x).

Sorry, but I don't check details. Here's how you can check:

The definite intergrals (omit the value of c) can be checked using WolframAlpha in the way that Plato has already shown. Then multiply the result by the value of c (which is just arithmetic, no calculus).
Alright, not entirely sure if it's right, but I'm just going to go with it. Thanks for all your help.