# Finding probability for general cases

For a student to qualify, he must pass at least two out of three exams. The probability that he will pass the 1st exam is $p$. If he fails in one of the exams then the probability of passing in the next exam is $p/2$ otherwise it remains the same. Find the probability that he will qualify. My textbook answer reads $2p^2 – p^3$. This is possible if only the below cases are considered:

1. He passes first and second exam.
2. He passes first, fails in second but passes third exam.
3. He fails in first, passes second and third exam.

But I think this is wrong since at least two out of three exams means,passing in first, second and third exam is inclusive. Someone please solve this paradox.

• What is the probability to pass the third exam if he passed the first and failed at the second? – Logic_Problem_42 Apr 26 '18 at 8:45
• p/2 @logicproblem_42 – parker Apr 26 '18 at 8:46
• I don't believe that answer is correct, because the textbook answer matches what you get if you use 'p' not 'p/2'. – Steven Irrgang Apr 26 '18 at 8:49
• Sure the real-life probability should increase after a failed exam, huh? – svavil Apr 26 '18 at 14:34

See the probability tree diagram: Adding the qualifying probabilities we get: $$p^3+p^2(1-p)+p(1-p)\cdot \frac p2+(1-p)\cdot \frac p2 \cdot p=2p^2-p^3.$$

• What software did you use for creating this binary tree? – Sudix Apr 26 '18 at 13:18
• @Sudix, it is MS Word 2013, Insert->SmarArt->Hierarchy. – farruhota Apr 26 '18 at 13:20

I get: p^2 + (1-p)(p/2)p + p(1-p)(p/2)

Which is (pass pass either) + (fail pass pass) + (pass fail pass), and as you can see no cases are double counted here. If you then expand out the (1-p) terms and collect it together then it's the same as the textbook answer.

• all your cases are for not for atleast 2,but for just 2. – parker Apr 26 '18 at 8:49
• @parker no they're not, the case of all 3 is included in (pass pass either). If it makes it easier, split that case into (pass pass pass) and (pass pass fail), and change p^2 to p^3 + p^2(1-p) – Steven Irrgang Apr 26 '18 at 8:51
• no still not clear.can you explain (pass pass pass) and (pass pass fail)? – parker Apr 26 '18 at 8:54
• @parker (pass pass pass) = pass all three exams (pass pass fail) means pass the first two exams and fail the third. – Steven Irrgang Apr 26 '18 at 8:59
• Then the case is (pass pass pass) + (fail pass pass) + (pass fail pass) . this won't give the same answer .The case (pass pass fail)is rejected cause its the same as (fail pass pass). – parker Apr 26 '18 at 9:02

PP has probability $p^2$.

PFP has probability $p(1-p)\frac12p$.

FPP has probability $(1-p)\frac12pp$

Summation results in a probability of $2p^2-p^3$ to qualify.

All three passed: $p^3$. First and second passed, third failed: $p^2(1-p)$. First passed, second failed, third passed: $p(1-p)p/2$. First failed, next two passed: $(1-p)(p/2)^2$. Then add all four probabilities. The answer would be $7p^2/4-3p^3/4$.

UPDATE. I understood it so that if once failed, the probability of success remains at most $p/2$. But I suppose this is not correct. So the case "First failed, next two passed" leads to $(1-p)(p/2)p$ and the whole probability is indeed $2p^2-p^3$. The problem is badly stated, by the way.

Let me denote by $E_i$ the event "Exam $i$ has been passed" and let $\overline{E}_i$ be its complement. Then, you know that $P(E_1)=p$, $P(E_2| \overline{E}_1 ) = P(E_3| \overline{E}_1 \cap \overline{E}_2 ) = P(E_3| \overline{E}_1 \cap E_2 ) = P(E_3| E_1 \cap \overline{E}_2 ) = p/2$ and $P(E_2| E_1 ) = P(E_3| E_1 \cap E_2 ) = p$.

By $\sigma$-addivity, you want to calculate the probability $$A=P(E_1\cap E_2 \cap E_3) + P(E_1\cap E_2\cap \overline{E}_3) + P(E_1\cap \overline{E}_2 \cap E_3) + P(\overline{E}_1 \cap E_2\cap E_3).$$ Let's calculate each term: $$P(E_1\cap E_2 \cap E_3) = P(E_3 | E_1\cap E_2) P(E_1\cap E_2) = p P( E_2 | E_1) P(E_1) = p^3$$ $$P(E_1\cap E_2\cap \overline{E}_3) = P(\overline{E}_3 | E_1\cap E_2) P( E_2 | E_1) P(E_1) = (1-p) p^2$$ $$P(E_1\cap \overline{E}_2 \cap E_3) = P(E_3 | E_1\cap \overline{E}_2) P(E_1\cap \overline{E}_2) = \frac{p}{2} P(\overline{E}_2 | E_1) P(E_1) = \frac{p}{2} (1-p) p$$ $$P(\overline{E}_1 \cap E_2\cap E_3) = P(E_3 | \overline{E}_1 \cap E_2 ) P (\overline{E}_1 \cap E_2) = \frac{p}{2} P(E_2|\overline{E}_1) P(\overline{E}_1) = \frac{p^2}{4}(1-p)$$ To sum up, we obtain $$A = p^3 + (1-p) p^2 + \frac{p}{2} (1-p) p + \frac{p^2}{4}(1-p) % = p^3 + p^2- p^3 + \frac{p^2-p^3}{2} + \frac{p^2}{4} - \frac{p^3}{4} % = p^2 + 3 p^2 \frac{1-p}{4} % = p^2 + \frac{3 p^2}{4} - \frac{3 p^3}{4} = \frac{7 }{4}p^2 - \frac{3 }{4} p^3$$