I'm working on a problem involving Bayesian updating with a Beta prior, but the data I observe comes from a slightly complex source.
Let $X \sim \text{Bernoulli}(p)$ and $Y \sim \text{Bernoulli}(q)$, where $q$ is known. I don't directly observe $X$. Instead, I observe $Z = XY$. I would like to estimate p.
Here are some intuition based on some preliminary calculations:
If $Z = 1$, I believe the update on the prior $\text{Beta}(\alpha, \beta)$ should be $\text{Beta}(\alpha+1,\beta)$ since $X$ definitely equals 1.
If $Z = 0$, I deduced that the update should be $\text{Beta}(\alpha+P(X=1|Z=0),\beta+1−P(X=1|Z=0))$.
Can someone provide a detailed proof or justification for these updates? Specifically, I'm interested in the logic behind the fractional update when observing $Z = 0$ and its validity within the Bayesian framework. Thanks.