Dataset Viewer
Auto-converted to Parquet Duplicate
puzzle
stringclasses
4 values
parameters
unknown
value
float64
0
2.1M
exact
stringlengths
1
26
⌀
note
stringclasses
4 values
heads_in_a_row
{ "n": 1, "p_heads": "1/2" }
2
2
expected flips until n heads in a row
heads_in_a_row
{ "n": 2, "p_heads": "1/2" }
6
6
expected flips until n heads in a row
heads_in_a_row
{ "n": 3, "p_heads": "1/2" }
14
14
expected flips until n heads in a row
heads_in_a_row
{ "n": 4, "p_heads": "1/2" }
30
30
expected flips until n heads in a row
heads_in_a_row
{ "n": 5, "p_heads": "1/2" }
62
62
expected flips until n heads in a row
heads_in_a_row
{ "n": 6, "p_heads": "1/2" }
126
126
expected flips until n heads in a row
heads_in_a_row
{ "n": 7, "p_heads": "1/2" }
254
254
expected flips until n heads in a row
heads_in_a_row
{ "n": 8, "p_heads": "1/2" }
510
510
expected flips until n heads in a row
heads_in_a_row
{ "n": 9, "p_heads": "1/2" }
1,022
1022
expected flips until n heads in a row
heads_in_a_row
{ "n": 10, "p_heads": "1/2" }
2,046
2046
expected flips until n heads in a row
heads_in_a_row
{ "n": 11, "p_heads": "1/2" }
4,094
4094
expected flips until n heads in a row
heads_in_a_row
{ "n": 12, "p_heads": "1/2" }
8,190
8190
expected flips until n heads in a row
heads_in_a_row
{ "n": 13, "p_heads": "1/2" }
16,382
16382
expected flips until n heads in a row
heads_in_a_row
{ "n": 14, "p_heads": "1/2" }
32,766
32766
expected flips until n heads in a row
heads_in_a_row
{ "n": 15, "p_heads": "1/2" }
65,534
65534
expected flips until n heads in a row
heads_in_a_row
{ "n": 16, "p_heads": "1/2" }
131,070
131070
expected flips until n heads in a row
heads_in_a_row
{ "n": 17, "p_heads": "1/2" }
262,142
262142
expected flips until n heads in a row
heads_in_a_row
{ "n": 18, "p_heads": "1/2" }
524,286
524286
expected flips until n heads in a row
heads_in_a_row
{ "n": 19, "p_heads": "1/2" }
1,048,574
1048574
expected flips until n heads in a row
heads_in_a_row
{ "n": 20, "p_heads": "1/2" }
2,097,150
2097150
expected flips until n heads in a row
heads_in_a_row
{ "n": 1, "p_heads": "3/5" }
1.666667
5/3
expected flips until n heads in a row
heads_in_a_row
{ "n": 2, "p_heads": "3/5" }
4.444444
40/9
expected flips until n heads in a row
heads_in_a_row
{ "n": 3, "p_heads": "3/5" }
9.074074
245/27
expected flips until n heads in a row
heads_in_a_row
{ "n": 4, "p_heads": "3/5" }
16.790123
1360/81
expected flips until n heads in a row
heads_in_a_row
{ "n": 5, "p_heads": "3/5" }
29.650206
7205/243
expected flips until n heads in a row
heads_in_a_row
{ "n": 6, "p_heads": "3/5" }
51.083676
37240/729
expected flips until n heads in a row
heads_in_a_row
{ "n": 7, "p_heads": "3/5" }
86.806127
189845/2187
expected flips until n heads in a row
heads_in_a_row
{ "n": 8, "p_heads": "3/5" }
146.343545
960160/6561
expected flips until n heads in a row
heads_in_a_row
{ "n": 9, "p_heads": "3/5" }
245.572575
4833605/19683
expected flips until n heads in a row
heads_in_a_row
{ "n": 10, "p_heads": "3/5" }
410.954292
24266440/59049
expected flips until n heads in a row
heads_in_a_row
{ "n": 11, "p_heads": "3/5" }
686.590487
121627445/177147
expected flips until n heads in a row
heads_in_a_row
{ "n": 12, "p_heads": "3/5" }
1,145.984145
609022960/531441
expected flips until n heads in a row
heads_in_a_row
{ "n": 13, "p_heads": "3/5" }
1,911.640242
3047772005/1594323
expected flips until n heads in a row
heads_in_a_row
{ "n": 14, "p_heads": "3/5" }
3,187.733736
15246831640/4782969
expected flips until n heads in a row
heads_in_a_row
{ "n": 15, "p_heads": "3/5" }
5,314.556227
76258073045/14348907
expected flips until n heads in a row
heads_in_a_row
{ "n": 16, "p_heads": "3/5" }
8,859.260378
381362109760/43046721
expected flips until n heads in a row
heads_in_a_row
{ "n": 17, "p_heads": "3/5" }
14,767.10063
1907025782405/129140163
expected flips until n heads in a row
heads_in_a_row
{ "n": 18, "p_heads": "3/5" }
24,613.50105
9535774612840/387420489
expected flips until n heads in a row
heads_in_a_row
{ "n": 19, "p_heads": "3/5" }
41,024.168417
47680810166645/1162261467
expected flips until n heads in a row
heads_in_a_row
{ "n": 20, "p_heads": "3/5" }
68,375.280695
238409862140560/3486784401
expected flips until n heads in a row
coupon_collector
{ "n": 1 }
1
1
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 2 }
3
3
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 3 }
5.5
11/2
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 4 }
8.333333
25/3
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 5 }
11.416667
137/12
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 6 }
14.7
147/10
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 7 }
18.15
363/20
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 8 }
21.742857
761/35
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 9 }
25.460714
7129/280
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 10 }
29.289683
7381/252
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 11 }
33.218651
83711/2520
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 12 }
37.238528
86021/2310
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 13 }
41.341739
1145993/27720
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 14 }
45.521873
1171733/25740
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 15 }
49.773435
1195757/24024
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 16 }
54.091664
2436559/45045
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 17 }
58.472393
42142223/720720
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 18 }
62.911945
42822903/680680
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 19 }
67.407053
275295799/4084080
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 20 }
71.954793
279175675/3879876
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 21 }
76.552533
56574159/739024
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 22 }
81.197892
19093197/235144
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 23 }
85.888705
444316699/5173168
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 24 }
90.622996
1347822955/14872858
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 25 }
95.398954
34052522467/356948592
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 26 }
100.214913
34395742267/343219800
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 27 }
105.069332
312536252003/2974571600
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 28 }
109.960789
315404588903/2868336900
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 29 }
114.88796
9227046511387/80313433200
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 30 }
119.849614
9304682830147/77636318760
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 31 }
124.844601
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 32 }
129.871846
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 33 }
134.930341
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 34 }
140.01914
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 35 }
145.13735
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 36 }
150.284131
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 37 }
155.45869
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 38 }
160.660277
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 39 }
165.888179
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 40 }
171.141722
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 41 }
176.420265
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 42 }
181.723198
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 43 }
187.049941
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 44 }
192.399939
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 45 }
197.772665
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 46 }
203.167613
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 47 }
208.584301
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 48 }
214.022264
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 49 }
219.481062
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 50 }
224.960267
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 51 }
230.459472
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 52 }
235.978285
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 53 }
241.516329
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 54 }
247.073241
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 55 }
252.648672
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 56 }
258.242284
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 57 }
263.853753
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 58 }
269.482766
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 59 }
275.129021
null
expected draws to see all n equally likely coupons
coupon_collector
{ "n": 60 }
280.792225
null
expected draws to see all n equally likely coupons
End of preview. Expand in Data Studio

