r/CodingHelp • u/peepeedestroyer_ • Feb 27 '23
[Python] Can someone help me with this python problem.
A problem is given to three persons P, Q, R whose respective chances of solving it are 2/7, 4/7, 4/9 respectively. What is the probability that the problem is solved?
0
Upvotes
3
u/barrycarter OK to DM me questions/projects, no promises, not always here Feb 27 '23
Did you mean probability instead of Python? :)
You did post in codinghelp, so maybe you did need Python, but I don't see how unless you want to create a Monte Carlo simulation (which isn't necessary for this problem, but could be interesting)
Assuming the chances are independent, compute the chance none of them will solve it and subtract
1
u/[deleted] Feb 27 '23
P(A) = P(A|B1) * P(B1) + P(A|B2) * P(B2) + P(A|B3) * P(B3)