let’s say 1 in 3 has a property if chance is given what should i do to find it?

Another way is to do it empirically, instead of the analytical way of Joe’s answer:

n = 100000 #Arbitrary large number
at.least.1 = numeric() #Empty vector to store "1" when at least one was colorblind, "0" if not
for(j in 1:n){
  at.least.1[j] = sum(sample(0:1, size=3, prob=c(0.92,0.08), replace=TRUE))>=1}

For this problem it’s easy to do it analytically, but sometimes this will be better.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top