Calculating the mean of a continuous random variable $X$ given that it is conditioned on y.

46 Views Asked by At

First off, this is revision and so I have the solution. There is a step that isn't obviously clear to me.

Suppose that:

$Y$ ~ Uniform$(0,6)$ and $X|Y=y$ ~ Exp$(1/3y)$ for $x \geq 0$.

I want to work out the mean of X. I need to therefore work out the marginal distribution of $X$, which is $f_X(x)$, and then integrate this multiplied by $x$ over the range of $x$ values. ie:

$E[X] = \int_{0}^{\infty} x f_X(x)\ dx$

My attempt so far:

$f_Y(y) = \frac{1}{6}$ by definition of pdf of a uniform distribution. $\\$

$f_{X|Y}(x|y) = \frac{1}{3y}e^{-\frac{x}{3y}}$ by definition of pdf of a exponential distribution. $\\$

$f_{XY}(x,y) = f_{X|Y}(x|y) \cdot f_Y(y) \Rightarrow E[X] = \int_{0}^{6}\frac{1}{6}dy \cdot \int_{0}^{\infty}\frac{xe^{-\frac{x}{3y}}}{3y}dx$

This double integral is from the fact that $\int_{0}^{6}f_{XY}(x,y)dy=f_{X}(x)$

I am stuck here, I can't successfully move the $x$ and $y$ variables so that they fall into their respective integral. The end result is $9$, after somehow realising that the integral simplifies to $\int_{0}^{6} \frac{y}{2}dy$.

Thanks in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

Hints:

  • calculate $\mathbb E [ X\mid Y=y]$ first, then $\mathbb E[\mathbb E [ X\mid Y=y]]$

  • $\int\limits_{0}^{\infty}\frac{xe^{-\frac{x}{3y}}}{3y}\,dx$ can be done with an integration by parts, holding $y$ constant

  • mean of an exponential distribution with rate parameter $\lambda$ is $\dfrac{1}{\lambda}$