# Conditional probability with Bernoulli and Normal

Let $$X$$ be a normal variable with mean $$0$$ and variance $$1$$. Let $$Y$$ be Bernoulli with $$p = \frac{1}{2}$$, and suppose that $$X$$ and $$Y$$ are independent. Let $$Z = (Y + 1)X$$. Find the conditional probability that $$Y = 1$$ given that $$Z = 3$$.

I know I need to find $$P(Y = 1 | Z = 3) = \frac{P(Y = 1 \cap Z = 3)}{P(Z = 3)}$$.

Attempt:

For the numerator, $$P(Y = 1 \cap Z = 3) = P(Y = 1 \cap (Y + 1)X = 3) = P(2X = 3) = P(X = \frac{3}{2})$$. Since $$X$$ is standard normal, $$P(X = \frac{3}{2}) \approx 0.130$$

As for the denominator, $$P(Z = 3) =$$?

I can't figure this out.

Any assistance is much appreciated.

• Welcome to MSE. Your question is phrased as an isolated problem, without any further information or context. This does not match many users' quality standards, so it may attract downvotes, or closed. To prevent that, please edit the question. This will help you recognise and resolve the issues. Concretely: please provide context, and include your work and thoughts on the problem. These changes can help in formulating more appropriate answers. Mar 19 '21 at 9:51
– user902275
Mar 19 '21 at 9:58
• $\mathsf P(Y=1\cap (Y+1)X=3)~=~\mathsf P(Y=1)\,\mathsf P(X=3/2)$ [Though these would equal $0$ since $X$ is continuous] Mar 19 '21 at 10:01
• @GrahamKemp And the denominator?
– user902275
Mar 19 '21 at 10:01
• $P(Z=3)=0$ so the conditional probability does not exist. Mar 19 '21 at 10:02

$$\{Y=1\cap (Y+1)X=3\}=\{Y=1\cap X=3/2\}$$ and $$\{Y=0\cap (Y+1)X=3\}=\{Y=0\cap X=3\}$$.

However these are null events, since $$X$$ is continuous. So the expression needs to use the appropriate probability density functions.

$$\mathsf P(Y=1\mid Z=3) =\dfrac{f_{X}(3/2)\,\mathsf P(Y=1)}{f_{X}(3/2)\,\mathsf P(Y=1)+f_{X}(3)\,\mathsf P(Y=0)}$$

• I am surprised since somebody said that such a standard normal and bernoulli random variable would surely exists. That's interesting.
– user902275
Mar 19 '21 at 10:16
• Also, does it still not exist when $X$ is standard normal?
– user902275
Mar 19 '21 at 10:20

$$P(Z=3)=P(X=3,Y=0)+P(X=\frac 3 2, Y=1)$$ $$=P(X=3,P(Y=0)+P(X=\frac 3 2)P(Y=1)=0+0=0$$ since $$X$$ is a continuous random variable. [$$P(X=a)=0$$ for every real number $$a$$].

• Isn't it $\frac{3}{2}$ for $X$?
– user902275
Mar 19 '21 at 10:14
• Does it still not exist when $X$ is standard normal?
– user902275
Mar 19 '21 at 10:21