We decide to play the following game: An integer N will be randomly selected from the interval 0 - 100, inclusive. You try to guess N. After each guess, I tell you whether N is higher or lower than your guess.
If you successfully guess the integer, you win N dollars. Each guess costs you K dollars.
For each of the variants (a) and (b) below, what is the maximum value of K for which you'd be willing to play this game? Which strategy would you use to try to maximize your winnings in the long run?
(a) Once you start a round, you must continue until you guess N exactly.
(b) You may stop playing a round if you determine that N is too small to keep paying more money to guess N exactly. The money you've already spent on guesses is lost, but you may then start a new round with a new N.
Here are the reasonable best guesses when it turns out the N is the one given in the first column, together with the number of guesses thus expended:
N best guesses number of
guesses
0 50 24 11 5 2 0 6
1 50 24 11 5 2 0 1 7
2 50 24 11 5 2 5
3 50 24 11 5 2 3 6
4 50 24 11 5 2 3 4 7
5 50 24 11 5 4
6 50 24 11 5 8 6 6
7 50 24 11 5 8 6 7 7
8 50 24 11 5 8 5
9 50 24 11 5 8 9 6
10 50 24 11 5 8 9 10 7
11 50 24 11 3
12 50 24 11 17 14 12 6
13 50 24 11 17 14 12 13 7
14 50 24 11 17 14 5
15 50 24 11 17 14 15 6
16 50 24 11 17 14 15 16 7
17 50 24 11 17 4
18 50 24 11 17 20 18 6
19 50 24 11 17 20 18 19 7
20 50 24 11 17 20 5
21 50 24 11 17 20 22 21 7
22 50 24 11 17 20 22 6
23 50 24 11 17 20 22 23 7
24 50 24 2
25 50 24 37 30 27 25 6
26 50 24 37 30 27 25 26 7
27 50 24 37 30 27 5
28 50 24 37 30 27 28 6
29 50 24 37 30 27 28 29 7
30 50 24 37 30 4
31 50 24 37 30 33 31 6
32 50 24 37 30 33 31 32 7
33 50 24 37 30 33 5
34 50 24 37 30 33 35 34 7
35 50 24 37 30 33 35 6
36 50 24 37 30 33 35 36 7
37 50 24 37 3
38 50 24 37 43 40 38 6
39 50 24 37 43 40 38 39 7
40 50 24 37 43 40 5
41 50 24 37 43 40 41 6
42 50 24 37 43 40 41 42 7
43 50 24 37 43 4
44 50 24 37 43 46 44 6
45 50 24 37 43 46 44 45 7
46 50 24 37 43 46 5
47 50 24 37 43 46 48 47 7
48 50 24 37 43 46 48 6
49 50 24 37 43 46 48 49 7
50 50 1
51 50 75 62 56 53 51 6
52 50 75 62 56 53 51 52 7
53 50 75 62 56 53 5
54 50 75 62 56 53 54 6
55 50 75 62 56 53 54 55 7
56 50 75 62 56 4
57 50 75 62 56 59 57 6
58 50 75 62 56 59 57 58 7
59 50 75 62 56 59 5
60 50 75 62 56 59 60 6
61 50 75 62 56 59 60 61 7
62 50 75 62 3
63 50 75 62 68 65 63 6
64 50 75 62 68 65 63 64 7
65 50 75 62 68 65 5
66 50 75 62 68 65 66 6
67 50 75 62 68 65 66 67 7
68 50 75 62 68 4
69 50 75 62 68 71 69 6
70 50 75 62 68 71 69 70 7
71 50 75 62 68 71 5
72 50 75 62 68 71 73 72 7
73 50 75 62 68 71 73 6
74 50 75 62 68 71 73 74 7
75 50 75 2
76 50 75 88 81 78 76 6
77 50 75 88 81 78 76 77 7
78 50 75 88 81 78 5
79 50 75 88 81 78 79 6
80 50 75 88 81 78 79 80 7
81 50 75 88 81 4
82 50 75 88 81 84 82 6
83 50 75 88 81 84 82 83 7
84 50 75 88 81 84 5
85 50 75 88 81 84 86 85 7
86 50 75 88 81 84 86 6
87 50 75 88 81 84 86 87 7
88 50 75 88 3
89 50 75 88 94 91 89 6
90 50 75 88 94 91 89 90 7
91 50 75 88 94 91 5
92 50 75 88 94 91 92 6
93 50 75 88 94 91 92 93 7
94 50 75 88 94 4
95 50 75 88 94 97 95 6
96 50 75 88 94 97 95 96 7
97 50 75 88 94 97 5
98 50 75 88 94 97 99 98 7
99 50 75 88 94 97 99 6
100 50 75 88 94 97 99 100 7
The average number of guesses is 5.81188118811881. That's divided into the $50 average prize to give you the $8.603066439523 fair value of K. $8.60 or less will favor you. Anything higher and it would not be worth your while to play.
DefDbl A-Z
Dim crlf$
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
End Function
Private Sub Form_Load()
Text1.Text = ""
crlf$ = Chr(13) + Chr(10)
Form1.Visible = True
DoEvents
For N = 0 To 100
highest = 100
lowest = 0
gct = 0
Text1.Text = Text1.Text & mform(N, "##0 ") & " "
Do
guess = Int((highest + lowest) / 2)
Text1.Text = Text1.Text & mform(guess, "##0 ")
gct = gct + 1
If guess = N Then Exit Do
If guess < N Then lowest = guess + 1 Else highest = guess - 1
DoEvents
Loop
trials = trials + 1
gct2 = gct2 + gct
Text1.Text = Text1.Text & Space$(4 * (7 - gct))
Text1.Text = Text1.Text & mform(gct, "####0") & crlf$
Next
Text1.Text = Text1.Text & Str(gct2 / trials) & " "
Text1.Text = Text1.Text & Str(50 / (gct2 / trials))
End Sub
|
Posted by Charlie
on 2014-05-17 01:35:39 |