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!
$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.