Marginal Probability Density

84 Views Asked by At

if $A=1$, $y \sim N(1,\sigma^2)$

if $A=2$, $y \sim N(2,\sigma^2)$

$Pr(A=1)=0.5$

$Pr(A=2)=0.5$

Given $\sigma = 2$, I'm trying to find the formula for the marginal probability density function for y.

What I've done $$f(y | A, \sigma ^2) = f(y | A, 4) = \frac{1}{2\sqrt{2\pi}}exp(-\frac{(y-A)^2}{8})$$

is this the marginal probability density function for y?

If not.

What I've tried next but not sure

According to Wikipedia $$p_Y(y) = \int_X p_{X, Y}(x,y) dy = \int_X p_{X|Y}p_X(x)dx = E_X[p_{X|Y}(x|y)]$$

However, I'm not sure how to apply this formula on $f(y|A, \sigma^2)$

Thanks in advance!

2

There are 2 best solutions below

2
On BEST ANSWER

$f(y)=\frac{1}{2\sqrt{2\pi \sigma^2}}(e^-\frac{(1-y)^2}{2\sigma^2}+e^-\frac{(2-y)^2}{2\sigma^2})$

You are overthinking.

0
On

$$f_Y(y) = \sum_{a = 1}^2 f_{Y \mid A}(y \mid A = a) \Pr[A = a],$$ where $$f_{Y \mid A}(y \mid A = a) = \frac{1}{\sqrt{2\pi \sigma}} e^{-(y - a)^2/(2\sigma^2)}, \quad a \in \{1, 2\},$$ and $$\Pr[A = a] = \begin{cases}1/2, & a \in \{1, 2\} \\ 0, & \text{otherwise} \end{cases}.$$