```Date: Feb 11, 2009 9:31 AM
Author: matt271829-news@yahoo.co.uk
Subject: Re: What probability a six-number lottery ticket has 3 consecutive <br>	numbers, the others not?

On Feb 11, 8:52 am, Archie <kohmover...@yahoo.com> wrote:> Say you can choose six numbers out of 59. What is the probability that> three (and only three) will be consecutive? This is complicated by the> fact that numbers appear in order from least to greatest. What if the> six numbers contain 2 sets of 3 consecutive numbers?>> I'm not finding any easy formula for this.>> Thanks!I'll assume that you want the probabilities after the six numbers aresorted in ascending order. In other words, the order in which the sixare selected is irrelevant.Let n be the number of numbers from which the six are chosen (in yourcase n = 59). The total number of ways to choose the six, disregardingorder, is C(n, 6) ("n choose 6"), where C(x, y) is a binomialcoefficient calculated as C(x, y) = x!/(y!*(x - y)!).Number of ways to choose six such that there are two separated runs ofthree in consecutive order =n - 6 ways if the lower run is 1, 2, 3+ n - 7 ways if the lower run is 2, 3, 4+ n - 8 ways if the lower run is 3, 4, 5+ ...+ 1 way if the lower run is n - 6, n - 5, n - 4= (n - 6)*(n - 5)/2So probability = (n - 6)*(n - 5)/(2*C(n, 6))Number of ways to choose six such that there is exactly one run ofthree and no longer run =C(n - 4, 3) if the run is 1, 2, 3 (remaining three can be any threefrom n - 4)+ C(n - 5, 3) if the run is 2, 3, 4 (remaining three can be any threefrom n - 5)+ C(n - 5, 3) if the run is 3, 4, 5...+ C(n - 5, 3) if the run is n - 3, n - 2, n - 1+ C(n - 4, 3) if the run is n - 2, n - 1, n= 2*C(n - 4, 3) + (n - 4)*C(n - 5, 3)BUT... every selection containing two separated runs of three will beincluded twice in this count, so we need to subtract twice the answerto the first question to get the requiredProbability = (2*C(n - 4, 3) + (n - 4)*C(n - 5, 3) - (n - 6)*(n - 5))/C(n, 6)
```