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.
 A: I would recommend drawing a tree diagram to start with. Look at https://www.mathsisfun.com/data/probability-events-conditional.html for more information.
In your case, I assigned percentages making sure to fulfill your condition. 
20% partied - Of them, 60% of them failed and 40% of them passed, while
80% no party - Of them, 30% of them failed and 70% of them passed. 
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$%.
A: 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$.
