1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: 3 in a row probability problem

  1. Sep 3, 2014 #1
    What would the probability be of 10 randomly generated numbers producing exactly 3 0s in a row at any point in the 10 entries?

    1. 5
    2. 0
    3. 0
    4. 0
    5. 9
    6. 8
    7. 1
    8. 0
    9. 8
    10. 2

    Using a binomial distribution to find the probability of any 3 out of 10 I got:

    1/10 chance of getting zero = p(0) = 0.1

    P(X = 3) = (10 C 3) * 0.1^3 * (1-0.1)^(10-3) = .057395

    This does not take into consideration the idea of 3 in a row though so my next idea was just to simply take the 1/10 odds and cube them to find the odds of getting 3 in a row as 1/1000.

    From there, I added the 1/1000 probablilities 8 times assuming random 1-3, 2-4, 3,-5, 4-6, 5-7, 6-8, 7-9, and 8-10 all had a 1/1000 probability.

    Adding these 8 "clusters" would result in the probability of 8/1000.

    Another idea was using these 8 clusters in place of the 10 choose 3 in the binomial dist.:

    P(X = 3) = 8 * 0.1^3 * (1-0.1)^(10-3) = .00382637

    PS this is for the prob. of EXACTLY 3 zeros out of 10 numbers being in a row, my next task is to find prob of AT LEAST 3

    Kind of confused on which route to take, any help is appreciated. Thank you!
  2. jcsd
  3. Sep 3, 2014 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Do you mean exactly 3 0s in a row just once, or could it occur twice, as in 0001100011?
  4. Sep 3, 2014 #3
    If we are talking about exactly three zeros in a row (no more), your answer of 8/1000 includes 0000000000 8 times (and is incorrect in other ways). I presume that the all zeroes solution is invalid because there are more than 3 in a row.

    Also, just to be sure, I understand that 0000234098 is an invalid result (4 zeros in a row), but 0002342000 is a valid result (three in a row, even though there are zeros elsewhere). Is this correct?
  5. Sep 3, 2014 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    What about sequences like 0001234000? Do those count? Your second approach looks promising, but it doesn't account for the possibility of multiple runs of 0s.

    When I feel confused about probability problems (which is quite often), I try to see if I can reproduce an answer using a different method. For example, another way to look at what you did in the second approach is simply as a counting exercise. First, what's the size of the sample space? Then figure out how many combinations are there of the form 000xxxxxxx, of the form x000xxxxxx, and so on, where you don't care what each x represents. Add up the number of combinations and divide by the size of the sample space to get the probability. You should be able to convince yourself that it works out to 8/1000. However, this method over-counts sequences like 000xxxx000 — you'd count it once as 000xxxxxxx and again as xxxxxxx000. It also allows for sequences like 0000xxxxxx, which you shouldn't be counting. So perhaps your second approach isn't so promising.

    Your first approach is wrong for the reason you already stated.
  6. Sep 3, 2014 #5
    To redefine the problem more clearly, multiple runs of 3 zeroes are fine (0001234000) and more than 3 zeroes is fine too (1340000023).

    So essentially the question is what is the probability of getting AT LEAST 1 set of 3 or more zeroes in a row, anywhere in the set of 10 randomly generated numbers.
  7. Sep 3, 2014 #6
    One approach would be to count the ways you can have three zeros, and divide it by the total number of possibilities. The first term is easy to find the number of solutions for (000XXXXXXX gives 10^7 solutions). The next term, you have to move over one for X000XXXXXX, but you have to make sure you don't double count any of the ways from the previous term.

    You also could take the number of solutions at each position, and subtract duplicates, and divide the result by the total number of possibilities.
  8. Sep 4, 2014 #7


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It might be easier to count the cases where there are not 3 in a row. How many such with no zeroes, one zero, two zeroes, ... six zeroes.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted