You throw a perfect die (digits 1 to 6), adding up the results until the total score is over N.
What’s your estimate of the most likely final sum?
Please write down your guess prior to analytical evaluation or simulation.
A simulation shows that as n gets larger, the expected total seems to approach something like n + 2+2/3, after having reached a low of about n+2.5.
1 4.0717
2 4.7447
3 5.5517
4 6.4966
5 7.5902
6 8.8285
7 9.7051
8 10.6587
9 11.6438
10 12.6341
10 12.6727
20 22.6734
30 32.6407
40 42.6718
50 52.667
60 62.6828
70 72.6808
80 82.6777
90 92.694
100 102.6474
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
tr0 = 10000
For n = 1 To 10
tosses = 0: overtot = 0
For tr = 1 To tr0
tot = 0
Do
tot = tot + Int(6 * Rnd(1) + 1)
Loop Until tot > n
overtot = overtot + tot
Next tr
avrg = overtot / tr0
Text1.Text = Text1.Text & n & Str(avrg) & crlf
Next n
Text1.Text = Text1.Text & crlf
For n = 10 To 100 Step 10
tosses = 0: overtot = 0
For tr = 1 To tr0
tot = 0
Do
tot = tot + Int(6 * Rnd(1) + 1)
Loop Until tot > n
overtot = overtot + tot
Next tr
avrg = overtot / tr0
Text1.Text = Text1.Text & n & Str(avrg) & crlf
Next n
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2016-04-18 09:01:29 |