maybe like this?
Sub streak()
Const rerun = 10 ^ 6 'number of times to rerun experiment
Const n& = 82 'number of games per season
Dim a() As Boolean, i&, j&, c&
Randomize
For j = 1 To rerun
ReDim a(1 To n)
For i = 1 To n
If Rnd < 0.25 Then a(i) = True 'if lose then boolean=true
If i > 1 Then
If (a(i)) * (a(i - 1)) Then c = c + 1: Exit For
'c=number of times lose 2 (or more) games in a row
End If
Next i
Next j
MsgBox "Probability never lose 2 (or more) games in a row is:" & vbLf & _
Format(1 - c / rerun, "0.00%")
End Sub
Bookmarks