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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 16, 2021 at 2:00 PM Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
> On Sun, 16 May 2021, Felipe Contreras wrote:
> > Bagas Sanjaya wrote:

> > > 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux