git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] describe-doc: clarify default length of abbreviation

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 16, 2021, 21:07 UTC
Message-ID
<CAMP44s3AKCTjHshRz7Nc4KzSj3orBrrV24V1tb1gs3=Yh=PhSA@mail.gmail.com>
In-Reply-To
<7ab75f6a-14a8-1aa7-ad0-20f484e2c8@crashcourse.ca>
On Sun, May 16, 2021 at 2:00 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> On Sun, 16 May 2021, Felipe Contreras wrote:
> > Bagas Sanjaya wrote:
Show 11 quoted lines
> > > 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_problem
>
>   i'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
Previous: Robert P. J. DayNext: Anders Höckersten via GitGitGadget
Message 9 of 11 in “describe-doc: clarify default length of abbreviation”
  1. describe-doc: clarify default length of abbreviationAnders Höckersten via GitGitGadget, May 16, 2021
  2. Junio C HamanoMay 16, 2021
  3. Bagas SanjayaMay 16, 2021
  4. Anders HöckerstenMay 16, 2021
  5. Junio C HamanoMay 16, 2021
  6. Anders HöckerstenMay 17, 2021
  7. Felipe ContrerasMay 16, 2021
  8. Robert P. J. DayMay 16, 2021
  9. Felipe ContrerasMay 16, 2021
  10. describe-doc: clarify default length of abbreviationAnders Höckersten via GitGitGadget, May 17, 2021
  11. Derrick StoleeMay 17, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.