# Thread: Continuous random variables - corrected

1. ## Continuous random variables - corrected

[the data is modified so that it keeps the main principle of the problem I'm working on but it's not identical]

I have a $k$ number of boxes manufactured and the length of each side of the box is determined by a random var with a density function
$f(x) = 5x^{4},$ for $0 \leq x \leq 1$.

$\textbf{While about the independence of the side lengths, in the problem says nothing; I assumed they are independent since we are given a pdf for the side length.}$

I need to find the mean of the volume of a box.

So, consider the box is a cube and its volume is another random variable, define it $g(x) = V = x^3$

I know that I can find the cumulative distribution function of $g(x)$ by letting $Y = g(x)$, then
$F_y(y) = P(g(x) \leq y) = p(x \in g^{-1}(-\infty, y] )$, so I assume that the next step is
$= \int_{-infty}^{y} x^{1/3}dx = ...$, but it's kind of weird since the improper integral I get will not converge...

Then the p.d.f is the derivative of c.d.f, but I am a bit confused about how in general I should deal with random values like this, when once comes from the other.

2. ## Re: Continuous random variables - corrected

are the boxes cubes or rectangular prisms, with 3 independent side lengths?

If the latter the problem is a bit complicated.

3. ## Re: Continuous random variables - corrected

let's consider them as cubes, that's why I defiend the random value for volume being $X^{3}$

4. ## Re: Continuous random variables - corrected

Originally Posted by dokrbb
let's consider them as cubes, that's why I defiend the random value for volume being $X^{3}$
ok

The simple way to do this is just

$E[V] = E[X^3] = \displaystyle{\int_0^1}~x^3 (5x^4)~dx = \dfrac 5 8$

As a check on this we can go through the more involved route of finding the actual PDF of $V$ and finding the expected value directly from that.

$F_V(v) = P[V<v] = P[X^3 < v] = P[X < \sqrt[3]{v}] = F_X(\sqrt[3]{v})$

$F_X(x) = \int~f_X(x)~dx = x^5,~x\in [0,1]$

$F_V(v) = F_X(\sqrt[3]{v}) = v^{5/3},~v \in [0,1]$

$f_V(v) = \dfrac{d}{dv} F_V(v) = \dfrac 5 3 v^{2/3},~v \in [0,1]$

almost there

$E[V] = \displaystyle{\int_0^1}~v f_V(v)~dv = \displaystyle{\int_0^1}~v \dfrac 5 3 v^{2/3}~dv = \displaystyle{\int_0^1}~\dfrac 5 3 v^{5/3}~dv = \dfrac 5 8$

5. ## Re: Continuous random variables - corrected

OH, the solution is awesome, Thank you very much!

6. ## Re: Continuous random variables - corrected

Romsek's first easy solution is certainly correct. It appears that you are'nt aware of the general fact: Given any r.v. X with density f(x) (continuous or discrete), and any function g from R to R, the following is true:
$$E(g(X))=\int_{-\infty}^{\infty}g(x)f(x)\,dx$$
If X is discrete, the above integral is just a sum, maybe an infinite sum.