Bayes' formula with three probability

149 Views Asked by At

I am having trouble with this problem. I believe I have to use Bayes' formula in this problem, but I notice there are three variables(I'm new to prob stat so I don't know if it would be considered a variable).

Here is the problem:

PROBLEM 1 A college is buying dry-erase markers from three companies, company A, company B, company C. The defect rates, the number of defected markers per company, are 8%, 5%, 3% respectively. College bought 10,000 markers, 5% from company A, 20% from company B, and 75% from company C. Randomly picked marker has been found defected.

What are the chances that it comes from a company other than company C?

This is Bayes' formula: P(A/B) = P(A)P(B|A)/P(A)P(B|A)+P(not - A)P(B|not - A) How can I handle this problem?

3

There are 3 best solutions below

0
On BEST ANSWER

Ok I will write out the general idea without plugging in the numbers.

Let A be the event that the marker is from company A. Let B be the event that the marker is from company B. Let C be the event that the marker is from company C. Let D be the event that the marker is defective.

The probability that it comes from other than C is

$Pr(A | D) + Pr (B | D)$.

Using Bayes Rule, we have

$Pr(A | D) = \frac{Pr(D | A) Pr(A)}{Pr(D)}$

Same computation goes for $Pr( B | D)$

Lastly, to compute $Pr(D)$ we use the law of total probability. We have

$Pr(D) = Pr(D | A) Pr(A) + Pr(D | B) Pr(B) + Pr( D|C) Pr(C)$

0
On

You would need to define events here. To prevent confusion, we might rewrite Bayes' formula as $$ P(X|S) = \frac{P(X\cap S)}{P(S)} $$ and you would need to consider the composition of the event $S$. Say you have 3 possible disjoint events $X,Y,$ and $Z$ that completely cover event $S$. Then, the chances of $S$ happening would be $$ P(S) = P(S \cap X) + P(S\cap Y) + P(S\cap Z). $$ and $P(S\cap E) = P(S| E)P(E)$ for a general event $E$.

Let's call event $S$ to be the event that a randomly picked marker is defective. Also, let $X$ be the event that the marker comes from company $A$, $Y$ corresponds to company $B$ and $Z$ for company $C$.

Then $$ P(S\cap X) = P(S|X)P(X) $$ Now, $P(S|X)$ is the probability that the marker from company $A$ is defective, i.e. $0.08$ in your case. $P(X)$ on the other hand is the probability that a random marker comes from company $A$, and this would be equal to $0.05$ according to the purchase strategy. Then $$ P(S\cap X) = 0.08*0.05=0.004 $$

Now, you would need to the same for $P(S\cap Y)$ which would be equal to $P(S|Y)P(Y)=0.05*0.2=0.01$

The same thing is required for $Z$ and you only then need to plug in these numbers for $$ P(X|S) = \frac{P(X\cap S)}{P(S)} = \frac{P(X\cap S)}{P(S \cap X) + P(S\cap Y) + P(S\cap Z)}. $$

0
On

This may be easier arithmetically:

  • $500$ markers came from A
  • $2000$ markers came from B
  • $7500$ markers came from C

So combining this with the error rates

  • the expected number of faulty markers from A was $40$
  • the expected number of faulty markers from B was $100$
  • the expected number of faulty markers from C was $250$

This give the probability that a given faulty marker came from A or B as

$$\dfrac{40+100}{40+100+250}$$

and this is the same result as using conditional probabilities

$$\dfrac{\frac{5}{100}\times\frac{8}{100} + \frac{20}{100}\times\frac{5}{100}}{\frac{5}{100}\times\frac{8}{100} + \frac{20}{100}\times\frac{5}{100}+ \frac{75}{100}\times\frac{3}{100}}$$