# Thread: Statistics - PDF, E(U), Probability

1. ## Statistics - PDF, E(U), Probability

Gasoline is to be stocked in a bulk tank once at the beginning of
each week and then sold the individual customers. Let X denote the
proportion of the capacity of the bulk tank that is stocked at the
start of the week. Let Y denote the proportion of the capacity of
the bulk tank that is sold during the week. Because X and Y are both
proportions, both variables take on values between 0 and 1. Further,
the amount sold, Y, cannot exceed the amount available, X. Suppose
that a joint pdf model for X and Y is given by:

f(x,y) = 3x for 0 <= y <= x <= 1, 0 for elsewhere

Find the pdf for U = X - Y, the proportional amount of gasoline
remaining at the end of the week. Use the pdf of U to find the
expected value of U, E(U). Use the pdf of U to find the probability
that the proportional amount of gasoline remaining at the end of
the week, U, is between 0.25 and 0.5.

If anyone can help me get the problem started or guide me in the right direction, it would be greatly appreciated. I'm not sure how to start this problem.

2. ## Re: Statistics - PDF, E(U), Probability

$f_{XY}(x,y)=3x~~0 \leq y \leq x \leq 1$

$F_U(u) = Pr[U < u] = Pr[X-Y<u] = Pr[X-u<Y]$

$F_U(u)=\int_0^1 \int_{\max(x-u,0)}^x f_{XY}(x,y)~dy ~ dx = \int_0^1 \int_{\max(x-u,0)}^x 3x ~dy ~dx$ for $0 \leq u \leq 1$

$f_U(u)=\frac{\partial}{\partial u}F_U(u)$

this should get you started

3. ## Re: Statistics - PDF, E(U), Probability

Thank you so much for your help! That really helped a lot!!

I got f(u) = 3/2 for 0 ≦ u ≦ 1, 0 elsewhere.

Now using that information to get the E(u) is confusing to me and I'm lost once again.

4. ## Re: Statistics - PDF, E(U), Probability

Would E(u) just equal the integral from 0 to 1 of f(u)*u?

5. ## Re: Statistics - PDF, E(U), Probability

Originally Posted by AwesomeHedgehog
Thank you so much for your help! That really helped a lot!!

I got f(u) = 3/2 for 0 ≦ u ≦ 1, 0 elsewhere.

Now using that information to get the E(u) is confusing to me and I'm lost once again.
That's not correct. Check your integration and be careful using the max function as a integration limit.

and yes, once you have the proper $f_U(u)$ for $a \leq u \leq b$ then

$E(U) = \int_a^b u f_U(u) du$

6. ## Re: Statistics - PDF, E(U), Probability

Wait, for the p.d.f. wouldn't the integral be: The integral from 0 to 1, then the integral 0 to x-u?

Since f(x,y) is between 0 ≦ y ≦ x ≦ 1, the lower bound would be 0 on the integrals and the highest it goes up to would be y, which y = x-u

7. ## Re: Statistics - PDF, E(U), Probability

Originally Posted by AwesomeHedgehog
Wait, for the p.d.f. wouldn't the integral be: The integral from 0 to 1, then the integral 0 to x-u?

Since f(x,y) is between 0 ≦ y ≦ x ≦ 1, the lower bound would be 0 on the integrals and the highest it goes up to would be y, which y = x-u
$X-Y<u\Rightarrow Y>X-u$

$0\leq Y \leq 1$ so the lower limit of integration is $\max(x-u,0)$

8. ## Re: Statistics - PDF, E(U), Probability

I'm not quite understanding it with the whole max(x-u, 0). Like, how would I even calculate that in the integral?

9. ## Re: Statistics - PDF, E(U), Probability

Originally Posted by AwesomeHedgehog
I'm not quite understanding it with the whole max(x-u, 0). Like, how would I even calculate that in the integral?
Ok let's rework it slightly differently.

$X-Y<u$ and $0\leq Y \leq 1$ so for a given u

$X \leq u$ and as always $Y \leq X$

so this leads to a slightly different but equivalent integral of (see if you can work it yourself)

Spoiler:
$F_U(u)=Pr[U < u]=Pr[X-Y<u]=\displaystyle{\int_0^u \int_0^x} 3x ~dx=u^3, ~~ \mbox{for }0\leq u \leq 1$

$f_U(u)=\dfrac{\partial}{\partial u} F_U(u) = 3u^2, ~~ \mbox{for }0\leq u \leq 1$

given this you should be able to complete the problem.

10. ## Re: Statistics - PDF, E(U), Probability

Alright, then for E(u) I got:

E(u) = the integral from 0 to 1 (3u^2)*u du = 3/4

P[ 0.25 < u < 0.5 ] = the integral from 0.25 to 0.5 (3/4) du = 0.1875

11. ## Re: Statistics - PDF, E(U), Probability

Originally Posted by AwesomeHedgehog
Alright, then for E(u) I got:

E(u) = the integral from 0 to 1 (3u^2)*u du = 3/4
correct

P[ 0.25 < u < 0.5 ] = the integral from 0.25 to 0.5 (3/4) du = 0.1875
No.

to find the probability you integrate the pdf, not the expectation. The expectation is just a number.

you want $\displaystyle{\int_{\frac{1}{4}}^{\frac{1}{2}}} 3 u^2~du$

12. ## Re: Statistics - PDF, E(U), Probability

Oh, I had it right the first time I did it on my paper, then changed it. Thank you so much for your help!