Martin S. answered 04/22/20
Patient, Relaxed PhD Molecular Biologist for Science and Math Tutoring
If five trials are conducted and then in order to have no more than two successful trials there could be two successes and three failures, one success and four failures, or five failures. One way to calculate the probability would be to calculate the individual ways this could happen, and then add those numbers. Another way is to expand the polynomial equation, 1 = (p + q)n, where p is the probability of success, q is the probability of failure, and n is the number of trials run. In this case p + 0.18, q = 0.82, and n = 5.
You can expand the polynomial by hand, or make use of Pascal's triangle, which is the faster method
n
1 p + q
2 p2 + 2pq + q2
3 p3 + 3p2q + 3pq2 + q3
4 p4 + 4p3q + 6p2q2 + 4pq3 + q4
5 p5 + 5p4q + 10p3q2 + 10p2q3 + 5pq4 + q5
This can be expanded indefinitely for any n, but all we need is the formula for n = 5. The last three terms are the ones we are interested in. For those terms, 10p2q3 means there are 10 ways to get 2 successful trials and 3 failures, 5pq4 means there are 5 ways to get one successful trial and four failures, and q5 means there is one way to get five failures. By plugging in the values for p and q the probability of all of those outcomes can be calculated. When those results are added, the sum is the overall probability of having no more than two successes.
10p2q3 = 10 x (0.18)2 x (0.82)3 = 10 x 0,0324 x 0.551 = 0.1785
5pq4 = 5 x 0.18 x (0.82)4 = 5 x 0.18 x 0.452 = 0.4079
q5 = (0.82)5 = 0.3707
Adding these, 0.1785 + 0.4079 + 0.3707 = 0.9571
So the probability of having no more than two successes is 0.957 to three significant figures.
Hope this helps