Conditional distribution

Let X be a random variable.
-P(X = 1) = 1/2
-P(X = 2) = 1/2
-The conditional distribution of Y given X is an exponential with rate X.

Find the expectation and variance of Y

I can't wrap my head around conditional distribution. Anyone care to help?


TS Contributor
I think you can simplify the problem by noting that

[math]f(y) = e^{-y}[/math] with probability [math]1/2[/math], and

[math]f(y) = 2e^{-2y}[/math] with probability [math]1/2[/math].