Is this use of the law of total probability valid?

64 Views Asked by At

I've encountered the following question, and was wondering if my approach, specifically my choice of using the law of total probability, was in place:

Let $b$ be a random uniform vector in $\{0,1\}^n$ where $b\neq \overline{0}$. For $a\in \{0,1\}^n$ define $\langle a,b \rangle = \sum_i a_ib_i \mod 2$. Prove that $\Pr[\langle a,b \rangle = 0]=\frac{1}{2}$.

To better understand the law of total probability, I was wondering whether the following approach would be correct:

Observe that:

$\Pr[\langle a,b \rangle = 0]=\Pr[\sum_i a_ib_i = even]$

then using the law of total probability:

$=\Pr[\sum_i a_ib_i = even \mid \text{ # 1s in b is even}]\Pr[\text{ # 1s in b is even}]+\Pr[\sum_i a_ib_i = even \mid \text{ # 1s in b is odd}]\Pr[\text{ # 1s in b is odd}]$

My main issue, leading me to feel this is incorrect use of the law, is with the fact that $b$ is given, so I'm looking for the probability given a specific instance of $b$, and therefore cannot treat it as a random variable. Does this not matter? Whether this is OK or not, please point to the part in the law of total probability (or other fact) that would convince of this.

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

You can use the LOTP in both cases, whether $b$ is fixed or not.

If $b$ is fixed the term $\Pr[\text{ # 1s in b is odd}]$ is a constant that cannot be simplified further.

If $b$ is random $\Pr[\text{ # 1s in b is odd}]$ can be simplified depending on the distribution.

In this case $b$ is not fixed or "given". It is a random variable:

Let $b$ be a random uniform vector in $\{0,1\}^n$

That means in the probability $P(a \cdot b =0)$ the probability ranges over all possibilities for $a$ and $b$.