# What is the probability of the following event about Bernoulli random variables?

Let $X_1, X_2, X_3, X_4, X_5, X_6$ be independent Bernoulli random variables. Then \begin{align} Pr[X_i=1]=Pr[X_i=0]=1/2. \end{align} I want to compute the following probability \begin{align} Pr( X_1+X_2+X_3=2, X_2+X_4+X_5=1, X_2+X_5=1 ). \end{align} My solution: \begin{align} & Pr( X_1+X_2+X_3=2, X_2+X_4+X_5=1, X_2+X_5=1 ) \\ & = Pr( X_1+X_3=1, X_4+X_5=0, X_5=0 )Pr( X_2=1 ) + Pr( X_1+X_3=2, X_4+X_5=1, X_5=1 )Pr( X_2=0 ) \\ & = Pr( X_1+X_3=1) Pr( X_4+X_5=0, X_5=0 )Pr( X_2=1 ) + Pr( X_1+X_3=2) Pr( X_4+X_5=1, X_5=1 )Pr( X_2=0 )\\ & = Pr( X_1+X_3=1) Pr( X_4=0) Pr(X_5=0 )Pr( X_2=1 ) + Pr( X_1+X_3=2) Pr( X_4=0) Pr(X_5=1 )Pr( X_2=0 ) \\ & = 2/4 \cdot 1/2 \cdot 1/2 \cdot 1/2 + 1/4 \cdot 1/2 \cdot 1/2 \cdot 1/2 = 3/32. \end{align} Is this correct? Thank you very much.

Here is an equivalent way of writing down what you have done.

$(X_1, \ldots, X_5)$ is equally likely to be any of the $2^5$ binary vectors of length $5$, for example $(0, 1, 0, 0, 1)$.

With the same casework that you did in your post, you can show that the only binary vectors that satisfy all three equations are $(1, 1, 0, 0, 0)$, $(0, 1, 1, 0, 0)$, and $(1, 0, 1, 0, 1)$. Thus the event has probability $3 / 2^5$.

A bit different (using conditional probabilities).

It is immediate that $X_4=0$.

Further:

$$P(X_1+X_2+X_3=2,X_2+X_5=1)=$$$$P(X_1+X_2+X_3=2,X_2+X_5=1\mid X_2=0)P(X_2=0)+P(X_1+X_2+X_3=2,X_2+X_5=1\mid X_2=1)P(X_2=1)=$$$$P(X_1=X_3=X_5=1)0.5+P(X_1+X_3=1,X_5=0)0.5=0.5^4+2\cdot0.5^4=3\cdot0.5^4$$

Multiplication with $P(X_4=0)=0.5$ results in $$3\cdot0.5^5$$