Statistics SOS - Using Bayes Theorem

115 Views Asked by At

Please see attached image. I'm generally confused when I see a Statistics problem like this, as I can't seem follow a logical route to the answer. Can you please advice me on the step I should take as soon as I come across a question like this; hope I could use it as generic algorthim to solve these questions.

Thanks Question

2

There are 2 best solutions below

0
On

First find a convenient notation. Let $A$ be the event "machine correctly adjusted". Let $E$ be the evidence, namely "One widget out of four is of high quality and the other three are of medium quality". With this notation, the entity to calculate is $P(A\mid E)$. We note that this entity is not already specified, but we have enough information to deduce stuff like $P(A)$ and $P(E\mid A)$. Moreover, this information is sufficient to apply Bayes' rule. So we "turn around" the conditional probabilities as follows: $$ P(A\mid E)={P(E\mid A)P(A)\over P(E)}={P(E\mid A)P(A)\over P(E\mid A)P(A) + P(E\mid A^c)P(A^c)}$$ where we write $A^c$ to mean the complement of $A$. We can immediately plug in $P(A)=0.9$ and $P(A^c)=0.1$. What needs to be calculated now is $P(E\mid A)$ and $P(E\mid A^c)$. To calculate these, we are told that widget quality is independent from one widget to the next, so the number of high quality widgets seen in a sample of four has a Binomial distribution, and we know the probability of "success" is $0.6$ if the machine is adjusted correctly and $0.3$ if not. Can you take it from there?

5
On

Apply the law of total probability. $P(Y=1)=0.9$ is the probability that the machine is adjusted correctly and $P(Y=0)=0.1$ is the probability that the machine is adjusted incorrectly. Futhermore $P(X=x|Y=1)$ is the probability that $x$ out of 4 widgets have a high quality given that the machine is adjusted correctly. Thus we get the following conditional probabilities:

$P(X=x|Y=1)={4 \choose x} \cdot 0.6^x\cdot 0.4^{4-x}$ and $P(X=x|Y=0)={4 \choose x} \cdot 0.3^x\cdot 0.7^{4-x}$

Using the total law of probability we have

$P(X=1)=P(Y=1)\cdot P(X=1|Y=1)+P(Y=0)\cdot P(X=1|Y=0)$