Find the joint distribution of (X, Y) where $X = N(\mu, \sigma^2)$ and $Y = I_{\{X > 0\}}$

probabilityprobability distributions

Suppose that $X \sim N(\mu, \sigma^2)$ and $Y = I_{\{X > 0\}}$. What is the joint distribution of the random vector $(X, Y)$?

I have thought two possible solution for this:

(i) By the formulation we have that $Y \sim \mathrm{Bernoulli}(p)$, where $p = P(X > 0) = 1 – F_X(0)$, where $F_X(x)$ is the c.d.f. of $X$.

Hence, assuming that $X$ and $Y$ is independent we have that the join distribution is

$$
f_{X,Y}(x, y) = f_X(x) f_Y(y)
$$

I am not sure if this assumption holds.

(ii) Another possible solution is to find the distribution of $X | Y = y$, which is and Truncated Normal at 0, so the p.d.f. is given by

$$
f_{X\mid Y = y}(x \mid y)=
\begin{cases}
\dfrac{f_X(x)}{1 – F_X(0)} & \mathrm{if} \, \, y = 1 \\
\dfrac{f_X(x)}{F_X(0)} & \mathrm{if} \, \, y = 0
\end{cases}
$$

However, using this argumenting the joint distribution given by
$$
f_{X, Y}(x,y) = f_{X \mid Y = y}(x \mid y) f_Y(y)
$$

reduces to the marginal distribution of $X$.

I really appreciate any tip to solve this problem.

Best Answer

$Y$ is indeed a Bernoulli r.v., but it is dependent on $X$; conditioning on $X=x$, $Y$ is a constant (0 if $x < 0$, 1 if $x > 0$); you start from $$f_{X,Y}(x, y)=f_X(x)p_{Y|X}(y|x)$$ which leads to $$f_{X,Y}(x, y) = \begin{cases} f_X(x), & \text{ if } x > 0, y = 1 \\ f_X(x), & \text{ if } x \leqslant 0, y = 0 \\ 0, & \text{ otherwise } \end{cases}$$ PS: looks like the above formulae have notational issue, because $X$ is continuous r.v. while $Y$ is discrete; maybe it is better to write joint distribution in CDF form.