Total Law of Probability question

The diagram says that, if the input is 0, the output will be 0 with probability 1ϵ1\displaystyle 1- \epsilon_1 and 1 with probability ϵ1\displaystyle \epsilon_1 but if the input is 1 the output will be 0 with probability ϵ2\displaystyle \epsilon_2 and 1 with probability 1ϵ2\displaystyle 1- \epsilon_2.

We are also given that the probability the input will be 0 is p and the probability the input will be 1 is 1- p. What is the probability the output will be 0? That can happen in two ways: the input was 0 and the output was 0 or the input was 1 and the output was 0.

Given that the input was 0 what is the probability the output is 0? Multiply that by p. Given that the input was 1 what is the probability the output is 0 ? Multiply that by 1- p. Then add those two numbers.
 
Top