3k views
Suppose $X_i$ for $i=1, 2, 3$ are independent and identically distributed random variables whose probability mass functions are $Pr[X_i = 0] = Pr[X_i = 1] = \frac{1} {2} \text{ for } i = 1, 2, 3$. Define another random variable $Y = X_1X_2 \oplus X_3$, where $\oplus$ denotes XOR. Then $Pr[Y=0 \mid X_3 = 0] =$______.
| 3k views
0
pls explain bayes method.
0
+1
Notice -> $X_i$'s are independent But X and Y are not independent.

Answer is $0.75$

As $X_3 = 0$ is given, to have Y = 0, $X_1X_2$ should be $0$, meaning $\left(X_1, X_2 \right)$ should be one of $\left\{(0,0) (0,1) (1,0)\right\}$

So, required probability $= 3 \times \dfrac{1}{2} \times \dfrac{1}{2} = 0.75 \because$ we can choose any of the $3$ possibilities in $3$ ways and then probability of each set of two combination is $\dfrac{1}{2} \times \dfrac{1}{2}$.

We can also do like follows:

There are totally $4$ possibilities -  $\left\{(0,0) (0,1) (1,0), (1,1)\right\}$, out of which $3$ are favourable cases.

So, required probability $= \dfrac{3}{4} = 0.75$.
by (389 points)
edited
0
@gate-2016 Is it fine now?
+1
yes . tnk u sir
0
I understood this approach, but is it possible to get this ans using bayes theorem. I could not calculate it.
+3
@Shashank - Obviously it should work. You should get $\frac{.75 \times 0.5}{0.5} = 0.75$
+3
sir, the formula for bayes theorm says,

P(Y=0|X3=0) = P(Y=0) * P(X3 = 0) / P(X3 = 0).

0.75 in your above explanation is not P(Y=0), it is P(Y=0|X3=0) as shown in correct answer above.

I think the probability of (Y = 0), be calculated as:

P(X1 X2 = 0) * P(X3 = 0) + P(X1 X2 = 1) * P(X3 = 1) = 3/4 * 1/2 + 1/4 * 1/2 = 1/2

this is because Y can be zero if X1X2 = 0 and X3 = 0, or if both are 1.

In this case applying bayes theorem will give 0.5.

what is going wrong in this approach?
0
@Arjun Sir

plz chk the range of this ans

I too think 0.5 should be ans
+1

$Pr[Y=0 \mid X_3 = 0] =$

We know the formula $Pr[A \mid B] =\frac{Pr\left ( A\cap B \right )}{Pr\left ( B \right )}$

That means here $$Pr[X_{1}X_{2}\oplus X_{3}=0 \mid X_3 = 0] =$$

$$\frac{Pr[\left \{ X_{1}X_{2}X_{3}' +\left ( X_{1}X_{2} \right )'X_{3}\right \}=0\cap X_3 = 0]}{Pr\left ( X_{3} =0\right )}$$

Now value of $X_{1}X_{2}=\frac{3}{4}$

So, putting it in above equation

$\frac{ 3/4 * 1/2 + 1/4 * 1/2}{1/2}=1/2$
0
@srestha the numerator part of Bayes theorem formula -- can you explain it in words? If you do so you'll get the answer. For A conditional B, the numerator part gives the probability of both the events A and B happening together.
+1

@Arjun Sir

We shouldnot consider only numerator part

They are asking about $Pr[Y=0 \mid X_3 = 0]$ ,right?(Not only numerator part)...........(i)

Now, we recall the formula $Pr[A \mid B] =\frac{Pr\left ( A\cap B \right )}{Pr\left ( B \right )}$

Put this formula in (i)

We get,$\frac{Pr[Y=0 \cap X_3 = 0]}{Pr[X_{3}=0]}$.......................(ii)

Now putting the value of $Y=X_{1}X_{2}\oplus X_{3}=\left \{ X_{1}X_{2}X_{3}' +\left ( X_{1}X_{2} \right )'X_{3}\right \}$ in the equation ii we get

$$\frac{Pr[\left ( \left \{ X_{1}X_{2}X_{3}' +\left ( X_{1}X_{2} \right )'X_{3}\right \}=0 \right )\cap \left ( X_3 = 0 \right )]}{Pr\left ( X_{3} =0\right )}$$ .........................iii

Now, as As $X_3 = 0$ is given, to have Y = 0, $X_1X_2$ should be $0$, meaning $\left(X_1, X_2 \right)$ should be one of $\left\{(0,0) (0,1) (1,0)\right\}$

So, There are totally 4 possibilities -  $\left\{(0,0) (0,1) (1,0), (1,1)\right\}$, out of which 3 are favourable cases.

So, X1X2 =3/4 and ( X1X2)'=1/4

and X3=1/2 and X3'=1/2

Now, putting it in above equation (iii)

$\frac{ 3/4 * 1/2 + 1/4 * 1/2}{1/2}=1/2$

+1
I just pointed out the part where you did wrong. When you write $P_r [ Y = 0 \wedge X_3 = 0]$ what does this mean? It gives the probability of $Y=0$ and $X_3=0$. Both of these are not independent events and hence we cannot use the product of probabilities here -- you did not do this. But you considered the probabilities for $X_3$ and $X_3'$ which is wrong -- $X_3$ must be 0 because of the "AND" condition.
0
hey if u want  u can apply baye's theorem in the following way :

Pr(y=0|x3=0) = Pr(y=0).Pr(x3=0|y=0)/Pr(x3=0)

Now Pr(y=0) = 0.75*0.5+0.5*0.25(as x3=1&(x1x2)=1 OR x3=0&x1x2=0) = 0.5

Pr(x3=0|y=0) = 0.75(as we need to find how many ways x1x2 = 0 since y =0 is given and we have to find for x3=0)

Pr(x3=0) = 0.5

You will get 0.75 as answer.Let me know if u need more details.
0

@Sayan

my point is " They are asking about $Pr[Y=0 \mid X_3 = 0]$ "

not only $X1X2$

Putting this $Pr[Y=0 \mid X_3 = 0]$ , if u get 0.75

then go for details

0

@Arjun Sir

it is not just for independent event that is for every event

https://en.wikipedia.org/wiki/Conditional_probability

https://math.stackexchange.com/questions/44054/how-to-easily-describe-the-meaning-of-pa-b-pabpb-pbapa

0

@Arjun sir ...is this right ? We have to find $P\left ( \frac{Y=0}{X_{3}=0} \right ) = ?$

 $X_{1}$ $X_{2}$ $X_{3}$ $Y$ 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 0

$P\left ( Y=0 \cap X_{3}=0\right ) = \frac{3}{8}$ and $P\left ( X_{3} = 0 \right ) = \frac{4}{8}$

So $P\left ( \frac{Y=0}{X_{3}=0} \right ) = \frac{P\left ( Y=0 \cap X_{3}=0\right )}{P\left ( X_{3} = 0 \right )} = \frac{3}{4}$

by Boss (13.3k points)
0
but

$Y = X_1X_2 \oplus X_3$

have u considered that?

Given,Y = 0 and X3 = 0

Y = X1.X2 $\bigoplus$ X3

0 = 1.0 $\bigoplus$ 0

0 = 0.1 $\bigoplus$ 0

0 = 0.0 $\bigoplus$ 0

there is only three possibility out of 4

P(E) = Favorable Outcomes / Total Outcomes

P(E) = 3 / 4

P(E) = 0.75

by (29 points)
0
$P(y=0| x3=0)=P(x1 x2=0)= 3/4$