# Why are the following probabilities equal to each other?

The following is a Bayesian model, there are variables $Y_1,Y_2 \in \{ 0,1 \}$ and variable $X \in \{ 0, 1\}$ and $\theta$ between $0$ and $1$.

The model is:

1. draw $\theta$ from Beta distribution with parameters $a$ and $b$
2. draw $Y_1$ from Bernoulli $\theta$
3. draw $Y_2$ from Bernoulli $\theta$
4. draw $X$ as following: with prob. $\theta$, $X = Y_1\,\, XOR\,\, Y_2$ and with probability $1-\theta$ $X = 1 - (Y_1\,\, XOR\,\, Y_2)$.

The joint distribution is:

$$p(\theta,Y_1,Y_2,X) = p(\theta |a,b)p(Y_1 | \theta)p(Y_2 | \theta)p(X | Y_1,Y_2,\theta)$$

I calculated the joint $p(X,Y_1,Y_2,\theta)$. The interesting part which I don't have an intuitive explanation for is why $$p(Y_1 = 0 | Y_2 = 0, X = 0) = P(Y_1 = 1 | Y_2 = 0, X = 0) = 1/2$$

which is what I get from my calcs. It seems counter-intuitive, because I would expect $a$ and $b$ to bias this posterior. The probabilities do not equal each 1/2, for example, if we compare $$p(Y_1 = 0 | Y_2 = 0, X = 1)$$ and $$p(Y_1 = 1 | Y_2 = 0, X= 1)$$.

Does anyone have an intuitive explanation why the above probabilities, each equals 1/2?

-
What does XOR Y$_2$ mean? –  Michael Chernick Aug 18 '12 at 18:50
@MichaelChernick This usually means Exclusive or. –  user10525 Aug 18 '12 at 18:56
SO Y$_1$ XOR Y$_2$ means either Y$_1$ or Y$_2$ but not both. –  Michael Chernick Aug 18 '12 at 18:59
@MichaelChernick - yes, that's correct. –  jbowman Aug 18 '12 at 19:01
@singelton Do you mean Y$_1$ drawn from Bernoulli θ$_1$ and Y$_2$ Bernoulli θ$_2$ or something else? You can't mean Bernoulli θ. –  Michael Chernick Aug 18 '12 at 19:09

The beta distribution is not important. Arbitrarily choose $\theta_1 \in (0,1).$

Let $Y_i$ be IID $\text{Bernoulli}(\theta_1)$ for $i=1,2,3$.

Let $X$ be the indicator of the event that even number of the $Y_i$ are $1.$ So, with probability $\theta_1$, $Y_3 = 1$ and then $X = Y_1 ~\text{xor}~ Y_2$. With probability $1-\theta_1,$ $Y_3 = 0$ and then $X = \text{not}(Y_1 ~\text{xor}~ Y_2).$

Given that an odd number of the $Y_i$ are $1$, and $Y_2 = 0$, then either $Y_1 = 0$ and $Y_3 = 1$, or else $Y_1=1$ and $Y_3=0$, and the conditional probabilities of these are equal by symmetry hence $1/2$.

-
The model is not well-defined by the OP. Douglas' example is equivalently stated as follows: the r.v. $Y_1$, $Y_2$, $Y_3$ are conditionally independent given $\theta_1$ and $X=Y_1 ~\text{xor}~Y_2$ or $X=~\text{not}(Y_1 ~\text{xor}~ Y_2)$ according to whether $Y_3=1$ ou $0$. But the OP does not precise how $X$ is drawing at random (for instance the above construction with $Y_3$ replaced with $Y_2$ satisfies OP's assumptions). In Douglas' situation we can also check that $\Pr(Y_1=0\mid Y_2=0, X=0, \theta_1)=\Pr(Y_1=1\mid Y_2=0, X=0, \theta_1)=\theta_1\theta_2\theta_2$ and the result follows. –  Stéphane Laurent Aug 18 '12 at 23:22
Stephane, are my changes helpful? –  singelton Aug 18 '12 at 23:32
@singelton Yes, but in view of coherence with the answer it would be better to denote $\theta_1$ instead of $\theta$. –  Stéphane Laurent Aug 19 '12 at 8:36
In my first comment above there is something wrong. Replacing $\theta_1\theta_2\theta_2$ with $\theta_1\theta_2\theta_2/\Pr(Y_2=0,X=0)$ should be correct. –  Stéphane Laurent Aug 19 '12 at 8:38
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://stats.stackexchange.com/questions/34598/why-are-the-following-probabilities-equal-to-each-other/34606", "fetch_time": 1386923738000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2013-48/segments/1386164920565/warc/CC-MAIN-20131204134840-00026-ip-10-33-133-15.ec2.internal.warc.gz", "warc_record_offset": 187419530, "warc_record_length": 13551, "token_count": 1218, "char_count": 3311, "score": 3.671875, "int_score": 4, "crawl": "CC-MAIN-2013-48", "snapshot_type": "latest", "language": "en", "language_score": 0.8478461503982544, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00026-of-00064.parquet"}