Open Side Menu Go to the Top
Register
Probability of a Complete Range after N Hands Probability of a Complete Range after N Hands

09-03-2018 , 12:22 AM
This could be generalized to any discrete data set, but I'll just refer to poker hands here.

After seeing n random two card hands, what is the probability that I have seen every hand in an unknown range?

For an example:

Someone is dealt two cards. Sometimes he mucks his hand and sometimes he exposes them. He always takes the same action with any specific strategically unique hand. What is the probability that I know his action for each of the 169 possible two card combinations after n dealt hands?

This is probably not hard to answer with a simulation. Do we need to assume a prior distribution? I'd be most interested in a mathematical approach since I could probably program a simulation myself pretty easily. I'm not sure how to approach the problem mathematically.
Probability of a Complete Range after N Hands Quote
09-03-2018 , 04:43 AM
See the Coupon Collector Problem. There is a formula to solve this for any size set.
Probability of a Complete Range after N Hands Quote
09-05-2018 , 03:21 PM
Quote:
See the Coupon Collector Problem.
If one takes all 169 starting hands as equally likely (which, of course, they aren't..but which should be enough to give us a ballpark figure) then the expected value comes out to roughly 960 hands.
(169* 169th Harmonic number)

Of course, if his strategy is "always expose" you don't need an expected value
Probability of a Complete Range after N Hands Quote
09-05-2018 , 05:22 PM
Quote:
Originally Posted by antialias
If one takes all 169 starting hands as equally likely (which, of course, they aren't.
You can easily weight them by their expected frequency to calculate an accurate answer.

Pairs 78/1326
Suited non-pairs 312/1326
Offsuit non-pairs 936/1326
Probability of a Complete Range after N Hands Quote
09-05-2018 , 07:13 PM
Sorry I haven't popped back in. I looked up the coupon collector problem and found that 960 hands estimate also. However, the problem is a bit more nuanced since we don't know the size of the set we're "collecting," isn't it?
Probability of a Complete Range after N Hands Quote
09-05-2018 , 08:52 PM
Quote:
Originally Posted by browni3141
Sorry I haven't popped back in. I looked up the coupon collector problem and found that 960 hands estimate also. However, the problem is a bit more nuanced since we don't know the size of the set we're "collecting," isn't it?
You'll have to pick one and refine your guess based on the hands you've seen. You will never know for sure a villain's exact range.
Probability of a Complete Range after N Hands Quote
09-05-2018 , 11:42 PM
Quote:
Originally Posted by NewOldGuy
You'll have to pick one and refine your guess based on the hands you've seen. You will never know for sure a villain's exact range.
Right, but we're never guaranteed to have seen a complete range over a finite number of hands even if we know what it is. I'm interested in knowing how many hands are needed to have 50%, 90%, 95% etc. confidence that the range is complete.

We shouldn't have to pick a range. If we go 10000 hands without seeing any new hands, we can be pretty confident the range is complete without having a prior assumption of what the range is.

Actually, we do need to assume a prior distribution. In this case I would just assume that all villain ranges are equiprobable.

Last edited by browni3141; 09-05-2018 at 11:48 PM.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 08:02 AM
Quote:
Originally Posted by browni3141
Right, but we're never guaranteed to have seen a complete range over a finite number of hands even if we know what it is. I'm interested in knowing how many hands are needed to have 50%, 90%, 95% etc. confidence that the range is complete.
There are ways to do this but they are difficult calculations.
https://www.google.com/search?q=coup...dence+interval

People have written their PhD thesis on this exact problem.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 09:46 AM
Quote:
I'm interested in knowing how many hands are needed to have 50%, 90%, 95% etc. confidence that the range is complete.
Well, the 960 value is your E(x)...so this gives you a 50% certainty.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 02:36 PM
That's not true and it is not what he asked.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 03:11 PM
Quote:
Originally Posted by antialias
Well, the 960 value is your E(x)...so this gives you a 50% certainty.
Quote:
Originally Posted by whosnext
That's not true and it is not what he asked.
Hmm, I think it is true assuming equal frequencies (just as a math exercise). If the average number of trials to obtain all coupons is 960, then after 960 trials you have a 50% chance to have completed the set. Is that not correct?
Probability of a Complete Range after N Hands Quote
09-06-2018 , 05:01 PM
I was thinking of mean vs. median.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 07:09 PM
It's been awhile since I worked with problems related to the coupon-collector problem. I believe the distribution of collection times is a combination of various geometric distributions and itself is not from a common distribution family. I think the distribution values (as a formula) may be available.

Since this is fairly easy to do, and in the absence of such distribution formulas, I ran a simulation of 1 million trials of the equal-probability coupon collector case with 10 items. I chose 10 so that the simulation would not take very long. Maybe I'll do the same thing for 169 but the time it will take will be much longer and presenting all the output will be more arduous.

Note EV(number of selections to select all 10) = 10*H(10) = 29.28968

Number of Selections RequiredTallyCumulative Tally
1
0
0
2
0
0
3
0
0
4
0
0
5
0
0
6
0
0
7
0
0
8
0
0
9
0
0
10
328
328
11
1699
2027
12
4267
6294
13
8146
14440
14
13003
27443
15
18629
46072
16
24322
70394
17
29475
99869
18
34734
134603
19
38587
173190
20
41420
214610
21
43791
258401
22
44498
302889
23
45066
347965
24
44679
392644
25
43444
436088
26
42569
478657
27
40356
519013
28
39047
558060
29
36782
594842
30
34464
629306
31
32324
661630
32
29856
691486
33
27476
718962
34
25584
744546
35
23211
767757
36
21372
789129
37
19857
808986
38
17921
826907
39
16266
843173
40
14865
858038
41
13732
871770
42
12396
884166
43
11031
895197
44
10294
905491
45
9123
914614
46
8346
922960
47
7525
930485
48
6900
937385
49
6017
943402
50
5569
948971
51
5082
954053
52
4563
958616
53
4073
962689
54
3743
966432
55
3369
969801
56
3011
972812
57
2732
975544
58
2417
977961
59
2202
980163
60
2039
982202
61
1798
984000
62
1569
985569
63
1389
986958
64
1220
988178
65
1209
989387
66
1110
990497
67
959
991456
68
825
992281
69
801
993082
70
696
993778
71
601
994379
72
558
994937
73
492
995429
74
451
995880
75
370
996250
76
378
996628
77
352
996980
78
288
997268
79
248
997516
80
260
997776
81
225
998001
82
198
998199
83
204
998403
84
151
998554
85
120
998674
86
130
998804
87
136
998940
88
118
999058
89
93
999151
90
82
999233
91
67
999300
92
67
999367
93
68
999435
94
62
999497
95
51
999548
96
52
999600
97
31
999631
98
34
999665
99
38
999703
100
29
999732
101
23
999755
102
25
999780
103
15
999795
104
24
999819
105
17
999836
106
21
999857
107
14
999871
108
18
999889
109
13
999902
110
10
999912
111
9
999921
112
5
999926
113
4
999930
114
5
999935
115
8
999943
116
6
999949
117
3
999952
118
9
999961
119
4
999965
120
4
999969
121
4
999973
122
1
999974
123
2
999976
124
0
999976
125
3
999979
126
5
999984
127
3
999987
128
1
999988
129
1
999989
130
2
999991
131
1
999992
132
0
999992
133
1
999993
134
1
999994
135
0
999994
136
0
999994
137
1
999995
138
1
999996
139
1
999997
140
0
999997
141
0
999997
142
1
999998
143
0
999998
144
1
999999
145
0
999999
146
0
999999
147
0
999999
148
0
999999
149
0
999999
150
0
999999
151
0
999999
152
0
999999
153
0
999999
154
0
999999
155
1
1000000

Obviously, any pertinent cumulative percentiles can be easily read off the table.

Last edited by whosnext; 09-06-2018 at 07:30 PM.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 07:43 PM
I am dusting off some cobwebs in that part of my brain devoted to information on the coupon-collector problem. As we know, the problem is typically presented and fairly easily solved assuming all the items have identical probabilities of being selected.

The unequal-probability case is more challenging. The formula for the Expected Number of Required Selections, given below, is a trifle daunting. And, I believe, it is beyond even high-speed computer's capability to solve for large numbers of items.

Let there by M items with probability of selection being Pi (for i=1 to M). Then:

EV = {Sum[Q=1 to M-1] (-1)^(M-1-Q) * Sum[|J|=Q] 1/(1 - Sum[j in J] Pj)} + (-1)^(M-1)

If I remember correctly, if there are a small number of "classes" in which items may belong, I think there is a way to calculate the expected value via the formula using partitions and such.

There may be some value in running a simulation of the 169 2-card poker hands using their correct probabilities (given above by NOG) and comparing the results to the case assuming equal probabilities. I have given this virtually zero thought but my first guess would be that the unequal-probability EV would be larger than the equal-probabiity EV.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 08:12 PM
Quote:
Originally Posted by whosnext
It's been awhile since I worked with problems related to the coupon-collector problem. I believe the distribution of collection times is a combination of various geometric distributions and itself is not from a common distribution family. I think the distribution values (as a formula) may be available.

Since this is fairly easy to do, and in the absence of such distribution formulas, I ran a simulation of 1 million trials of the equal-probability coupon collector case with 10 items. I chose 10 so that the simulation would not take very long. Maybe I'll do the same thing for 169 but the time it will take will be much longer and presenting all the output will be more arduous.

Note EV(number of selections to select all 10) = 10*H(10) = 29.28968
Obviously, any pertinent cumulative percentiles can be easily read off the table.
May I ask what language you are using? I programmed the same sim in C++ and it takes two seconds for 10 coupons. For 169 coupons it takes about 39 seconds (with part of that time just being output of the table).
Probability of a Complete Range after N Hands Quote
09-06-2018 , 08:23 PM
Quote:
Originally Posted by browni3141
May I ask what language you are using? I programmed the same sim in C++ and it takes two seconds for 10 coupons. For 169 coupons it takes about 39 seconds (with part of that time just being output of the table).
He was collecting the full set of all 10 coupons 1 million times. How many times did you collect them?
Probability of a Complete Range after N Hands Quote
09-06-2018 , 08:27 PM
Quote:
Originally Posted by NewOldGuy
He was collecting the full set of all 10 coupons 1 million times. How many times did you collect them?
1 million... I said the same sim. I could have made a mistake, but I get roughly the same output as him.

In the past I've always been suspicious of whosnext's reports of how long his simulations take. Since this one was very easy for me to implement myself I thought I'd double-check his results.

I am not a tech guy so I don't know everything that contributes to the speed of a program, but I use C++ on a laptop which cost about $300 about 3-4 years ago.
Probability of a Complete Range after N Hands Quote
09-06-2018 , 11:11 PM
EV of the unequal (true) probability case of the 169 2-card poker hands is around 1646, much higher than the EV of the case assuming equal probabilities of 965.

I guess it is obvious that the unequal probability case will typically require more selections as unequal means that there will be many low probability items (e.g., suited hands).
Probability of a Complete Range after N Hands Quote

      
m