Download README.md from academicquant/probability-puzzle-values: direct link, hf CLI and curl.
- Browser
- Download file 2.28 kB
-
https://huggingface.co/datasets/academicquant/probability-puzzle-values/resolve/main/README.md
- Command line
-
hf download hf://datasets/academicquant/probability-puzzle-values/README.md
-
curl -L -o README.md https://huggingface.co/datasets/academicquant/probability-puzzle-values/resolve/main/README.md
license: cc-by-4.0
language:
- en
task_categories:
- question-answering
tags:
- probability
- quant-interview
- expected-value
- puzzles
pretty_name: Probability puzzle values
size_categories:
- n<1K
configs:
- config_name: default
data_files: values.jsonl
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