Probability – Joint Distribution of Discrete and Continuous Random Variables

probabilityprobability distributionsuniform distribution

This may be trivial, but if X is a random variable uniformly distributed over $[0,1]$ and Y is a discrete random variable such that $\mathbb{P} (Y=y_1) = \lambda \in (0,1]$ and $\mathbb{P} (Y=y_2) = 1 – \lambda$. Now I am seeking to compute the expectation of (a linear function) of the random variable X conditional on Y. Is this possible? Can we think of a "joint distribution" of two random variables where one random variable has a continuous density function and the other is discrete?

Thank you

Best Answer

If you expand the definition of expectation, you get

\begin{align*} \mathbb{E} f(X,Y) &= \int_{[0,1]} \sum_{y\in\{y_1,y_2\}} f(x,y)\mathbb{P}\{x\in dx\}\mathbb{P}\{Y=y\} \\ &= \int_{[0,1]} dx \left( f(x,y_1)\lambda + f(x,y_2)(1-\lambda) \right) \end{align*} You can use a similar "return to the definition" to write the conditional expectations as well.

Related Question