Re: [PATCH] describe-doc: clarify default length of abbreviation
From: Felipe Contreras <hidden>
Date: 2021-05-16 21:09:39
On Sun, May 16, 2021 at 2:00 PM Robert P. J. Day [off-list ref] wrote:
On Sun, 16 May 2021, Felipe Contreras wrote:quoted
Bagas Sanjaya wrote:
quoted
quoted
What is the birthday paradox then?It's a probability fact that goes against common sense. In a romm with 23 people you are 50% likely to find two people with the same birthday. https://en.wikipedia.org/wiki/Birthday_problemi've had to explain the logic behind this to people who really have a tough time understanding this, and it's a concept that applies in a lot of places (surprisingly).
Indeed. Very very few people actually understand probability. Any
intuition you have is almost always wrong. Even professional
probabilists get probability wrong consistently.
I've found it's safer and easier to not trust my intuition, write
code, and that way get the probability (also called Monte Carlo
method).
I have a git repository with tricky simulations and I actually had
written one for the birthday paradox, but I had not pushed it. Now I
have [1].
The actual code is just two lines:
birthdays = Array.new($n) { rand(365.25) }
birthdays.any? { |e| birthdays.count(e) > 1 }
Yet our brain somehow has trouble figuring out the approximate result
of that computation.
Cheers.
[1] https://github.com/felipec/simulation/blob/master/examples/birthday
--
Felipe Contreras