# Thread: product of continuous and discrete pdf

1. ## product of continuous and discrete pdf

X~N(0,1) standard normal
Z is discrete distrbution with -1 and 1 with equal probability.

What is the distribution of XZ = Y?

Do I do:

f(y) = f(x)f(z)
= -f(y) when y=-1
and f(y) when y=1

where f(y) = ${1 \over \sqrt{2 \pi} }e^{-0.5y^2}$

2. Originally Posted by chopet
X~N(0,1) standard normal
Z is discrete distrbution with -1 and 1 with equal probability.

What is the distribution of XZ = Y?

Do I do:

f(y) = f(x)f(z)
= -f(y) when y=-1
and f(y) when y=1

where f(y) = ${1 \over \sqrt{2 \pi} }e^{-0.5y^2}$
No.

$F(y) = \Pr(Y \leq y) = \Pr(XZ \leq y) =$

$\Pr\left(X \leq \frac{y}{Z} \right)$ when $Z > 0$

$\Pr\left(X \geq \frac{y}{Z} \right)$ when $Z < 0$

Therefore $F(y) =$

$\Pr(X \leq y)$ when $Z = 1$

$\Pr(X \geq -y)$ when $Z = -1$

Therefore:

$F(y) = \frac{1}{2} ( \, \Pr(X \leq y) + \Pr(X \geq -y) \, )$

$= \frac{1}{2} \left( \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{y} e^{-t^2/2} \, dt + \frac{1}{\sqrt{2 \pi}} \int_{-y}^{+\infty} e^{-t^2/2} \, dt \right)$.

Therefore $f(y) = \frac{dF}{dy} = \frac{1}{2 \sqrt{2 \pi} } \left( e^{-y^2/2} + e^{-y^2/2} \right) = \frac{1}{\sqrt{2 \pi} } e^{-y^2/2}$.

This does not seem right but I don't have time now to find my mistake. I'll post again later.

3. Originally Posted by mr fantastic
No.

$F(y) = \Pr(Y \leq y) = \Pr(XZ \leq y) =$

$\Pr\left(X \leq \frac{y}{Z} \right)$ when $Z > 0$

$\Pr\left(X \geq \frac{y}{Z} \right)$ when $Z < 0$

Therefore $F(y) =$

$\Pr(X \leq y)$ when $Z = 1$

$\Pr(X \geq -y)$ when $Z = -1$

Therefore:

$F(y) = \frac{1}{2} ( \, \Pr(X \leq y) + \Pr(X \geq -y) \, )$

$= \frac{1}{2} \left( \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{y} e^{-t^2/2} \, dt + \frac{1}{\sqrt{2 \pi}} \int_{-y}^{+\infty} e^{-t^2/2} \, dt \right)$.

Therefore $f(y) = \frac{dF}{dy} = \frac{1}{2 \sqrt{2 \pi} } \left( e^{-y^2/2} + e^{-y^2/2} \right) = \frac{1}{\sqrt{2 \pi} } e^{-y^2/2}$.

This does not seem right but I don't have time now to find my mistake. I'll post again later.
It is right, what you have is a standard normal random variable, with its sign changed at random with probability 0.5, but as the standard normal density is symmetric that leave the distribution unchanged.

RonL

4. Originally Posted by CaptainBlack
It is right, what you have is a standard normal random variable, with its sign changed at random with probability 0.5, but as the standard normal density is symmetric that leave the distribution unchanged.

RonL
Yes, that thought occured to me some time later. Thanks for the confirmation.