Probability puzzle values

I put this together because I kept recomputing the same numbers when checking answers to classic probability puzzles, the ones that turn up again and again in quant interviews. There are 250 rows across four puzzles, and every value was generated by code, with exact fractions wherever the answer is rational.

The first puzzle is the expected number of flips until you see n heads in a row, for n from 1 to 20. I've included a fair coin and a coin that lands heads 3/5 of the time, so you'll see that three in a row takes 14 flips with the fair one and 245/27 (about 9.07) with the biased one.

The coupon collector rows probably need the least explanation, since they simply tell you how many draws you should expect before you've seen all n coupons, for n up to 100. You'd need 14.7 rolls on average to see every face of a die, and I've kept the exact fraction for every n up to 30.

The birthday rows give you the chance that at least two of n people share a birthday when there are 365 days to choose from. You'll notice it first passes a half at 23 people (about 50.73%), which I think still surprises most people the first time they see it.

The last puzzle asks how many uniform draws between 0 and 1 you'd expect to make before the running total passes t. I've listed t from 0.25 up to 10 in steps of a quarter, and at t = 1 you'll find the answer is e.

Each row gives you the puzzle name, its parameters, the value as a decimal and the exact value as a string whenever there is one. There's also a short note (usually a single line) saying what the number means. I've checked the uniform sum figures against a simulation of 400,000 runs at several thresholds, and the other values come straight from their recursions in exact arithmetic.

If you're preparing for a quant interview, there are probability questions with worked answers at https://academicquant.co.uk/quant-questions-probability?utm_source=huggingface&utm_medium=post&utm_campaign=hf-probability-puzzle-values

Downloads last month
-