Question 1185647
p = 2/3 = probability any mango picked at random is contaminated.
q = 1 - 2/3 = 1/3 = probability any mango picked at random is not contaminated.


binomial probability states that:


p(x) = p^x * q^(n-x) * c(n,x)


if n = 4, then the total probabilities will be:


p(0) + p(1) + p(2) + p(3) + p(4).


p(1) = (2/3)^1 * (1/3)^(4-1 = 3) * c(4,1) = .098765432
p(2) = (2/3)^2 * (1/3)^(4-2 = 2) * c(4,2) = .296296296
p(3) = (2/3)^3 * (1/3)^(4-3 = 1) * c(4,3) = .395061728


add them up and the probability of 1 to 3 rotten fruits out of 4 = .790123457.


the total probabilities are equal to 1 as shown below.


<pre>

p(0) =	0.012345679
p(1) =	0.098765432
p(2) =	0.296296296
p(3) =	0.395061728
p(4) =	0.197530864
	
p(total) = 	1
	
p(1,2,3) =	0.790123457

</pre>


c(n,x) is the number of ways you can get x elements out of a set of n.


the formula is c(n,x) = n! / (x! * (n-x)!)


for example:


c(4,3) is equal to 4! / (3! * 1!) = (4 * 3!) / (3! * 1!) = 4 / 1 = 4.


1! is always equal to 1
0! is always equal to 1 as well.


as an example, p(0) = (2/3)^0 * (1/3)^4 * c(4,0) = 1 * .012345679 * 1 = .012345679.


your solution is that the probability of getting 1 to 3 contaminated mangoes is equal to .790123457.