Expected value/variance of continuous random functions?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
11 replies · 4K views
das1
Messages
40
Reaction score
0
For the following probability density function:

f(x) = [(x^2)/9] between 0 <= x <= 3
0 otherwise

calculate the expected value E(X) of this distribution, and also calculate the variance

I know I have to integrate the function but I don't know what else. Thanks!
 
Physics news on Phys.org
Note that if a distribution has a probability density function $f(x)$, the expected value is computed by:
\[
E[X] = \int_\mathbb{R} x f(x) dx.
\]
You are given $f(x)$ on the interval $[0,3]$. You can work out the actual integral.
 
I started writing this as magneto posted. I hope it doesn't trample on his post, but it's basically the same information, just worded less rigorously perhaps. :)

For a continuous distribution function: $$E[X]=\int_{-\infty}^{\infty}xf(x)dx$$. Here we don't need to go all the way from negative infinity to infinity though in practice to calculate this integral. What should this integral be you think?

The variance can conveniently be rewritten as $$\text{Var}[X]=E[X^2]-(E[X]])^2$$. You will calculate $E[X]$ in the first part, so squaring that is easy. Now you have one more thing to find. Any idea how to find $E[X^2]$?
 
So I can integrate that as x^3/27
Substitute in 3 for x and get 27/27 = 1.
That much I understand, but what next? I subtract something right? I don't know what though
 
Try again. You're close but you forgot an $x$.

$$\int_{0}^{3}x \cdot \frac{x^2}{9}dx$$

Ok, I can explain to you what you do in this problem in one second but you writing "subtracting something" makes me worry that you don't understand the idea behind calculating the variance. What is the formula you have seen to calculate this? :) We want you to fully understand everything so you can ace your courses.
 
The formula I've found is:

integrate x^2 f(x) dx - u^2
 
das said:
The formula I've found is:

integrate x^2 f(x) dx - u^2

Yep, that's exactly it!

You are calcualting $\mu$ in the first part, so just square whatever answer you get. Now you just need to find $$\int_{0}^{3}x^2f(x)dx$$ and you can find the variance too.
 
For u I got 9/2, and squaring that, I get 81/4

So x2 * f(x) is x4/9 right?
Integrating that is x5/45
Substitute in 3, and you get 243/45 - 81/4?
But this is a negative number. What am I doing wrong?
 
das said:
For u I got 9/2, and squaring that, I get 81/4

So x2 * f(x) is x4/9 right?
Integrating that is x5/45
Substitute in 3, and you get 243/45 - 81/4?
But this is a negative number. What am I doing wrong?
$$\int_{0}^{3}x \cdot \frac{x^2}{9}dx=\frac{3^4}{36}=\frac{9}{4}$$

Here's what I get when I plug it into Wolfram, but double check my input.
 
Right, my calculation was wrong there.
So instead of 81/4 it's 81/16?
243/45 - 81/16 is .3375.
Is this the variance?
 
OK! thank you

- - - Updated - - -

There's one other related one I don't get how to do, I'll start a new thread though.