# Uniform

• Oct 10th 2008, 02:21 PM
brd_7
Uniform
Let X have the uniform distribution (0,2) and let the conditional distribution of Y given X=x be uniform on (0,x^2).

a) Find the condition expectation and variance of Y given X=x. USe these to find the marginal expectation and variance of Y...

Many thanks
• Oct 10th 2008, 03:26 PM
mr fantastic
Quote:

Originally Posted by brd_7
Let X have the uniform distribution (0,2) and let the conditional distribution of Y given X=x be uniform on (0,x^2).

a) Find the condition expectation and variance of Y given X=x. USe these to find the marginal expectation and variance of Y...

Many thanks

The pdf of X is $\displaystyle f_X(x) = \frac{1}{2}$ for $\displaystyle 0 \leq x \leq 2$ and zero elsewhere.

The conditional distribution of Y given X = x is $\displaystyle f_Y(y | x) = \frac{1}{x^2}$ for $\displaystyle 0 \leq y \leq x^2$ and zero elsewhere.

Now apply the standard definitions and do the necessary calculations:

$\displaystyle E(Y | X = x) = \int_0^{x^2} y \, f_Y(y | x) \, dy$.

$\displaystyle E(Y^2 | X = x) = \int_0^{x^2} y^2 \, f_Y(y | x) \, dy$.

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

$\displaystyle E(Y) = E[E(Y | X = x)] = \int_{-\infty}^{+\infty} E(Y | X = x) \, f_X(x) \, dx = \int_0^2 E(Y | X = x) \, \frac{1}{2} \, dx$.

To get Var(Y), read this: Law of total variance - Wikipedia, the free encyclopedia and do the necessary computation.
• Oct 11th 2008, 03:00 AM
brd_7
Ive got it all upto the Variance of Y.. Ive got an example thats with numbers, but i cant seem to figure out what to do, and its especially confusing because of it being a uniform distribution.. Any ideas?

And i just need to do the Var(Y) now..
• Oct 11th 2008, 01:19 PM
mr fantastic
Quote:

Originally Posted by brd_7
Ive got it all upto the Variance of Y.. Ive got an example thats with numbers, but i cant seem to figure out what to do, and its especially confusing because of it being a uniform distribution.. Any ideas?

And i just need to do the Var(Y) now..

To save the wheel getting re-invented, if you give all your answers (with working would be ideal) it will be easier to show how to get the variance.
• Oct 11th 2008, 02:42 PM
brd_7
Sorry, i did write down the answers, but realised they were wrong, made a careless mistake. Anyway.. I got the following..

x^2/2

x^4/3

x^4/12

1/3

With just Var(Y) to work out..

Many Thanks
• Oct 11th 2008, 06:51 PM
mr fantastic
Quote:

Originally Posted by brd_7
Sorry, i did write down the answers, but realised they were wrong, made a careless mistake. Anyway.. I got the following..

x^2/2

x^4/3

x^4/12

1/3

With just Var(Y) to work out..

Many Thanks

So you need to calculate $\displaystyle E[Var(Y | X)] = E\left[\frac{X^4}{12}\right]$ and $\displaystyle Var[E(Y | X)] = Var\left[ \frac{X^2}{2}\right]$.

$\displaystyle E\left[\frac{X^4}{12}\right] = \int_0^2 \left( \frac{x^4}{12}\right) \left(\frac{1}{2} \right) \, dx$.

$\displaystyle Var\left[ \frac{X^2}{2}\right]$:

You need the pdf of $\displaystyle U = \frac{X^2}{2}$. This can be got by calculating G(u), the cdf of U. Then $\displaystyle g(u) = \frac{dG}{du}$, where g(u) is the pdf of U.

Then $\displaystyle Var \left[ \frac{X^2}{2}\right] = Var (U) = E(U^2) - [E(U)]^2$.

$\displaystyle G(u) = \Pr(U < u) = \Pr\left( \frac{X^2}{2} < u\right) = \Pr( -\sqrt{2u} < X < \sqrt{2u}) = \Pr(0 < X < \sqrt{2u})$ since $\displaystyle 0 \leq x \leq 2$

$\displaystyle = \int_0^{\sqrt{2u}} \frac{1}{2} \, dx = \, ....$ for $\displaystyle 0 \leq u \leq 2$.

Therefore $\displaystyle g(u) = \frac{dG}{du} = \, .....$ for $\displaystyle 0 \leq u \leq 2$ and zero elsewhere.