There are 2 companies, A and B. A pollutes 1/10 of the time while B pollutes 9/10 of the time. The difference between the discharge from the companies is that A usually has twice as many white jugs as black jugs while B has the exact reversed proportions.
Given a discharge with order - b, b, w, b, w, w, b, b, b, w, b - how likely is it that company A is the polluter?
I'm not sure if I'm plugging in things into Bayes Thm formula correctly, $ Pr(A|B) = \frac{Pr(B|A)Pr(A)}{Pr(B)} $
$ Pr((b,b,w,b,w,w,b,b,b,w,b)|company A) = \frac{Pr(company A|b,b,w,b,w,w,b,b,b,w,b)Pr(b,b,w,b,w,w,b,b,b,w,b)}{Pr(company A)} $
With $ Pr(company A) = 1/10 $, but I'm not sure how to calculate $ Pr(company A|b,b,w,b,w,w,b,b,b,w,b) $ and $ Pr(b,b,w,b,w,w,b,b,b,w,b) $. Also, once I have those calculations, do I just plug them in? I remember having to use to the law of total probability calculation but not sure how that factors in here.
Thanks!
it's in the other direction. Let $X=(b,b,w,b,w,w,b,b,b,w,b)$. What you need is $Pr(A|X)$ as $X$ is given and the question is about the likely of being $A$. So you must use $$Pr(A|X)=\frac{Pr(X|A)Pr(A)}{Pr(X)}$$ where, using total probabilities $$Pr(X)=Pr(X|A)Pr(A)+Pr(X|B)Pr(B)$$ Also, $Pr(X|some\_company)$ is given by the proportion of black and white jugs. Said this we have that $Pr(b|A)=\frac{1}{3},Pr(w|A)=\frac{2}{3},Pr(b|B)=\frac{2}{3},Pr(w|B)=\frac{1}{3}$