A computer is programmed to generate a sequence of three digits, where each digit is either 0 or 1, and each of these is equally likely to occur. Construct a sample space that shows all possible three-digit sequences of 0s and 1s and then find the probability that a sequence will contain at least one 0.
@ybarrap
@JA1
Probability of at least 1 zero = 1 - Probability of all ones = 1 - (1/2)^3 Sample space consists of xxx, where each x can be 1 or 0. Since x can be 1 or 0, there are two choices for each Since there are 2 choices for each x, the number of possibilities in your sample space will be 2*2*2 To simulate, first define a counter. Set it equal to 0. Next, generate a random number (say y), uniformly distributed between 0 and 1 if (y > .5) then say it's a 0, otherwise say its a 1. Do this 3 times, this is your 1st sample (for example you'll get 101). Check to see if any of these 3 is a 1. If it is, increment the counter by 1. Do this thousands of times (generate 3 y's, is any = 0, increment counter, etc) At the end of this process, divide your counter by the number of samples. This is the probability of at least 1 zero. That's it. :)
Join our real-time social learning platform and learn together with your friends!