# using Bayes’ Rule to calculate conditional probability

i have following problem,

"Students who party before an exam are twice as likely to fail the exam as those who don't party (and presumably study). Of 20% of students partied before the exam, what percentage of students who failed the exam went partying?"

i believe that this problem related to conditional probability, but i couldn't find all necessary elements for answer. appreciate your help.

• Do you understand Bayes’ theorem? – gHem Dec 20 '18 at 4:38
• Is that supposed to read If 20% of students... instead of Of 20% of students... ? – David Diaz Dec 20 '18 at 4:53
• An alternative approach to Aaron's answer is to first write down the given info as: \begin{align}P[fail \: \mid \: party] &= 2P[ fail \: \mid \: party^c]\\ P[party] &= 0.2\end{align} and you want to compute $P[party \: \mid \: fail]$. – Michael Dec 20 '18 at 5:18

Let $$x$$ be the total number of students and $$p$$ be the probability of a student who didn't party failing the exam. The probability of a student who partied before the exam failing the exam is then $$2p$$.
$$x/5$$ students partied, out of which $$2px/5$$ failed. Out of the $$4x/5$$ who didn't party, $$4px/5$$ failed the exam. The total students who failed is $$2px/5+4px/5=6px/5$$, out of which $$2px/5$$ partied. The required probability is $$2/6=1/3$$.
Using these numbers, you can that if taking a sample out of $$100$$ for example, you will see that 12 people failed who went partying and 24 failed who didn't party. So the percentage who failed (and went partying) is $$33.3$$%.