To clarify: any of 4 contiguous numbers will have the
same odds, regardless of where being located sequentially
at the beginning, middle, or end of a number series 1 to 49
[....] Result: =46*COMBIN(45,2) ---> 1 to 45540 odds
Right. But that is the number of combinations with a consecutive
sequence of __at_least__ 4.
If you want the number of combinations with a consecutive sequence of
__exactly__ 4, the formula is:
2*COMBIN(44,2)+44*COMBIN(43,2) = 41624
Explanation.... For the sequences 4-3-2-1 and 49-48-47-46, only 44 of
the remaining 45 can be used for the remaining pair; we must exclude 5
for the sequence 4-3-2-1, and we must exclude 45 for the sequence
49-48-47-46. For the 44 remaining sequences, only 43 of the remaining
45 can be used for the remaining pair; we must exclude the numbers
before and after the sequence.
I would think, that beginning contiguous numbers would
be lower odds, as opposed higher numbers which would
have higher odds.
Wrong. But what can I say to convince you? Do you think the numbers
care whether they are high or low? Is there a greater chance of
selecting 49 than selecting 1 because 49 is higher? (No and no.)
As I noted above, when counting combinations of sequences of
__exactly__ 4, there is a difference between "end sequences" and
"middle sequences" because there is only one way to extend "end
sequences" v. two ways to extend "middle sequences".
But there is no difference between the "low end sequence" (4-3-2-1)
and the "high end sequence" (49-48-47-46). And there is no difference
among the "middle sequences".
But you did not ask: what are the odds of selecting an "end sequence"
v. a "middle sequenece"? You asked: what are the odds of selecting
any sequence?
Perhaps an excercise with 4 dice will help you understand.
There are 6-2+1 = 5 sequences of 2, namely: 6-5, 5-4, 4-3, 3-2 and
2-1.
The number of combinations with a sequence of __at_least__ 2 is
5*COMBIN(4,2) = 30.
The number of combinations with a sequence of __exactly__ 2 is
2*COMBIN(3,2)+3*COMBIN(2,2) = 9. We can enumerate the 9:
end sequences: middle sequences:
6-5-3-2 5-4-2-1
6-5-3-1
6-5-2-1 4-3-6-1
2-1-6-5 3-2-6-5
2-1-6-4
2-1-5-4
-----
The VBA macros below count all the possible combinations with a
consecutive sequence of at least and exactly 4.
The output from atleast4() is:
4: 990
45540
Interpretation.... For the sequence starting with 4 (4,3,2,1), there
are 990 combinations. The same for all other sequences, since no
others are shown. The total number is 45540.
The output from exactly4() is:
4: 946
5: 903
49: 946
41624
Interpretation.... For the sequence starting with 4 (4,3,2,1) and 49
(49,48,47,46), there are 946 combinations each. For the sequence
starting with 5 (5,4,3,2), there are 903 combinations. For all other
sequences, the number of combinations is the same as for 5,4,3,2
(903), since no others are shown. The total number is 41624.
------
Option Explicit
Sub atleast4()
Dim i As Long, j As Long, k As Long, n As Long
Dim m As Long, m0 As Long, s As String
'n counts total combinations
n = 0: m0 = 0
For i = 4 To 49
'the consecutive sequence is i-3 to i
'm counts combinations for each sequence
m = 0
For j = 1 To 48
If j < i - 3 Or j > i Then
For k = j + 1 To 49
If k < i - 3 Or k > i Then n = n + 1: m = m + 1
Next
End If
Next
'm0 is the previous m
If m <> m0 Then s = s & i & ": " & m & Chr(10)
m0 = m
Next
MsgBox s & n
End Sub
Sub exactly4()
Dim i As Long, j As Long, k As Long, n As Long
Dim m As Long, m0 As Long, s As String
'n counts total combinations
n = 0: m0 = 0
For i = 4 To 49
'the consecutive sequence is i-3 to i
'm counts combinations for each sequence
m = 0
For j = 1 To 48
If j < i - 3 Or j > i Then
For k = j + 1 To 49
If k < i - 3 Or k > i Then
'exclude consecutive sequences > 4
If Not (j = i - 4 Or k = i - 4 Or _
j = i + 1 Or k = i + 1) _
Then n = n + 1: m = m + 1
End If
Next
End If
Next
'm0 is the previous m
If m <> m0 Then s = s & i & ": " & m & Chr(10)
m0 = m
Next
MsgBox s & n
End Sub