Law of total probability - need some clarification

Two machines, A and B, operate in some factory.

Machine A produces 10% of the factory's products.

Machine B produces 90% of the factory's products.

1% of machine A's products are flawed.

5% of machine B's products are flawed.

One product randomly selected.

what is the probability that it's flawed?

So, this is what I did:

let $\displaystyle C=\left \{ product\hspace{4} x\hspace{4} is\hspace{4} flawed \right \}$

let $\displaystyle A=\left \{ x\hspace{4} produced\hspace{4} in\hspace{4} A \right \}$

let $\displaystyle B=\left \{ x\hspace{4} produced\hspace{4} in\hspace{4} B \right \}$

Now, according to the law of total probability, we'll get that:

$\displaystyle P(C)=P(A)\cdot P(C|A)+P(B)\cdot P(C|B)=10\%\cdot (10\%\cdot 1\%)+90\%\cdot (90\%\cdot 5\%)=4.05\%$

but the answer is:

$\displaystyle P(C)=P(A)\cdot P(C|A)+P(B)\cdot P(C|B)=(10\%\cdot 1\%)+(90\%\cdot 5\%)=4.6\%$

Why were $\displaystyle P(A)$ and $\displaystyle P(B)$ omitted?

Re: Law of total probability - need some clarification

Quote:

Originally Posted by

**Stormey** Two machines, A and B, operate in some factory. Machine A produces 10% of the factory's products. Machine B produces 90% of the factory's products.

1% of machine A's products are flawed. 5% of machine B's products are flawed.

One product randomly selected.

what is the probability that it's flawed?

So, this is what I did:

let $\displaystyle C=\left \{ product\hspace{4} x\hspace{4} is\hspace{4} flawed \right \}$

let $\displaystyle A=\left \{ x\hspace{4} produced\hspace{4} in\hspace{4} A \right \}$

let $\displaystyle B=\left \{ x\hspace{4} produced\hspace{4} in\hspace{4} B \right \}$

the answer is:

$\displaystyle P(C)=P(A)\cdot P(C|A)+P(B)\cdot P(C|B)=(10\%\cdot 1\%)+(90\%\cdot 5\%)=4.6\%$

$\displaystyle P(C)=P(C\cap A)+P(C\cap B)$

$\displaystyle P(C\cap A)=P(C|A)P(A)=(0.1)(0.01)$,

**That is**, probability it is flawed given A made it times probability that A made it.

Re: Law of total probability - need some clarification

Hi Plato, thanks for the help.

Quote:

Originally Posted by

**Plato** **That is**, probability it is flawed given A made it times probability that A made it.

that is exactly my question...

I'll try to rephrase.

the probability tree looks like this:

http://i39.tinypic.com/nwy7hj.png

"probability it is flawed given A made it" (meaning P(C|A) ), if we follow the tree from its root along its branches, is $\displaystyle 0.1\times 0.01$

"probability that A made it" (meaning P(A) ), again, according the tree it's $\displaystyle 0.1$

so "probability it is flawed given A made it times probability that A made it" should be$\displaystyle (0.1\times 0.01)\times 0.1$

Re: Law of total probability - need some clarification

Quote:

Originally Posted by

**Stormey** Hi Plato, thanks for the help.

that is exactly my question...

I'll try to rephrase.

the probability tree looks like this:

http://i39.tinypic.com/nwy7hj.png
"probability it is flawed given A made it" (meaning P(C|A) ), if we follow the tree from its root along its branches, is $\displaystyle 0.1\times 0.01$

"probability that A made it" (meaning P(A) ), again, according the tree it's $\displaystyle 0.1$

so "probability it is flawed given A made it times probability that A made it" should be$\displaystyle (0.1\times 0.01)\times 0.1$

I really don’t understand what you are asking.

While in general I am no fan of probability trees, your's makes the answer quite clear.

In order for a part to be flawed is must come from either machine A or machine B.

$\displaystyle \begin{align*} \mathcal{P}(C)&=\mathcal{P}(C\cap A)+ \mathcal{P}(C\cap B)\\ &= \mathcal{P}(A)\mathcal{P}(C|A)+ \mathcal{P}(B)\mathcal{P}(C|B)\\&=(0.1)(0.01)+(0.9 )(0.05)\end{align*}$

Re: Law of total probability - need some clarification

Quote:

Originally Posted by

**Plato** I really don’t understand what you are asking.

While in general I am no fan of probability trees, your's makes the answer quite clear.

In order for a part to be flawed is must come from either machine A or machine B.

$\displaystyle \begin{align*} \mathcal{P}(C)&=\mathcal{P}(C\cap A)+ \mathcal{P}(C\cap B)\\ &= \mathcal{P}(A)\mathcal{P}(C|A)+ \mathcal{P}(B)\mathcal{P}(C|B)\\&=(0.1)(0.01)+(0.9 )(0.05)\end{align*}$

OK, I get it now,

I misunderstood the law of total probability, and it confused me.

Thanks.

Re: Law of total probability - need some clarification

Here's how I would do it:

Assume the machines produce 1000 products

Quote:

Machine A produces 10% of the factory's products.

so machine A produces 100 of the products.

Quote:

Machine B produces 90% of the factory's products.

And machine B produces 900.

Quote:

1% of machine A's products are flawed.

1% of 100 is 1. Machine A produces 1 flawed product.

Quote:

5% of machine B's products are flawed.

5% of 900 is 45. Machine B produces 45 flawed products.

Quote:

One product randomly selected.

what is the probability that it's flawed?

Of the 1000 products 45+ 1= 46 are flawed. The probability any one is flawed is $\displaystyle \frac{46}{1000}= 0.046$.