2 ms·
Here’s an example where I ran into this recently. Let’s say we play a “game”. Draw a random number A between 0 and 1 (uniform distribution). Now draw a second
by janalsncm 2y ago
Here’s an example where I ran into this recently.
Let’s say we play a “game”. Draw a random number A between 0 and 1 (uniform distribution). Now draw a second number B from the same distribution. If A > B, draw B again (A remains). What is the average number of draws required? (In other words, what is the average “win streak” for A?)
The answer is infinity. The reason is, some portion of the time A will be extremely high and take millions of draws to beat.
- zzazzdsa 2y agoDoes this really require stochastic calculus to prove? This should just be a standard integration, based on the fact that the expected number of samples required for fixed A being 1/(1-A).
- RandomBK 2y agoThe way the question was framed, it was ambiguous whether "draw again" only applied to B, or whether A would draw again as well. I'm assuming the 'infinity' answer applies only to the former case?
- janalsncm 2y agoSorry, we only draw B again.
- deleted 2y ago[deleted]
- drdeca 2y agoShowing the calculation you described: If p is the value drawn for A, then each time B is drawn, the probability that B>A is (1-p), So, the chance that B is drawn n times before being less than or equal to A is, p^(n-1) (1-p) (a geometric distribution). The expected number of draws is then (1/p) . Then, E[draws] = E[E[draws|A=p]] = \int_0^1 E[draws|A=p] dp = \int_0^1 (1/p) dp, which diverges to infinity (as you said). (I wasn’t doubting you, I just wanted to see the calculation.)
- joncrocks 2y agoFor anyone interested, I think this is an example of the https://en.wikipedia.org/wiki/St._Petersburg_paradox https://en.wikipedia.org/wiki/St._Petersburg_paradox