The probability of undergraduate-student who smokes is 13%.
The probability of postgraduate-student who smokes is 27%.
In a school, there are 1/5 undergraduate-student and 4/5 postgraduate-student.
The question is: Using Bayes theorem, calculate the probability for a student (in school) who smokes is a postgraduate-student.
I encountered this problem in my exam and couldn't figure out the solution, hope someone can help.
Bayes' theorem states that $P[A | B] = \frac{P[A, B]}{P[B]}$. Let us call S being a smoker and G being a postgraduate student:
$$P[G | S] = \frac{P[G, S]}{P[S]} = \frac{0.8 \cdot 0.27}{0.2 \cdot 0.13 + 0.8 \cdot 0.27} \approx 0.893$$