What is the probability that there is an error in both blocks?

2.8k Views Asked by At

A computer program consists of two blocks written independently by two different programmers. The first block has an error with probability $0.2$, the second block has an error with probability $0.3$. If the program returns an error, what is the probability that there is an error in both blocks?

2

There are 2 best solutions below

3
On BEST ANSWER

Consider this figure:

enter image description here

So your answer is $\frac{0.06}{.2 + .3 - .06}$ which is simply the intersection over the union, as shown by JMoravitz.

1
On

Hint:

$\Pr(X\mid Y) = \dfrac{\Pr(X\cap Y)}{\Pr(Y)}$

and in particular letting $X=A\cap B$ and $Y= A\cup B$ and noting that $A\cap B$ is a subset of $A\cup B$ you have

$$\Pr(A\cap B\mid A\cup B) = \dfrac{\Pr(A\cap B)}{\Pr(A\cup B)}$$