KevinAA
KevinAA
  • Threads: 18
  • Posts: 283
Joined: Jul 6, 2017
March 25th, 2019 at 11:00:12 PM permalink
I know of someone who believes the dealer manipulates the wheel and ball spin to produce duplicates. He says there is no way that a number can appear on the board 3 times, or two numbers on the board twice each (or certainly both) without the dealer manipulating the wheel and ball spin. I say this is bogus but I would like to have probabilities (if they aren't that low, which I suspect) to prove him wrong.

With a history of the last 16 numbers, what is the probability of:

a) one number appearing 3 times
b) two numbers each appearing twice
c) both a) and b), one number appears 3 times and two other numbers appear twice

thanks
EvenBob
EvenBob
  • Threads: 441
  • Posts: 28669
Joined: Jul 18, 2010
March 25th, 2019 at 11:52:57 PM permalink
Quote: KevinAA

. He says there is no way that a number can appear on the board 3 times,



Why is that. Ask him, he won't have
an answer. A practiced dealer might
be able to hit a specific section if
the conditions are right. Hitting
specific numbers consistently is
impossible.

For years I had a 24" wheel like
this one, and I hit the same
number 2 times in a row all
the time, and even 3 in a row
a few times. It's random, the
ball has no memory.

"It's not called gambling if the math is on your side."
Nathan
Nathan
  • Threads: 66
  • Posts: 3729
Joined: Sep 2, 2016
Thanked by
CyrusV
March 26th, 2019 at 2:43:50 AM permalink
Quote: KevinAA

I know of someone who believes the dealer manipulates the wheel and ball spin to produce duplicates. He says there is no way that a number can appear on the board 3 times, or two numbers on the board twice each (or certainly both) without the dealer manipulating the wheel and ball spin. I say this is bogus but I would like to have probabilities (if they aren't that low, which I suspect) to prove him wrong.

With a history of the last 16 numbers, what is the probability of:

a) one number appearing 3 times
b) two numbers each appearing twice
c) both a) and b), one number appears 3 times and two other numbers appear twice

thanks



On both my Roulette App and in real life Roulette, I have had the triple number Combo happen. On my Roulette App. 21 21 21. 21 21 21. Separate times. In real life. 5 5 5. 5 5 5. Separate times. :) I'm with your friend on this one. :)
In both The Hunger Games and in gambling, may the odds be ever in your favor. :D "Man Babes" #AxelFabulous "Olive oil is processed but it only has one ingredient, olive oil."-Even Bob, March 27/28th. :D The 2 year war is over! Woo-hoo! :D I sometimes speak in metaphors. ;) Remember this. ;) Crack the code. :D 8.9.13.25.14.1.13.5.9.19.14.1.20.8.1.14! :D "For about the 4096th time, let me offer a radical idea to those of you who don't like Nathan -- block her and don't visit Nathan's Corner. What is so complicated about it?" Wizard, August 21st. :D
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 26th, 2019 at 1:16:24 PM permalink
Quote: KevinAA

With a history of the last 16 numbers, what is the probability of:
edit
see below post

Last edited by: 7craps on Mar 26, 2019
winsome johnny (not Win some johnny)
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6272
Joined: Jun 22, 2011
Thanked by
7craps
March 26th, 2019 at 5:56:52 PM permalink
It looks like you would have to jump through some hoops to get a calculated answer, but I did some quick simulations, and after 25 million runs of 16 spins (on a double-zero) wheel, I got a surprising answer:

You get at least one number showing up three or more times 27.5% of the time

You get at least two numbers showing up two or more times 81.8% of the time

You get both in the same 16 spins 24.7% of the time
(Clarification: this is the probability of one number appearing three or more times and another appearing at least twice)

That first number looks a little high to me...
The second one, however, makes a little sense; even if the first 14 spins are 14 different numbers, the probability of the 15th spin matching one of them is 7/19, or about 37%, and the probability of the last number matching any of the other 13 is 13/38.
Last edited by: ThatDonGuy on Mar 26, 2019
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 26th, 2019 at 6:27:15 PM permalink
Quote: ThatDonGuy

It looks like you would have to jump through some hoops to get a calculated answer, but I did some quick simulations, and after 25 million runs of 16 spins (on a double-zero) wheel, I got a surprising answer:

You get at least one number showing up three or more times 27.5% of the time

I only ran 100k sims
since 2 programs of mine (Winstats and excel) were in a very close agreement only after 10k sims

that value (27.5% ) looks like it could be the average number of numbers that hit 3 times
in Excel
=BINOMDIST(3,16,1/38,0)*38 = 0.2742

I ran out of time with that.
I agree the calculation would be a challenge to pull off.
I am sure someone has done it

at least our results show the OP what he is after

added:
ok, I had some code wrong in my sim
(Thought I did it a different way. was only checking 3 and not 3 or more and 2 and not 2 or more)
Don results(x%)
a)0.27788 (27.5%)
b)0.81953 (81.8%)
c)0.24546 (24.7%)

in agreement now
Last edited by: 7craps on Mar 26, 2019
winsome johnny (not Win some johnny)
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6272
Joined: Jun 22, 2011
March 26th, 2019 at 6:56:23 PM permalink
Quote: 7craps

I agree the calculation would be a challenge to pull off.
I am sure someone has done it

at least our results show the OP what he is after


It's not "difficult" so much as it is time consuming; I think what needs to be done is, every combination of "hits" that add up to 16 need to be determined, calculated separately, and then added.
For example:
{16} - 1 number comes up 16 times
{15, 1} - 1 comes up 15 times; another comes up once
{14, 2} - 1 comes up 14 times; another comes up twice
{14, 1, 1} - 1 comes up 14 times; two others come up once
and so on
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6272
Joined: Jun 22, 2011
March 27th, 2019 at 4:06:29 PM permalink
After some serious number crunching, I got some exact numbers (note the assumptions made are different from the ones I made earlier concerning what counts as "two numbers coming up twice"):

There are 3816 = (deep inhale) 18,903,296,479,567,620,845,142,016 different sets of numbers in 16 spins of a double-zero wheel

Of these:
5,207,779,573,032,238,911,126,016, or about 27.55%, of them have at least one number appear three or more times

10,802,426,009,482,612,080,576,000, or about 57.15%, of them have no number appear three or more times, but two or more numbers appear twice

2,902,218,716,192,061,254,510,808, or about 15.35%, of them have at least one number appear three or more times and two other numbers appear at least twice
EvenBob
EvenBob
  • Threads: 441
  • Posts: 28669
Joined: Jul 18, 2010
March 27th, 2019 at 4:54:10 PM permalink
Quote: ThatDonGuy


You get at least one number showing up three or more times 27.5% of the time



Just look at some roulette tote
boards in the casino. One number
is usually hot, often more than
one.

Because roulette is random, you
can't look at what just one wheel
is producing. To get an useful
statistic you'd have to look at every
roulette wheel in the world at
the same time. That's where it all
even's out.
"It's not called gambling if the math is on your side."
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
Thanked by
ForagerJoeClayton
March 27th, 2019 at 5:27:34 PM permalink
This makes for a pretty good math problem, but the answer will help nobody lose less money in roulette.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 27th, 2019 at 6:42:35 PM permalink
Quote: KevinAA

He says there is no way that a number can appear on the board 3 times, or two numbers on the board twice each (or certainly both) without the dealer manipulating the wheel and ball spin.
I say this is bogus

The interesting thing I see about this with the large history boards, who actually looks at the numbers for hitting at least 2 times or 3 times? and how fast can they spot it?

Just a glance at 16 numbers, without a streak for 2, I say it is not that easy to instantly spot the repeaters.
15
2
35
5
19
4
13
20
10
19
2
14
0
35
23
1
I can see the 2 that repeated, but the others I really have to look. Maybe others find it quite easy.

I would think more would see the streaks of 2 and question if the Dealer did that (of course the board can malfunction and show lots of streaks)
for example, your favorite number can come up 2 times in a row over 16 spins about 1 in 100 (0.010097111)
but ANY number 2 times in a row over 16 spins is almost 1 in 3 (0.329695845)

3 in a row is more difficult and could point to a Dealer, if you believe, that makes it happen.
your favorite number can come up at least 3 times in a row over 16 spins about 1 in 4,018
ANY number at least 3 times in a row over 16 spins is almost 1 in 106

The casinos 'hit it big' when they started to place history boards at the Roulette tables.
winsome johnny (not Win some johnny)
EvenBob
EvenBob
  • Threads: 441
  • Posts: 28669
Joined: Jul 18, 2010
March 27th, 2019 at 7:22:18 PM permalink
Taken by itself, every roulette wheel is a rogue
wheel. Anything could happen & it sometimes
does. You have to look at hundreds and
thousands of wheels at once before any
of the probability makes sense.
"It's not called gambling if the math is on your side."
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
Thanked by
LuckyPhow
March 28th, 2019 at 10:22:36 AM permalink
This is the "birthday problem", just like finding the probability of three matches with 38 total days and 16 people.

I found a formula for triples...it's 1 minus the sum from i=0 to n/2 of:

m!n!/ (i! (n - 2i)! (m - n + i)! * 2^i * m^n)

Where m=38 and n=16.

27.55%.
It’s all about making that GTA
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 28th, 2019 at 12:19:25 PM permalink
Quote: Ace2

This is the "birthday problem", just like finding the probability of three matches with 38 total days and 16 people.

I found a formula for triples...it's 1 minus the sum from i=0 to n/2 of:

m!n!/ (i! (n - 2i)! (m - n + i)! * 2^i * m^n)

Where m=38 and n=16.

27.55%.

there seems to be a lack of a generalized formula for these type of questions.
I have NOT searched this much.
Nice find. Most just simulate it.
I doubt 1 in 1,000 can understand what is going on in the formula.

I have this using pari/gp
m=38;
n=16;
x=sum(k=0,floor(n/2),(m!*n!/(k!*(n-2*k)!*(m-n+k)!*2^k*m^n)));
x
y=1-x;
y
returns
535339183083083769647/1943184259823974182272
as a decimal
0.27549584162007268958057372875293915562 (on my machine)
Last edited by: 7craps on Mar 28, 2019
winsome johnny (not Win some johnny)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 28th, 2019 at 7:43:56 PM permalink
Quote: Ace2

This is the "birthday problem", just like finding the probability of three matches with 38 total days and 16 people.

I found a formula for triples...it's 1 minus the sum from i=0 to n/2 of:

m!n!/ (i! (n - 2i)! (m - n + i)! * 2^i * m^n)

Where m=38 and n=16.

27.55%.

an update
the above formula found here (along with others)
https://math.stackexchange.com/questions/25876/probability-of-3-people-in-a-room-of-30-having-the-same-birthday

looks to have some issues, to me,
has a terrible time with rolling one Die and getting one number 3 times
m=6
n=9 (for example)
(m - n + i)! = 6-9+0 = (-3)!

back to being interesting
winsome johnny (not Win some johnny)
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6272
Joined: Jun 22, 2011
March 28th, 2019 at 8:38:31 PM permalink
Quote: 7craps


returns
535339183083083769647/1943184259823974182272


That matches the fraction I got, although yours is in lowest terms (divide both numerator and denominator of mine by 9728)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 28th, 2019 at 8:56:14 PM permalink
Quote: ThatDonGuy

That matches the fraction I got, although yours is in lowest terms (divide both numerator and denominator of mine by 9728)

yes it does.
I did check that.

the formula Ace2 found will be difficult to use when the number of spins gets above 38
in our example here.

(-x)! just does not compute
gp > m=38;
gp > n=39;
gp > x=sum(k=0,floor(n/2),(m!*n!/(k!*(n-2*k)!*(m-n+k)!*2^k*m^n)));
*** at top-level: .../2),(m!*n!/(k!*(n-2*k)!*(m-n+k)!*2^k*m^n)))
*** _!: domain error in factorial: argument < 0


I will have to look more at your method.
or at some other methods that are out there.
A Markov chain gets quickly out-of-hand with the number of states, but looks doable.
but for now
MLB, NCAAB, NBA time!
winsome johnny (not Win some johnny)
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
March 29th, 2019 at 1:33:57 AM permalink
Here’s a close approximation I derived.

The average number of spins needed to hit any number you choose is 38, so in 15.5 spins (half point adjustment) we expect 15.5/38 occurrences of selected number. Adding in ever-useful Poisson, we can say the probability of all 38 numbers having less than 3 occurrences after 15.5 spins is:

1 - [((15.5/38)^2 / 2 + 15.5/38 + 1) / e^(15.5/38)] ^38 = 27.30 %, within 20 basis points of 27.55.

I believe there is also an exact, simple-formula calculus solution to this. Working on it.
It’s all about making that GTA
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 29th, 2019 at 8:05:13 AM permalink
Quote: Ace2

Here’s a close approximation I derived.

Nice
I found some Mathematica code that is very nice. uses multinomial distribution
The author ported it to R
and R does ok, except when rounding to a very small number (no arbitrary precision in base R)
Here is to 77 spins for 3 times
prob YES for 77 == 1
the others below 77 for YES are shown as 1 but are not (close)
   NO          YES (cdf)  
0 1 0
1 1 0
2 1 0
3 0.999307 0.000692521
4 0.997285 0.00271541
5 0.993345 0.00665472
6 0.986957 0.0130428
7 0.977647 0.0223528
8 0.965009 0.0349911
9 0.948712 0.0512875
10 0.928514 0.0714863
11 0.904264 0.0957359
12 0.875918 0.124082
13 0.843539 0.156461
14 0.807302 0.192698
15 0.767493 0.232507
16 0.724504 0.275496
17 0.678824 0.321176
18 0.631024 0.368976
19 0.581741 0.418259
20 0.531656 0.468344
21 0.481472 0.518528
22 0.431887 0.568113
23 0.383572 0.616428
24 0.337145 0.662855
25 0.293153 0.706847
26 0.252051 0.747949
27 0.214194 0.785806
28 0.179825 0.820175
29 0.149079 0.850921
30 0.121983 0.878017
31 0.0984651 0.901535
32 0.0783695 0.92163
33 0.0614703 0.93853
34 0.04749 0.95251
35 0.0361172 0.963883
36 0.0270239 0.972976
37 0.0198811 0.980119
38 0.014372 0.985628
39 0.0102022 0.989798
40 0.00710663 0.992893
41 0.00485422 0.995146
42 0.00324883 0.996751
43 0.00212883 0.997871
44 0.00136456 0.998635
45 0.000854855 0.999145
46 0.000522915 0.999477
47 0.000312012 0.999688
48 0.000181404 0.999819
49 0.00010265 0.999897
50 5.64648e-05 0.999944
51 3.0153e-05 0.99997
52 1.56099e-05 0.999984
53 7.82201e-06 0.999992
54 3.78762e-06 0.999996
55 1.76911e-06 0.999998
56 7.95473e-07 0.999999
57 3.43583e-07 1
58 1.42211e-07 1
59 5.62563e-08 1
60 2.1206e-08 1
61 7.59179e-09 1
62 2.57153e-09 1
63 8.20601e-10 1
64 2.4548e-10 1
65 6.84456e-11 1
66 1.76676e-11 1
67 4.18796e-12 1
68 9.0272e-13 1
69 1.74802e-13 1
70 2.99406e-14 1
71 4.44503e-15 1
72 5.56288e-16 1
73 5.63592e-17 1
74 4.33533e-18 1
75 2.25173e-19 1
76 5.9256e-21 1
77 0 1
> end.time <- Sys.time()
> print(end.time - start.time)
Time difference of 0.734354 secs

I can post the R code and link to webpage as soon as I clean it all up (or down)
Last edited by: 7craps on Mar 29, 2019
winsome johnny (not Win some johnny)
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6272
Joined: Jun 22, 2011
March 29th, 2019 at 9:21:00 AM permalink
Quote: 7craps

the formula Ace2 found will be difficult to use when the number of spins gets above 38
in our example here.

(-x)! just does not compute
I will have to look more at your method.


Well, there's always .NET's BigInteger class; you can "pre-build" an array of factorials to speed things up.


First, generate a list of all distinct ways to partition N (= the number of spins) items.
There may be a faster way of doing it, but what I did was:
(a) Start with the 1-element set {N}; this represents all N spins being the same number
(b) Find the rightmost number in the most recent set > 1; reduce it by 1, then add the reduced number to the set as many times as possible until the sum >= N, then, if the sum < N, add the difference to the set
For example, with N = 5, you get {5}, then {4 1}, then {3 2}, then {3 1 1}, then {2 2 1}, then {2 1 1 1}, and finally {1 1 1 1 1}

Each set represents the number of "groups" of numbers. For example, {12 3 1} is one number appearing 12 times, one appearing 3 times, and one appearing once.
For each set, calculate the number of ways it can be obtained:
Divide N! by the product of the factorials of the numbers in each set (so, for {12, 3, 1}, start with 16! / (12! 3! 1!)).
This is the number of permutations of, say, 16 balls, where 12 are red, 3 are blue, and 1 is green.
Now, there are 38 possible values for the first number, 37 for the second, and so on, but for each number that appears K times in the set, divide the result by K! to take into account the fact that you are counting the same numbers multiple times but in a different order.
Clarification: for N = 4, the {2 2} set has six permutations - AABB, ABAB, BAAB, ABBA, BABA, and BBAA. A can be any number from 1 to 38, and B can be any number from 1 to 38 other than A, so (A,B) can be both (2,9) and (9,2), but you are then counting spin set (2, 9, 9, 2) as both ABBA fo (2,9) and BAAB for (9,2).

Example: for N = 10, {3, 2, 2, 1, 1, 1} is a set of spins that has six different numbers appear.
There are 10! / (3! 2! 2! 1! 1! 1!} = 151,200 ways to permute the six different numbers.
There are 38 possible numbers for the first one (the one that appears 3 times), 37 for the second, 36, for the third, ..., 33 for the sixth.
However, there are two numbers that appear twice and three that appear once, so multiply 151,200 by 38 x 37 x 36 x 35 x 34 x 33 and then divide by (2! x 3!).

Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
Thanked by
beachbumbabs
March 29th, 2019 at 10:52:24 AM permalink
Sorry to get emotional, but this is one of my favorite things about math...there are so many different ways to approach and solve the same problem. Wiping a tear now .
It’s all about making that GTA
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
March 29th, 2019 at 11:07:26 AM permalink
Quote: 7craps

the formula Ace2 found will be difficult to use when the number of spins gets above 38
in our example here.

(-x)! just does not compute

I hadn’t thought about that. I found that formula looking for birthday triple solutions, so I assume it was derived in the spirit of the original birthday problem which deals with pairs. And in that case n would never go higher than m since it’s impossible to, for example, select 380 dates from 365 and not have a pair. But it will happen with triples.
It’s all about making that GTA
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 29th, 2019 at 11:40:50 AM permalink
Quote: Ace2

I hadn’t thought about that. I found that formula looking for birthday triple solutions, so I assume it was derived in the spirit of the original birthday problem which deals with pairs.

I have that exact formula in a paper
"The matching, birthday and the strong birthday
problem: a contemporary review"
Anirban DasGupta
Had it for some time.

Started and finished a Markov chain solution for the 'classical birthday problem'
but for 3+ matches it gets tiring for me.
and it can bog down the program with many states
n*(n*1)/2 (familiar)
PLUS n+2
so 365*366/2 + 365+2 = 67,162 states for at least 3 sharing the same BDay
00 Roulette has only 781 states (R and Excel handle that just fine)
and one Die has just 29 states. I did that one 1st.

The R code I found/adjusted (from Mathematica) duplicates it (1d6 - one Die) just fine
(only 43 lines of code)
   NO         YES (cdf)
0 1 0
1 1 0
2 1 0
3 0.972222 0.0277778
4 0.902778 0.0972222
5 0.787037 0.212963
6 0.632716 0.367284
7 0.459105 0.540895
8 0.292567 0.707433
9 0.157536 0.842464
10 0.0675154 0.932485
11 0.0206297 0.97937
12 0.00343829 0.996562
13 0 1
> end.time <- Sys.time()
> print(end.time - start.time)
Time difference of 0.7343569 secs

from Excel
rollpdfcdf
30.0277777780.027777778
40.0694444440.097222222
50.1157407410.212962963
60.1543209880.367283951
70.1736111110.540895062
80.1665380660.707433128
90.1350308640.842463992
100.0900205760.932484568
110.0468857170.979370285
120.0171914290.996561714
130.0034382861

I also agree, sometimes it feels good to know there is more than 1 way to get the right answer.

I have seen a few closed-form methods, but so far they only work for a specific problem, not all problems
except the R code one I have. So far so good.
Now to figure out what I want to do with it.
Last edited by: 7craps on Mar 29, 2019
winsome johnny (not Win some johnny)
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
March 30th, 2019 at 12:57:27 AM permalink
Quote: 7craps

I have that exact formula in a paper
"The matching, birthday and the strong birthday
problem: a contemporary review"
Anirban DasGupta
Had it for some time.

Just curious...then why didn’t you use it before I did? I’d never seen it before yesterday, never had a need for that formula.
It’s all about making that GTA
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
March 30th, 2019 at 3:12:00 AM permalink
Sorry to be late to the party, but if the question is what is the probability that there will be at least one birthday common to three or more people out of n people, I get the following:

People No Triple Triple
3 0.999992 0.000008
4 0.999970 0.000030
5 0.999925 0.000075
6 0.999851 0.000149
7 0.999739 0.000261
8 0.999584 0.000416
9 0.999377 0.000623
10 0.999112 0.000888
11 0.998782 0.001218
12 0.998379 0.001621
13 0.997898 0.002102
14 0.997330 0.002670
15 0.996671 0.003329
16 0.995912 0.004088
17 0.995047 0.004953
18 0.994071 0.005929
19 0.992976 0.007024
20 0.991757 0.008243
21 0.990408 0.009592
22 0.988922 0.011078
23 0.987295 0.012705
24 0.985519 0.014481
25 0.983591 0.016409
26 0.981503 0.018497
27 0.979253 0.020747
28 0.976833 0.023167
29 0.974240 0.025760
30 0.971469 0.028531
31 0.968516 0.031484
32 0.965376 0.034624
33 0.962046 0.037954
34 0.958521 0.041479
35 0.954798 0.045202
36 0.950874 0.049126
37 0.946746 0.053254
38 0.942411 0.057589
39 0.937867 0.062133
40 0.933111 0.066889
41 0.928141 0.071859
42 0.922956 0.077044
43 0.917554 0.082446
44 0.911935 0.088065
45 0.906097 0.093903
46 0.900040 0.099960
47 0.893764 0.106236
48 0.887269 0.112731
49 0.880556 0.119444
50 0.873625 0.126375
51 0.866478 0.133522
52 0.859115 0.140885
53 0.851540 0.148460
54 0.843754 0.156246
55 0.835759 0.164241
56 0.827559 0.172441
57 0.819156 0.180844
58 0.810555 0.189445
59 0.801758 0.198242
60 0.792770 0.207230
61 0.783595 0.216405
62 0.774239 0.225761
63 0.764706 0.235294
64 0.755001 0.244999
65 0.745131 0.254869
66 0.735101 0.264899
67 0.724918 0.275082
68 0.714587 0.285413
69 0.704117 0.295883
70 0.693513 0.306487
71 0.682783 0.317217
72 0.671934 0.328066
73 0.660974 0.339026
74 0.649912 0.350088
75 0.638754 0.361246
76 0.627509 0.372491
77 0.616186 0.383814
78 0.604793 0.395207
79 0.593338 0.406662
80 0.581831 0.418169
81 0.570280 0.429720
82 0.558693 0.441307
83 0.547080 0.452920
84 0.535450 0.464550
85 0.523812 0.476188
86 0.512174 0.487826
87 0.500545 0.499455
88 0.488935 0.511065
89 0.477352 0.522648
90 0.465804 0.534196
91 0.454302 0.545698
92 0.442852 0.557148
93 0.431463 0.568537
94 0.420145 0.579855
95 0.408904 0.591096
96 0.397748 0.602252
97 0.386686 0.613314
98 0.375725 0.624275
99 0.364873 0.635127
100 0.354135 0.645865
101 0.343520 0.656480
102 0.333033 0.666967
103 0.322682 0.677318
104 0.312471 0.687529
105 0.302407 0.697593
106 0.292495 0.707505
107 0.282740 0.717260
108 0.273147 0.726853
109 0.263721 0.736279
110 0.254464 0.745536
111 0.245381 0.754619
112 0.236475 0.763525
113 0.227749 0.772251
114 0.219205 0.780795
115 0.210845 0.789155
116 0.202670 0.797330
117 0.194681 0.805319
118 0.186879 0.813121


Excel crashes after 118 as the numbers get too big.

So, with 88 people there is more than a 51.1% chance that three or more people will share the same birthday.

I did this in Excel, but this seems to be the general formula:

Probability there will NOT be a birthday common to three or more people = (fact(n)/365^n)*[sum for d = 0 to int(n/2)] of combin(365,d)*combin(365-d,n-2d)/2^d. Note that d represents the number of days shared by exactly two people.
Last edited by: Wizard on Mar 30, 2019
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 30th, 2019 at 7:05:15 AM permalink
Quote: Wizard

Sorry to be late to the party, but if the question is what is the probability that there will be at least one birthday common to three or more people out of n people, I get the following:

The OP Q is about 00 Roulette, but yours looks fine.
Using some R code I get this in about 4 seconds
again the ''1 is the YES column starting at 341 is rounded up
R loses precision as does Excel
>   print(formatC(cbind(no,yes),digits=15),quote=0)
NO YES (cdf)
0 1 0
1 1 0
2 1 0
3 0.999992493901296 7.50609870370234e-06
4 0.999970037299143 2.9962700856645e-05
5 0.999925247144711 7.47528552890175e-05
6 0.999850801970449 0.000149198029551267
7 0.999739442662695 0.000260557337304679
8 0.999583973765641 0.000416026234358879
9 0.9993772653009 0.000622734699099903
10 0.999112255086985 0.000887744913014799
11 0.998781951542923 0.00121804845707663
12 0.998379436960072 0.00162056303992786
13 0.997897871225946 0.00210212877405402
14 0.997330495983503 0.00266950401649713
15 0.99667063920893 0.00332936079107005
16 0.995911720190446 0.00408827980955362
17 0.995047254890109 0.00495274510989108
18 0.99407086166994 0.00592913833006004
19 0.992976267363005 0.00702373263699485
20 0.991757313669426 0.00824268633057368
21 0.990407963856433 0.00959203614356652
22 0.988922309740811 0.0110776902591893
23 0.987294578931258 0.0127054210687415
24 0.985519142307365 0.0144808576926347
25 0.983590521710933 0.0164094782890674
26 0.981503397824651 0.0184966021753487
27 0.979252618212152 0.0207473817878476
28 0.976833205492652 0.0231667945073485
29 0.974240365622576 0.0257596343774237
30 0.971469496255676 0.0285305037443235
31 0.968516195152444 0.0314838048475563
32 0.965376268608808 0.0346237313911922
33 0.962045739873464 0.0379542601265361
34 0.958520857522492 0.0414791424775082
35 0.954798103759361 0.0452018962406394
36 0.950874202607908 0.0491257973920917
37 0.946746127965475 0.0532538720345247
38 0.942411111482901 0.0575888885170989
39 0.93786665023804 0.0621333497619601
40 0.933110514169072 0.0668894858309279
41 0.928140753233972 0.0718592467660281
42 0.922955704262497 0.0770442957375032
43 0.917553997467214 0.0824460025327861
44 0.91193456258039 0.0880654374196099
45 0.906096634583979 0.0939033654160205
46 0.900039759000467 0.0999602409995327
47 0.893763796713001 0.106236203286999
48 0.887268928284118 0.112731071715882
49 0.880555657743166 0.119444342256834
50 0.87362481581382 0.12637518418618
51 0.866477562554109 0.133522437445891
52 0.859115389382908 0.140884610617092
53 0.851540120468234 0.148459879531766
54 0.843753913454424 0.156246086545576
55 0.835759259506983 0.164240740493017
56 0.827558982655904 0.172441017344096
57 0.819156238420174 0.180843761579826
58 0.810554511698505 0.189445488301495
59 0.801757613913476 0.198242386086524
60 0.792769679398813 0.207230320601187
61 0.783595161021965 0.216404838978035
62 0.774238825036683 0.225761174963317
63 0.764705745163194 0.235294254836806
64 0.755001295896118 0.244998704103882
65 0.745131145043274 0.254868854956726
66 0.735101245501294 0.264898754498706
67 0.724917826277039 0.275082173722961
68 0.714587382766632 0.285412617233368
69 0.704116666307026 0.295883333692974
70 0.693512673017964 0.306487326982036
71 0.68278263195513 0.31721736804487
72 0.671933992598355 0.328066007401645
73 0.660974411701514 0.339025588298486
74 0.649911739533737 0.350088260466263
75 0.638754005544217 0.361245994455783
76 0.627509403485722 0.372490596514278
77 0.616186276034429 0.383813723965571
78 0.604793098946192 0.395206901053808
79 0.593338464791722 0.406661535208278
80 0.581831066315392 0.418168933684608
81 0.570279679464325 0.429720320535675
82 0.558693146136422 0.441306853863578
83 0.547080356697526 0.452919643302474
84 0.535450232319587 0.464549767680413
85 0.523811707192771 0.476188292807229
86 0.512173710665682 0.487826289334318
87 0.500545149368595 0.499454850631405
88 0.488934889375264 0.511065110624736
89 0.477351738459167 0.522648261540833
90 0.465804428500194 0.534195571499806
91 0.454301598097667 0.545698401902333
92 0.442851775445099 0.557148224554902
93 0.43146336152156 0.56853663847844
94 0.420144613653521 0.579855386346479
95 0.408903629499958 0.591096370500042
96 0.397748331512055 0.602251668487945
97 0.386686451917207 0.613313548082793
98 0.375725518275139 0.624274481724861
99 0.364872839651866 0.635127160348134
100 0.354135493454824 0.645864506545176
101 0.343520312970045 0.656479687029955
102 0.333033875639397 0.666966124360603
103 0.322682492113117 0.677317507886883
104 0.312472196109641 0.687527803890359
105 0.302408735111586 0.697591264888414
106 0.292497561923308 0.707502438076693
107 0.282743827111964 0.717256172888036
108 0.273152372350396 0.726847627649604
109 0.263727724676521 0.736272275323479
110 0.25447409168009 0.74552590831991
111 0.24539535762395 0.75460464237605
112 0.236495080503121 0.763504919496879
113 0.22777649004119 0.77222350995881
114 0.219242486619751 0.780757513380249
115 0.210895641132873 0.789104358867127
116 0.202738195754897 0.797261804245103
117 0.194772065606257 0.805227934393743
118 0.186998841298544 0.813001158701456
119 0.17941979233666 0.82058020766334
120 0.172035871352627 0.827964128647372
121 0.164847719142583 0.835152280857417
122 0.157855670475565 0.842144329524435
123 0.151059760639955 0.848940239360045
124 0.144459732690934 0.855540267309066
125 0.138055045359971 0.861944954640029
126 0.131844881585307 0.868155118414693
127 0.125828157620488 0.874171842379512
128 0.120003532676409 0.87999646732359
129 0.11436941905095 0.88563058094905
130 0.108923992699127 0.891076007300873
131 0.103665204195856 0.896334795804144
132 0.0985907900427375 0.901409209957262
133 0.093698284269946 0.906301715730054
134 0.0889850302841706 0.911014969715829
135 0.0844481929136682 0.915551807086332
136 0.0800847706018735 0.919915229398127
137 0.0758916077015916 0.924108392298408
138 0.0718654068226394 0.928134593177361
139 0.068002741186833 0.931997258813167
140 0.0643000669454871 0.935699933054513
141 0.0607537354160062 0.939246264583994
142 0.0573600051957981 0.942639994804202
143 0.0541150541135216 0.945884945886478
144 0.0510149909796238 0.948985009020376
145 0.0480558671002083 0.951944132899792
146 0.0452336875204807 0.954766312479519
147 0.0425444219663277 0.957455578033672
148 0.0399840154549807 0.960015984545019
149 0.0375483985481934 0.962451601451807
150 0.0352334972238851 0.964766502776115
151 0.0330352423447696 0.96696475765523
152 0.030949578705077 0.969050421294923
153 0.0289724736390725 0.971027526360927
154 0.0270999251776604 0.97290007482234
155 0.0253279697419245 0.974672030258075
156 0.0236526893649786 0.976347310635021
157 0.0220702184359745 0.977929781564026
158 0.0205767499625127 0.979423250037487
159 0.0191685413500388 0.980831458649961
160 0.0178419196990408 0.982158080300959
161 0.0165932866230099 0.98340671337699
162 0.0154191225921547 0.984580877407845
163 0.014315990809785 0.985684009190215
164 0.0132805406300731 0.986719459369927
165 0.0123095105275695 0.98769048947243
166 0.0113997306303909 0.988600269369609
167 0.0105481248303909 0.989451875169609
168 0.0097517124848938 0.990248287515106
169 0.00900760972569064 0.990992390274309
170 0.00831303039197616 0.991686969608024
171 0.00766528660475483 0.992334713395245
172 0.00706178900094211 0.992938210999058
173 0.00650004664596247 0.993499953354038
174 0.0059776666440797 0.99402233335592
175 0.00549235346600646 0.994507646533994
176 0.00504190801352618 0.994958091986474
177 0.00462422644092971 0.99537577355907
178 0.0042372987530251 0.995762701246975
179 0.0038792071993317 0.996120792800668
180 0.00354812448382122 0.996451875516179
181 0.00324231180923165 0.996757688190768
182 0.00296011677455581 0.997039883225444
183 0.0026999711438083 0.997300028856192
184 0.0024603885036064 0.997539611496394
185 0.00223996182647224 0.997760038173528
186 0.00203736095608083 0.997962639043919
187 0.0018513300299515 0.998148669970048
188 0.00168068485431446 0.998319315145686
189 0.0015243102450874 0.998475689754913
190 0.00138115734807691 0.998618842651923
191 0.00125024095068252 0.998749759049318
192 0.00113063679653349 0.998869363203467
193 0.00102147891363651 0.998978521086364
194 0.000921956965762646 0.999078043034237
195 0.000831313635957877 0.999168686364042
196 0.000748842050230381 0.99925115794977
197 0.000673883248652526 0.999326116751348
198 0.000605823710320444 0.99939417628968
199 0.00054409293784372 0.999455907062156
200 0.000488161106294257 0.999511838893706
201 0.000437536780829975 0.99956246321917
202 0.000391764706528403 0.999608235293472
203 0.000350423673318611 0.999649576326681
204 0.000313124458289355 0.999686875541711
205 0.000279507847077822 0.999720492152922
206 0.000249242735507717 0.999750757264492
207 0.000222024312148047 0.999777975687852
208 0.000197572322004904 0.999802427677995
209 0.000175629411137906 0.999824370588862
210 0.000155959551609967 0.99984404044839
211 0.000138346545833237 0.999861653454167
212 0.000122592609064433 0.999877407390936
213 0.000108517028528226 0.999891482971472
214 9.59548974066694e-05 0.999904045102593
215 8.47559217243126e-05 0.999915244078276
216 7.47832979812653e-05 0.999925216702019
217 6.59126592382618e-05 0.999934087340762
218 5.80310872371413e-05 0.999941968912763
219 5.10361880452974e-05 0.999948963811955
220 4.48352286417488e-05 0.999955164771358
221 3.93443318137787e-05 0.999960655668186
222 3.4487726704732e-05 0.999965512273295
223 3.01970523437808e-05 0.999969802947656
224 2.64107114954971e-05 0.999973589288505
225 2.30732721891912e-05 0.999976926727811
226 2.01349143235042e-05 0.999979865085676
227 1.75509187891099e-05 0.999982449081211
228 1.52811966100147e-05 0.99998471880339
229 1.32898556703992e-05 0.99998671014433
230 1.15448026678601e-05 0.999988455197332
231 1.00173780139528e-05 0.999989982621986
232 8.68202148794408e-06 0.999991317978512
233 7.5159665385017e-06 0.999992484033462
234 6.49896121967396e-06 0.99999350103878
235 5.61301384099109e-06 0.999994386986159
236 4.84216150600578e-06 0.999995157838494
237 4.17225980831353e-06 0.999995827740192
238 3.5907920483729e-06 0.999996409207952
239 3.08669642767244e-06 0.999996913303572
240 2.65020976844207e-06 0.999997349790232
241 2.27272639672457e-06 0.999997727273603
242 1.94667091381811e-06 0.999998053329086
243 1.66538366555572e-06 0.999998334616334
244 1.42301780033251e-06 0.9999985769822
245 1.21444688502167e-06 0.999998785553115
246 1.03518212277534e-06 0.999998964817877
247 8.81298288074424e-07 0.999999118701712
248 7.49367562200332e-07 0.999999250632438
249 6.36400516518062e-07 0.999999363599483
250 5.39793551581567e-07 0.999999460206448
251 4.57282157127298e-07 0.999999542717843
252 3.86899411561946e-07 0.999999613100588
253 3.26939189650093e-07 0.99999967306081
254 2.75923593858602e-07 0.999999724076406
255 2.32574168324223e-07 0.999999767425832
256 1.95786494798243e-07 0.999999804213505
257 1.64607807315899e-07 0.999999835392193
258 1.38217296874152e-07 0.999999861782703
259 1.15908809220598e-07 0.999999884091191
260 9.70756681019371e-08 0.999999902924332
261 8.11973831381798e-08 0.999999918802617
262 6.78280260233266e-08 0.999999932171974
263 5.65860811482352e-08 0.999999943413919
264 4.71455971377472e-08 0.999999952854403
265 3.92284843294043e-08 0.999999960771516
266 3.25978200284741e-08 0.99999996740218
267 2.70520385819545e-08 0.999999972947961
268 2.24198970457519e-08 0.999999977580103
269 1.85561195917167e-08 0.99999998144388
270 1.53376349260254e-08 0.999999984662365
271 1.26603309727936e-08 0.999999987339669
272 1.04362600158808e-08 0.99999998956374
273 8.59123548046343e-09 0.999999991408764
274 7.06276866088782e-09 0.999999992937231
275 5.7983000432931e-09 0.9999999942017
276 4.75368550542202e-09 0.999999995246314
277 3.89190267113539e-09 0.999999996108097
278 3.18194711722498e-09 0.999999996818053
279 2.59789203378389e-09 0.999999997402108
280 2.11808838033387e-09 0.999999997881912
281 1.72448560715311e-09 0.999999998275514
282 1.40205566944585e-09 0.999999998597944
283 1.13830539169915e-09 0.999999998861695
284 9.22864277508483e-10 0.999999999077136
285 7.47136639498975e-10 0.999999999252863
286 6.04008474613788e-10 0.999999999395991
287 4.87600858847853e-10 0.999999999512399
288 3.9306280655238e-10 0.999999999606937
289 3.16397554256159e-10 0.999999999683602
290 2.54317106749931e-10 0.999999999745683
291 2.04120641052277e-10 0.999999999795879
292 1.63593016993453e-10 0.999999999836407
293 1.30920204956993e-10 0.99999999986908
294 1.04618923683158e-10 0.999999999895381
295 8.34781944340872e-11 0.999999999916522
296 6.65108714569698e-11 0.999999999933489
297 5.29135106422244e-11 0.999999999947086
298 4.20331956364817e-11 0.999999999957967
299 3.33401596201502e-11 0.99999999996666
300 2.64052268886163e-11 0.999999999973595
301 2.08812559757938e-11 0.999999999979119
302 1.64878994009483e-11 0.999999999983512
303 1.29991077318879e-11 0.999999999987001
304 1.02329005886952e-11 0.999999999989767
305 8.04300709204542e-12 0.999999999991957
306 6.31204535230163e-12 0.999999999993688
307 4.94596684422646e-12 0.999999999995054
308 3.86953858361023e-12 0.99999999999613
309 3.0226753417047e-12 0.999999999996977
310 2.3574669175999e-12 0.999999999997643
311 1.83577277383193e-12 0.999999999998164
312 1.4272790073986e-12 0.999999999998573
313 1.10793142418373e-12 0.999999999998892
314 8.58674042094213e-13 0.999999999999141
315 6.64435201377131e-13 0.999999999999336
316 5.13314060147461e-13 0.999999999999487
317 3.95928978195049e-13 0.999999999999604
318 3.04896460955475e-13 0.999999999999695
319 2.34415214853259e-13 0.999999999999766
320 1.79934678120581e-13 0.99999999999982
321 1.37891323827218e-13 0.999999999999862
322 1.05499239289848e-13 0.999999999999895
323 8.05840971540817e-14 0.999999999999919
324 6.14517551860289e-14 0.999999999999938
325 4.67844426955612e-14 0.999999999999953
326 3.5558884681955e-14 0.999999999999964
327 2.69818405554146e-14 0.999999999999973
328 2.04394422764905e-14 0.99999999999998
329 1.54574477307746e-14 0.999999999999985
330 1.16701125275617e-14 0.999999999999988
331 8.79585450663396e-15 0.999999999999991
332 6.61826236631201e-15 0.999999999999993
333 4.97130116415554e-15 0.999999999999995
334 3.72780776750412e-15 0.999999999999996
335 2.79056063630444e-15 0.999999999999997
336 2.0853603166529e-15 0.999999999999998
337 1.55567755884357e-15 0.999999999999998
338 1.1585213789728e-15 0.999999999999999
339 8.61254754103878e-16 0.999999999999999
340 6.3914507127726e-16 0.999999999999999
341 4.73483222223227e-16 1
342 3.5014197441364e-16 1
343 2.58473051861659e-16 1
344 1.90464896737712e-16 1
345 1.40100684238049e-16 1
346 1.02869882861462e-16 1
347 7.53973256619963e-17 1
348 5.516204545214e-17 1
349 4.02845492122147e-17 1
350 2.93661741804733e-17 1
351 2.13680024196847e-17 1
352 1.55197646722488e-17 1
353 1.12514356672732e-17 1
354 8.14196605637885e-18 1
355 5.88093108919366e-18 1
356 4.23989651400472e-18 1
357 3.05108057986251e-18 1
358 2.19148363048709e-18 1
359 1.57110705762114e-18 1
360 1.12422482565837e-18 1
361 8.02929177067122e-19 1
362 5.72367285270126e-19 1
363 4.07232718967963e-19 1
364 2.89186230832113e-19 1
365 2.04963446838052e-19 1
366 1.44989260937746e-19 1
367 1.02365264412126e-19 1
368 7.21312520326881e-20 1
369 5.07276938985848e-20 1
370 3.56052674717158e-20 1
371 2.49417858801359e-20 1
372 1.74373972654056e-20 1
373 1.21667124064334e-20 1
374 8.47225297798878e-21 1
375 5.88783038099752e-21 1
376 4.08356018307457e-21 1
377 2.82648380929051e-21 1
378 1.95242550851334e-21 1
379 1.34592051992148e-21 1
380 9.25929347067562e-22 1
381 6.35691321436433e-22 1
382 4.3553313491117e-22 1
383 2.97782433428464e-22 1
384 2.03177846418654e-22 1
385 1.38340540287669e-22 1
386 9.39971815846481e-23 1
387 6.37336571830229e-23 1
388 4.31228908074367e-23 1
389 2.91157691720341e-23 1
390 1.961671935202e-23 1
391 1.31885945356141e-23 1
392 8.84791573042416e-24 1
393 5.92311327304192e-24 1
394 3.9565982467037e-24 1
395 2.63726008363765e-24 1
396 1.75403911980052e-24 1
397 1.16406461780553e-24 1
398 7.70837041603953e-25 1
399 5.09321357568027e-25 1
400 3.35784894473091e-25 1
401 2.20885133001388e-25 1
402 1.44978621844053e-25 1
403 9.49444674216154e-26 1
404 6.20382609253465e-26 1
405 4.04454659920816e-26 1
406 2.63085156051966e-26 1
407 1.70739927400699e-26 1
408 1.10555928632597e-26 1
409 7.14221804946392e-27 1
410 4.60345815408822e-27 1
411 2.96026915792141e-27 1
412 1.89919676525683e-27 1
413 1.21561573980608e-27 1
414 7.76257956259838e-28 1
415 4.94532675418499e-28 1
416 3.14310473751707e-28 1
417 1.99293611743532e-28 1
418 1.26064925165382e-28 1
419 7.95531185746082e-29 1
420 5.0081559777853e-29 1
421 3.14522564200956e-29 1
422 1.97049207136573e-29 1
423 1.23152170454958e-29 1
424 7.67802439689187e-30 1
425 4.77520983900919e-30 1
426 2.96255538325087e-30 1
427 1.83344125789566e-30 1
428 1.13185152132359e-30 1
429 6.96994350246854e-31 1
430 4.28136023104188e-31 1
431 2.62326607078839e-31 1
432 1.60326860042457e-31 1
433 9.77392248394895e-32 1
434 5.94326925790433e-32 1
435 3.60471603608721e-32 1
436 2.18072569038736e-32 1
437 1.31586250339183e-32 1
438 7.91944237460332e-33 1
439 4.75388215785425e-33 1
440 2.84621041451816e-33 1
441 1.69959486318925e-33 1
442 1.0122286616738e-33 1
443 6.01259056338481e-34 1
444 3.56196250339949e-34 1
445 2.104537484481e-34 1
446 1.2401050054943e-34 1
447 7.28768439397622e-35 1
448 4.27114923832418e-35 1
449 2.49642651850564e-35 1
450 1.45514543120049e-35 1
451 8.45867364455059e-36 1
452 4.90344199330117e-36 1
453 2.83463619805751e-36 1
454 1.6341266076981e-36 1
455 9.39421930167623e-37 1
456 5.3853855726295e-37 1
457 3.07856609810634e-37 1
458 1.75489101701895e-37 1
459 9.97507533740695e-38 1
460 5.65380621983471e-38 1
461 3.19535158647255e-38 1
462 1.80070940515233e-38 1
463 1.01183588472435e-38 1
464 5.66907437176736e-39 1
465 3.16697029844126e-39 1
466 1.76400441830618e-39 1
467 9.79655156287459e-40 1
468 5.42448691262773e-40 1
469 2.9946766057585e-40 1
470 1.64831771417033e-40 1
471 9.04535284057948e-41 1
472 4.94877264015372e-41 1
473 2.69929691549168e-41 1
474 1.46783993826664e-41 1
475 7.95747523976314e-42 1
476 4.30064966477496e-42 1
477 2.31712029373523e-42 1
478 1.24455003516236e-42 1
479 6.66375279422142e-43 1
480 3.55681722240077e-43 1
481 1.89249063924655e-43 1
482 1.00375741663461e-43 1
483 5.30688761817712e-44 1
484 2.7967929612003e-44 1
485 1.46920771791472e-44 1
486 7.69310460166928e-45 1
487 4.0152137371198e-45 1
488 2.08880201981331e-45 1
489 1.08307964887812e-45 1
490 5.59745857024659e-46 1
491 2.88324512225623e-46 1
492 1.48021629413674e-46 1
493 7.57381027609105e-47 1
494 3.86226366809716e-47 1
495 1.96290932587538e-47 1
496 9.94218602670402e-48 1
497 5.01856205857229e-48 1
498 2.52455511566752e-48 1
499 1.26558368821249e-48 1
500 6.32251079938622e-49 1
501 3.1475538397669e-49 1
502 1.56147034791225e-49 1
503 7.71904090137849e-50 1
504 3.80236619776636e-50 1
505 1.86636867463895e-50 1
506 9.12821075635112e-51 1
507 4.44846689031806e-51 1
508 2.16004714327981e-51 1
509 1.04504710795951e-51 1
510 5.03755508003863e-52 1
511 2.41939347029108e-52 1
512 1.15767681003683e-52 1
513 5.51891358798083e-53 1
514 2.62117793091068e-53 1
515 1.24024417425806e-53 1
516 5.84624116919643e-54 1
517 2.74533954903867e-54 1
518 1.28426929673947e-54 1
519 5.98477222934125e-55 1
520 2.77818625555999e-55 1
521 1.28465916377072e-55 1
522 5.91722171704326e-56 1
523 2.71482331957316e-56 1
524 1.24065049948302e-56 1
525 5.6471815482256e-57 1
526 2.56022784897015e-57 1
527 1.1560593254107e-57 1
528 5.19907674100272e-58 1
529 2.32866386164871e-58 1
530 1.0387513787708e-58 1
531 4.61456024051374e-59 1
532 2.04151455923873e-59 1
533 8.99430375777528e-60 1
534 3.94607079036777e-60 1
535 1.72398578833843e-60 1
536 7.50003177876347e-61 1
537 3.24894343789929e-61 1
538 1.40139227842152e-61 1
539 6.01872629345041e-62 1
540 2.5737445197926e-62 1
541 1.09579871459176e-62 1
542 4.6450358543339e-63 1
543 1.96032728284859e-63 1
544 8.23640131433582e-64 1
545 3.44511607638193e-64 1
546 1.43454962956524e-64 1
547 5.94648648230024e-65 1
548 2.45372609167348e-65 1
549 1.00785956766503e-65 1
550 4.12068705194451e-66 1
551 1.67695782790546e-66 1
552 6.79273439440252e-67 1
553 2.73857128323116e-67 1
554 1.09887218790756e-67 1
555 4.38834404674327e-68 1
556 1.74409845698934e-68 1
557 6.89833844586591e-69 1
558 2.71523447540761e-69 1
559 1.06351967833749e-69 1
560 4.1451945016076e-70 1
561 1.60764873962157e-70 1
562 6.20397140001e-71 1
563 2.38213358184391e-71 1
564 9.1005007685812e-72 1
565 3.45901381653349e-72 1
566 1.30801257223246e-72 1
567 4.92072117104103e-73 1
568 1.84156572259647e-73 1
569 6.85601142683725e-74 1
570 2.53901756461006e-74 1
571 9.3530564870319e-75 1
572 3.42703626386906e-75 1
573 1.24894851397768e-75 1
574 4.52703917248058e-76 1
575 1.63196492880854e-76 1
576 5.85082342597721e-77 1
577 2.08600471434404e-77 1
578 7.39584831651701e-78 1
579 2.60745713772852e-78 1
580 9.14080932948311e-79 1
581 3.18619229484074e-79 1
582 1.10423243390503e-79 1
583 3.80479502980297e-80 1
584 1.30336210256236e-80 1
585 4.43856424777169e-81 1
586 1.50260143969375e-81 1
587 5.05648766625505e-82 1
588 1.69136631169475e-82 1
589 5.62327592601202e-83 1
590 1.85816054176683e-83 1
591 6.10236274346919e-84 1
592 1.99164656348401e-84 1
593 6.45957866014897e-85 1
594 2.08186067392117e-85 1
595 6.66702733519142e-86 1
596 2.12140276884375e-86 1
597 6.70658174064109e-87 1
598 2.10641059645208e-87 1
599 6.57241110188173e-88 1
600 2.03714567828587e-88 1
601 6.27206498397297e-89 1
602 1.91807304562148e-89 1
603 5.82586620012786e-90 1
604 1.75740103554992e-90 1
605 5.26465700157662e-91 1
606 1.5661433767067e-91 1
607 4.62623995516679e-92 1
608 1.35685211596859e-92 1
609 3.95108770709421e-93 1
610 1.14222646926144e-93 1
611 3.27801011946737e-94 1
612 9.33816438388267e-95 1
613 2.64043831768734e-95 1
614 7.41008930417192e-96 1
615 2.06382490463822e-96 1
616 5.7041743615374e-97 1
617 1.56441243828563e-97 1
618 4.25711781177716e-98 1
619 1.14935144865927e-98 1
620 3.07842814953954e-99 1
621 8.1791805941273e-100 1
622 2.15556014081435e-100 1
623 5.63435721157728e-101 1
624 1.46058265309449e-101 1
625 3.75464064860251e-102 1
626 9.57047147946526e-103 1
627 2.418702823584e-103 1
628 6.06005637809339e-104 1
629 1.50513608698413e-104 1
630 3.70543330539097e-105 1
631 9.04117167273806e-106 1
632 2.18620266575091e-106 1
633 5.23832867849035e-107 1
634 1.243619211905e-107 1
635 2.92502279707354e-108 1
636 6.81509770216052e-109 1
637 1.57278286948183e-109 1
638 3.59477026255056e-110 1
639 8.13635662055367e-111 1
640 1.82345464704451e-111 1
641 4.04589563471123e-112 1
642 8.88661787946631e-113 1
643 1.93199792214109e-113 1
644 4.15690477659613e-114 1
645 8.85055357357426e-115 1
646 1.86444709753898e-115 1
647 3.88552687584082e-116 1
648 8.0095757519182e-117 1
649 1.63292745473284e-117 1
650 3.29199033403519e-118 1
651 6.56174576546514e-119 1
652 1.29295284312854e-119 1
653 2.51814039120785e-120 1
654 4.84664159397903e-121 1
655 9.21708242156584e-122 1
656 1.73166386503009e-122 1
657 3.21347721121029e-123 1
658 5.88911749141549e-124 1
659 1.0656344657305e-124 1
660 1.90356080681547e-125 1
661 3.35614527654735e-126 1
662 5.83905850843366e-127 1
663 1.00226595686926e-127 1
664 1.69694792782455e-128 1
665 2.83337416722614e-129 1
666 4.6643461399766e-130 1
667 7.56880839388582e-131 1
668 1.21034558722952e-131 1
669 1.90690155785305e-132 1
670 2.95918742549474e-133 1
671 4.52195858165362e-134 1
672 6.80254267346082e-135 1
673 1.00712441322858e-135 1
674 1.46701436087654e-136 1
675 2.10180625600528e-137 1
676 2.9608809411633e-138 1
677 4.0999349187636e-139 1
678 5.5784453883628e-140 1
679 7.45549359810539e-141 1
680 9.78379640327894e-142 1
681 1.26020340359853e-142 1
682 1.59258946855083e-143 1
683 1.97386543431106e-144 1
684 2.3982514336177e-145 1
685 2.85522418749268e-146 1
686 3.32927965977357e-147 1
687 3.8002478515382e-148 1
688 4.24426329794602e-149 1
689 4.63540932168926e-150 1
690 4.94794146720539e-151 1
691 5.15887348513382e-152 1
692 5.25060272258928e-153 1
693 5.21318822513229e-154 1
694 5.04589725430437e-155 1
695 4.75771547694501e-156 1
696 4.36666671536125e-157 1
697 3.89798505352389e-158 1
698 3.381385649626e-159 1
699 2.84784536164502e-160 1
700 2.32639091882604e-161 1
701 1.84137903088812e-162 1
702 1.41064220427376e-163 1
703 1.04469335465655e-164 1
704 7.46975911477136e-166 1
705 5.14962808776628e-167 1
706 3.41787030790443e-168 1
707 2.18048045577165e-169 1
708 1.33479013913535e-170 1
709 7.8256087370109e-172 1
710 4.38501756371119e-173 1
711 2.34308835683036e-174 1
712 1.1909266425782e-175 1
713 5.74192722106149e-177 1
714 2.61797942752573e-178 1
715 1.12488299274612e-179 1
716 4.53715213447855e-181 1
717 1.71025868988374e-182 1
718 5.99409206471331e-184 1
719 1.9417480570995e-185 1
720 5.7735899522678e-187 1
721 1.56271814947415e-188 1
722 3.81183819595957e-190 1
723 8.27588713804325e-192 1
724 1.57428665366131e-193 1
725 2.57033470857315e-195 1
726 3.50187011807551e-197 1
727 3.82198048250642e-199 1
728 3.13277088730037e-201 1
729 1.7142352988118e-203 1
730 4.69653506523775e-206 1
731 0 1
> end.time <- Sys.time()
> print(end.time - start.time)
Time difference of 3.831339 secs

slick

FYI,
I was shown this years ago (do not know what it is called or ?)
339
no: 8.61254754103878e-16
yes: 0.999999999999999

for yes: to be more accurate (IF it actually matters)
10-8.61254754103878(X9)-16
(X9)-16 means to move the decimal point 16 places to left
and fill in with 9s
1.38745245896122(X9)-16 is a closer answer than just rounding to 1 or 0.999999999999999
.999999999999999138745245896122

added: for at least X number of matches for the BDay problem
2+: 23,0.507297234323982
3+: 88,0.511065110624736 (87,0.499454850631405)
4+: 187,0.502685373188966
5+: 313,0.501070475849204
6+: 460,0.50244941036937
7+: 623,0.502948948664566 (622,0.499795687887501)
8+: 798,0.500320275210389
9+: 985,0.500948416381545
10+:1181,0.500931161054265
Last edited by: 7craps on Mar 30, 2019
winsome johnny (not Win some johnny)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
March 30th, 2019 at 7:11:12 AM permalink
Quote: Ace2

Just curious...then why didn’t you use it before I did? I’d never seen it before yesterday, never had a need for that formula.

I did use it for a single Die and it broke down. So I moved over to a Markov chain solution to get an answer close to my simulation and have not returned to it until I saw this thread and your post here.

The pdf had no answers why it broke down.

This page shows more for the (-x)! problem and makes sense.
https://math.stackexchange.com/questions/1544460/group-of-r-people-at-least-three-people-have-the-same-birthday?noredirect=1&lq=1

where we take 1/n!=0 for n<0 (must have been added later)
again, lots of possible solutions
which are accurate all the time and which are not
winsome johnny (not Win some johnny)
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 4th, 2019 at 1:27:06 AM permalink
Here are my results for the probability of four people having a common birthday by number in the group. I stopped the program when the probability of no common birthday to four people was less than 1 in a million.

The smallest number needed to have a greater than 50% chance is 187, with a 50.3% chance.

People Probability*
4 0.0000000206
5 0.0000001026
6 0.0000003071
7 0.0000007150
8 0.0000014269
9 0.0000025629
10 0.0000042621
11 0.0000066829
12 0.0000100024
13 0.0000144163
14 0.0000201386
15 0.0000274016
16 0.0000364554
17 0.0000475679
18 0.0000610247
19 0.0000771284
20 0.0000961991
21 0.0001185734
22 0.0001446050
23 0.0001746637
24 0.0002091358
25 0.0002484237
26 0.0002929456
27 0.0003431352
28 0.0003994419
29 0.0004623302
30 0.0005322795
31 0.0006097840
32 0.0006953527
33 0.0007895086
34 0.0008927891
35 0.0010057453
36 0.0011289420
37 0.0012629575
38 0.0014083831
39 0.0015658233
40 0.0017358951
41 0.0019192279
42 0.0021164635
43 0.0023282555
44 0.0025552691
45 0.0027981811
46 0.0030576791
47 0.0033344619
48 0.0036292385
49 0.0039427286
50 0.0042756614
51 0.0046287760
52 0.0050028209
53 0.0053985534
54 0.0058167396
55 0.0062581541
56 0.0067235794
57 0.0072138055
58 0.0077296301
59 0.0082718575
60 0.0088412987
61 0.0094387710
62 0.0100650972
63 0.0107211059
64 0.0114076303
65 0.0121255084
66 0.0128755823
67 0.0136586978
68 0.0144757039
69 0.0153274525
70 0.0162147979
71 0.0171385959
72 0.0180997042
73 0.0190989810
74 0.0201372851
75 0.0212154750
76 0.0223344087
77 0.0234949430
78 0.0246979329
79 0.0259442312
80 0.0272346878
81 0.0285701492
82 0.0299514581
83 0.0313794524
84 0.0328549649
85 0.0343788228
86 0.0359518467
87 0.0375748502
88 0.0392486396
89 0.0409740125
90 0.0427517578
91 0.0445826550
92 0.0464674731
93 0.0484069703
94 0.0504018934
95 0.0524529768
96 0.0545609421
97 0.0567264973
98 0.0589503360
99 0.0612331369
100 0.0635755632
101 0.0659782614
102 0.0684418612
103 0.0709669743
104 0.0735541942
105 0.0762040949
106 0.0789172307
107 0.0816941352
108 0.0845353208
109 0.0874412778
110 0.0904124739
111 0.0934493532
112 0.0965523358
113 0.0997218173
114 0.1029581674
115 0.1062617299
116 0.1096328218
117 0.1130717325
118 0.1165787236
119 0.1201540276
120 0.1237978478
121 0.1275103576
122 0.1312916996
123 0.1351419854
124 0.1390612947
125 0.1430496749
126 0.1471071407
127 0.1512336731
128 0.1554292195
129 0.1596936927
130 0.1640269708
131 0.1684288964
132 0.1728992766
133 0.1774378821
134 0.1820444473
135 0.1867186694
136 0.1914602088
137 0.1962686881
138 0.2011436922
139 0.2060847678
140 0.2110914236
141 0.2161631296
142 0.2212993174
143 0.2264993796
144 0.2317626702
145 0.2370885041
146 0.2424761574
147 0.2479248672
148 0.2534338318
149 0.2590022105
150 0.2646291240
151 0.2703136545
152 0.2760548457
153 0.2818517033
154 0.2877031949
155 0.2936082507
156 0.2995657636
157 0.3055745896
158 0.3116335482
159 0.3177414229
160 0.3238969617
161 0.3300988777
162 0.3363458496
163 0.3426365222
164 0.3489695073
165 0.3553433841
166 0.3617567003
167 0.3682079725
168 0.3746956872
169 0.3812183018
170 0.3877742451
171 0.3943619186
172 0.4009796972
173 0.4076259303
174 0.4142989430
175 0.4209970368
176 0.4277184909
177 0.4344615634
178 0.4412244925
179 0.4480054975
180 0.4548027800
181 0.4616145254
182 0.4684389041
183 0.4752740728
184 0.4821181755
185 0.4889693456
186 0.4958257064
187 0.5026853732
188 0.5095464544
189 0.5164070529
190 0.5232652677
191 0.5301191954
192 0.5369669313
193 0.5438065713
194 0.5506362135
195 0.5574539590
196 0.5642579142
197 0.5710461918
198 0.5778169126
199 0.5845682068
200 0.5912982156
201 0.5980050928
202 0.6046870061
203 0.6113421387
204 0.6179686908
205 0.6245648809
206 0.6311289474
207 0.6376591501
208 0.6441537714
209 0.6506111178
210 0.6570295212
211 0.6634073405
212 0.6697429625
213 0.6760348034
214 0.6822813101
215 0.6884809614
216 0.6946322692
217 0.7007337794
218 0.7067840735
219 0.7127817691
220 0.7187255215
221 0.7246140243
222 0.7304460103
223 0.7362202530
224 0.7419355665
225 0.7475908073
226 0.7531848742
227 0.7587167097
228 0.7641853002
229 0.7695896769
230 0.7749289160
231 0.7802021396
232 0.7854085160
233 0.7905472598
234 0.7956176327
235 0.8006189436
236 0.8055505486
237 0.8104118517
238 0.8152023042
239 0.8199214054
240 0.8245687023
241 0.8291437895
242 0.8336463092
243 0.8380759511
244 0.8424324521
245 0.8467155959
246 0.8509252129
247 0.8550611798
248 0.8591234190
249 0.8631118982
250 0.8670266300
251 0.8708676712
252 0.8746351222
253 0.8783291262
254 0.8819498689
255 0.8854975772
256 0.8889725189
257 0.8923750015
258 0.8957053716
259 0.8989640138
260 0.9021513497
261 0.9052678373
262 0.9083139695
263 0.9112902735
264 0.9141973095
265 0.9170356696
266 0.9198059767
267 0.9225088837
268 0.9251450717
269 0.9277152494
270 0.9302201519
271 0.9326605389
272 0.9350371943
273 0.9373509246
274 0.9396025573
275 0.9417929406
276 0.9439229414
277 0.9459934441
278 0.9480053499
279 0.9499595753
280 0.9518570505
281 0.9536987190
282 0.9554855354
283 0.9572184653
284 0.9588984832
285 0.9605265717
286 0.9621037206
287 0.9636309253
288 0.9651091860
289 0.9665395064
290 0.9679228930
291 0.9692603534
292 0.9705528961
293 0.9718015286
294 0.9730072573
295 0.9741710859
296 0.9752940147
297 0.9763770399
298 0.9774211525
299 0.9784273375
300 0.9793965730
301 0.9803298300
302 0.9812280707
303 0.9820922487
304 0.9829233078
305 0.9837221815
306 0.9844897926
307 0.9852270522
308 0.9859348595
309 0.9866141012
310 0.9872656511
311 0.9878903695
312 0.9884891028
313 0.9890626833
314 0.9896119288
315 0.9901376421
316 0.9906406110
317 0.9911216078
318 0.9915813893
319 0.9920206964
320 0.9924402542
321 0.9928407714
322 0.9932229409
323 0.9935874390
324 0.9939349259
325 0.9942660452
326 0.9945814242
327 0.9948816741
328 0.9951673895
329 0.9954391488
330 0.9956975142
331 0.9959430321
332 0.9961762326
333 0.9963976302
334 0.9966077237
335 0.9968069963
336 0.9969959162
337 0.9971749362
338 0.9973444943
339 0.9975050139
340 0.9976569040
341 0.9978005591
342 0.9979363602
343 0.9980646744
344 0.9981858555
345 0.9983002440
346 0.9984081678
347 0.9985099421
348 0.9986058699
349 0.9986962422
350 0.9987813384
351 0.9988614264
352 0.9989367633
353 0.9990075953
354 0.9990741580
355 0.9991366772
356 0.9991953685
357 0.9992504383
358 0.9993020835
359 0.9993504921
360 0.9993958436
361 0.9994383091
362 0.9994780515
363 0.9995152260
364 0.9995499803
365 0.9995824550
366 0.9996127836
367 0.9996410928
368 0.9996675032
369 0.9996921289
370 0.9997150782
371 0.9997364538
372 0.9997563529
373 0.9997748675
374 0.9997920845
375 0.9998080861
376 0.9998229501
377 0.9998367496
378 0.9998495540
379 0.9998614284
380 0.9998724342
381 0.9998826293
382 0.9998920682
383 0.9999008020
384 0.9999088788
385 0.9999163440
386 0.9999232398
387 0.9999296061
388 0.9999354802
389 0.9999408971
390 0.9999458894
391 0.9999504879
392 0.9999547210
393 0.9999586157
394 0.9999621968
395 0.9999654876
396 0.9999685101
397 0.9999712843
398 0.9999738291
399 0.9999761623
400 0.9999783000
401 0.9999802575
402 0.9999820490
403 0.9999836874
404 0.9999851851
405 0.9999865532
406 0.9999878021
407 0.9999889417
408 0.9999899808
409 0.9999909277
410 0.9999917901
411 0.9999925749
412 0.9999932888
413 0.9999939378
414 0.9999945273
415 0.9999950626
416 0.9999955482
417 0.9999959886
418 0.9999963876
419 0.9999967490
420 0.9999970760
421 0.9999973718
422 0.9999976391
423 0.9999978806
424 0.9999980986
425 0.9999982953
426 0.9999984726
427 0.9999986323
428 0.9999987761
429 0.9999989055
430 0.9999990218


* Probability no four people in the group share the same birthday
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 4th, 2019 at 6:07:52 AM permalink
Here are the results for the probability of five people sharing a common birthday. The median is 313.

People Probability*
5 0.0000000001
7 0.0000000012
8 0.0000000031
9 0.0000000070
10 0.0000000140
11 0.0000000257
12 0.0000000439
13 0.0000000712
14 0.0000001105
15 0.0000001654
16 0.0000002400
17 0.0000003392
18 0.0000004686
19 0.0000006345
20 0.0000008441
21 0.0000011053
22 0.0000014272
23 0.0000018195
24 0.0000022930
25 0.0000028597
26 0.0000035326
27 0.0000043255
28 0.0000052539
29 0.0000063339
30 0.0000075834
31 0.0000090211
32 0.0000106673
33 0.0000125436
34 0.0000146727
35 0.0000170792
36 0.0000197887
37 0.0000228285
38 0.0000262274
39 0.0000300158
40 0.0000342256
41 0.0000388903
42 0.0000440452
43 0.0000497270
44 0.0000559744
45 0.0000628276
46 0.0000703289
47 0.0000785219
48 0.0000874526
49 0.0000971683
50 0.0001077187
51 0.0001191549
52 0.0001315304
53 0.0001449002
54 0.0001593218
55 0.0001748542
56 0.0001915588
57 0.0002094988
58 0.0002287396
59 0.0002493488
60 0.0002713960
61 0.0002949528
62 0.0003200932
63 0.0003468932
64 0.0003754312
65 0.0004057877
66 0.0004380454
67 0.0004722892
68 0.0005086066
69 0.0005470869
70 0.0005878221
71 0.0006309063
72 0.0006764360
73 0.0007245101
74 0.0007752298
75 0.0008286987
76 0.0008850227
77 0.0009443102
78 0.0010066720
79 0.0010722212
80 0.0011410735
81 0.0012133469
82 0.0012891619
83 0.0013686415
84 0.0014519111
85 0.0015390986
86 0.0016303342
87 0.0017257510
88 0.0018254840
89 0.0019296713
90 0.0020384530
91 0.0021519719
92 0.0022703734
93 0.0023938051
94 0.0025224174
95 0.0026563631
96 0.0027957973
97 0.0029408778
98 0.0030917650
99 0.0032486214
100 0.0034116124
101 0.0035809056
102 0.0037566712
103 0.0039390818
104 0.0041283125
105 0.0043245408
106 0.0045279467
107 0.0047387126
108 0.0049570234
109 0.0051830661
110 0.0054170306
111 0.0056591088
112 0.0059094950
113 0.0061683860
114 0.0064359809
115 0.0067124810
116 0.0069980899
117 0.0072930137
118 0.0075974606
119 0.0079116409
120 0.0082357674
121 0.0085700549
122 0.0089147205
123 0.0092699832
124 0.0096360643
125 0.0100131873
126 0.0104015775
127 0.0108014623
128 0.0112130713
129 0.0116366357
130 0.0120723889
131 0.0125205661
132 0.0129814044
133 0.0134551427
134 0.0139420216
135 0.0144422836
136 0.0149561727
137 0.0154839347
138 0.0160258171
139 0.0165820686
140 0.0171529399
141 0.0177386829
142 0.0183395508
143 0.0189557985
144 0.0195876820
145 0.0202354587
146 0.0208993870
147 0.0215797267
148 0.0222767386
149 0.0229906846
150 0.0237218274
151 0.0244704307
152 0.0252367593
153 0.0260210785
154 0.0268236544
155 0.0276447538
156 0.0284846441
157 0.0293435931
158 0.0302218692
159 0.0311197411
160 0.0320374778
161 0.0329753486
162 0.0339336228
163 0.0349125698
164 0.0359124592
165 0.0369335602
166 0.0379761419
167 0.0390404734
168 0.0401268230
169 0.0412354589
170 0.0423666487
171 0.0435206592
172 0.0446977568
173 0.0458982068
174 0.0471222737
175 0.0483702211
176 0.0496423113
177 0.0509388056
178 0.0522599640
179 0.0536060448
180 0.0549773052
181 0.0563740004
182 0.0577963843
183 0.0592447086
184 0.0607192233
185 0.0622201763
186 0.0637478133
187 0.0653023777
188 0.0668841106
189 0.0684932506
190 0.0701300336
191 0.0717946930
192 0.0734874591
193 0.0752085593
194 0.0769582180
195 0.0787366562
196 0.0805440919
197 0.0823807393
198 0.0842468093
199 0.0861425089
200 0.0880680413
201 0.0900236059
202 0.0920093979
203 0.0940256083
204 0.0960724238
205 0.0981500266
206 0.1002585944
207 0.1023983001
208 0.1045693119
209 0.1067717927
210 0.1090059007
211 0.1112717886
212 0.1135696037
213 0.1158994881
214 0.1182615781
215 0.1206560041
216 0.1230828909
217 0.1255423571
218 0.1280345153
219 0.1305594717
220 0.1331173263
221 0.1357081722
222 0.1383320964
223 0.1409891786
224 0.1436794920
225 0.1464031026
226 0.1491600693
227 0.1519504437
228 0.1547742701
229 0.1576315852
230 0.1605224181
231 0.1634467903
232 0.1664047154
233 0.1693961988
234 0.1724212381
235 0.1754798228
236 0.1785719337
237 0.1816975436
238 0.1848566167
239 0.1880491084
240 0.1912749658
241 0.1945341267
242 0.1978265206
243 0.2011520675
244 0.2045106786
245 0.2079022559
246 0.2113266923
247 0.2147838710
248 0.2182736663
249 0.2217959427
250 0.2253505553
251 0.2289373496
252 0.2325561615
253 0.2362068169
254 0.2398891322
255 0.2436029141
256 0.2473479589
257 0.2511240536
258 0.2549309748
259 0.2587684893
260 0.2626363538
261 0.2665343151
262 0.2704621097
263 0.2744194642
264 0.2784060950
265 0.2824217084
266 0.2864660006
267 0.2905386578
268 0.2946393558
269 0.2987677605
270 0.3029235279
271 0.3071063035
272 0.3113157232
273 0.3155514127
274 0.3198129877
275 0.3241000540
276 0.3284122077
277 0.3327490349
278 0.3371101120
279 0.3414950058
280 0.3459032733
281 0.3503344621
282 0.3547881103
283 0.3592637466
284 0.3637608905
285 0.3682790523
286 0.3728177332
287 0.3773764254
288 0.3819546123
289 0.3865517687
290 0.3911673607
291 0.3958008458
292 0.4004516735
293 0.4051192850
294 0.4098031133
295 0.4145025838
296 0.4192171142
297 0.4239461145
298 0.4286889875
299 0.4334451288
300 0.4382139270
301 0.4429947640
302 0.4477870151
303 0.4525900490
304 0.4574032286
305 0.4622259106
306 0.4670574460
307 0.4718971803
308 0.4767444538
309 0.4815986015
310 0.4864589539
311 0.4913248368
312 0.4961955716
313 0.5010704758
314 0.5059488630
315 0.5108300433
316 0.5157133233
317 0.5205980070
318 0.5254833953
319 0.5303687869
320 0.5352534780
321 0.5401367634
322 0.5450179357
323 0.5498962867
324 0.5547711068
325 0.5596416859
326 0.5645073134
327 0.5693672786
328 0.5742208707
329 0.5790673799
330 0.5839060966
331 0.5887363127
332 0.5935573214
333 0.5983684174
334 0.6031688977
335 0.6079580613
336 0.6127352102
337 0.6174996491
338 0.6222506860
339 0.6269876324
340 0.6317098038
341 0.6364165199
342 0.6411071047
343 0.6457808872
344 0.6504372014
345 0.6550753866
346 0.6596947881
347 0.6642947570
348 0.6688746506
349 0.6734338331
350 0.6779716753
351 0.6824875554
352 0.6869808588
353 0.6914509790
354 0.6958973171
355 0.7003192829
356 0.7047162944
357 0.7090877787
358 0.7134331719
359 0.7177519192
360 0.7220434758
361 0.7263073064
362 0.7305428860
363 0.7347496997
364 0.7389272432
365 0.7430750229
366 0.7471925564
367 0.7512793721
368 0.7553350101
369 0.7593590217
370 0.7633509703
371 0.7673104310
372 0.7712369910
373 0.7751302499
374 0.7789898196
375 0.7828153245
376 0.7866064018
377 0.7903627015
378 0.7940838866
379 0.7977696331
380 0.8014196301
381 0.8050335802
382 0.8086111990
383 0.8121522160
384 0.8156563738
385 0.8191234288
386 0.8225531508
387 0.8259453237
388 0.8292997446
389 0.8326162246
390 0.8358945885
391 0.8391346750
392 0.8423363362
393 0.8454994383
394 0.8486238611
395 0.8517094980
396 0.8547562563
397 0.8577640565
398 0.8607328332
399 0.8636625340
400 0.8665531203
401 0.8694045666
402 0.8722168609
403 0.8749900040
404 0.8777240101
405 0.8804189062
406 0.8830747321
407 0.8856915403
408 0.8882693959
409 0.8908083763
410 0.8933085712
411 0.8957700826
412 0.8981930239
413 0.9005775209
414 0.9029237105
415 0.9052317411
416 0.9075017724
417 0.9097339751
418 0.9119285304
419 0.9140856304
420 0.9162054773
421 0.9182882837
422 0.9203342720
423 0.9223436740
424 0.9243167314
425 0.9262536948
426 0.9281548238
427 0.9300203867
428 0.9318506603
429 0.9336459296
430 0.9354064875
431 0.9371326346
432 0.9388246788
433 0.9404829353
434 0.9421077261
435 0.9436993798
436 0.9452582315
437 0.9467846220
438 0.9482788983
439 0.9497414126
440 0.9511725226
441 0.9525725907
442 0.9539419842
443 0.9552810748
444 0.9565902382
445 0.9578698541
446 0.9591203057
447 0.9603419797
448 0.9615352657
449 0.9627005562
450 0.9638382461
451 0.9649487327
452 0.9660324152
453 0.9670896946
454 0.9681209735
455 0.9691266554
456 0.9701071453
457 0.9710628485
458 0.9719941710
459 0.9729015191
460 0.9737852990
461 0.9746459169
462 0.9754837784
463 0.9762992884
464 0.9770928513
465 0.9778648701
466 0.9786157466
467 0.9793458812
468 0.9800556725
469 0.9807455174
470 0.9814158107
471 0.9820669448
472 0.9826993099
473 0.9833132935
474 0.9839092804
475 0.9844876526
476 0.9850487889
477 0.9855930650
478 0.9861208531
479 0.9866325221
480 0.9871284372
481 0.9876089599
482 0.9880744478
483 0.9885252547
484 0.9889617301
485 0.9893842194
486 0.9897930639
487 0.9901886003
488 0.9905711610
489 0.9909410738
490 0.9912986620
491 0.9916442443
492 0.9919781344
493 0.9923006414
494 0.9926120697
495 0.9929127187
496 0.9932028827
497 0.9934828514
498 0.9937529092
499 0.9940133358
500 0.9942644056
501 0.9945063881
502 0.9947395476
503 0.9949641437
504 0.9951804304
505 0.9953886570
506 0.9955890678
507 0.9957819017
508 0.9959673929
509 0.9961457704
510 0.9963172583
511 0.9964820756
512 0.9966404365
513 0.9967925502
514 0.9969386211
515 0.9970788486
516 0.9972134275
517 0.9973425476
518 0.9974663943
519 0.9975851481
520 0.9976989850
521 0.9978080762
522 0.9979125888
523 0.9980126851
524 0.9981085232
525 0.9982002568
526 0.9982880354
527 0.9983720041
528 0.9984523041
529 0.9985290723
530 0.9986024419
531 0.9986725418
532 0.9987394973
533 0.9988034298
534 0.9988644569
535 0.9989226927
536 0.9989782476
537 0.9990312286
538 0.9990817391
539 0.9991298792
540 0.9991757457
541 0.9992194323
542 0.9992610293
543 0.9993006242
544 0.9993383014
545 0.9993741421
546 0.9994082251
547 0.9994406260
548 0.9994714181
549 0.9995006716
550 0.9995284544
551 0.9995548320
552 0.9995798671
553 0.9996036202
554 0.9996261497
555 0.9996475115
556 0.9996677595
557 0.9996869452
558 0.9997051184
559 0.9997223268
560 0.9997386161
561 0.9997540302
562 0.9997686112
563 0.9997823995
564 0.9997954337
565 0.9998077509
566 0.9998193865
567 0.9998303745
568 0.9998407474
569 0.9998505361
570 0.9998597705
571 0.9998684788
572 0.9998766882
573 0.9998844245
574 0.9998917125
575 0.9998985757
576 0.9999050366
577 0.9999111166
578 0.9999168361
579 0.9999222147
580 0.9999272707
581 0.9999320220
582 0.9999364851
583 0.9999406761
584 0.9999446101
585 0.9999483016
586 0.9999517642
587 0.9999550110
588 0.9999580543
589 0.9999609057
590 0.9999635765
591 0.9999660770
592 0.9999684174
593 0.9999706070
594 0.9999726548
595 0.9999745693
596 0.9999763584
597 0.9999780297
598 0.9999795905
599 0.9999810474
600 0.9999824069
601 0.9999836750
602 0.9999848573
603 0.9999859593
604 0.9999869860
605 0.9999879422
606 0.9999888324
607 0.9999896608
608 0.9999904315
609 0.9999911480
610 0.9999918141
611 0.9999924330
612 0.9999930078
613 0.9999935414
614 0.9999940367
615 0.9999944961
616 0.9999949221
617 0.9999953170
618 0.9999956829
619 0.9999960218
620 0.9999963355
621 0.9999966258
622 0.9999968944
623 0.9999971428
624 0.9999973723
625 0.9999975844
626 0.9999977802
627 0.9999979611
628 0.9999981279
629 0.9999982818
630 0.9999984237
631 0.9999985545
632 0.9999986749
633 0.9999987859
634 0.9999988880
635 0.9999989819
636 0.9999990683


* Probability that five people or more share a common birthday
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
April 4th, 2019 at 1:59:48 PM permalink
Quote: 7craps

added: for at least X number of matches for the BDay problem

2+: 23,0.507297234323982
3+: 88,0.511065110624736 (87,0.499454850631405)
4+: 187,0.502685373188966
5+: 313,0.501070475849204
6+: 460,0.50244941036937
7+: 623,0.502948948664566 (622,0.499795687887501)
8+: 798,0.500320275210389
9+: 985,0.500948416381545
10+:1181,0.500931161054265

Thought I would throw on the 'mean' for at least 2 to 10 matches for the BDay problem.
one can compare it to the median values above.
(Good job of taking over a thread. Maybe Google can find it in the future)
This was done using some R code talked about earlier in the thread.
(not posted yet)
[1] For at least 2 matches, 24.6166: average number of people
[1] For at least 3 matches, 88.7389: average number of people
[1] For at least 4 matches, 187.052: average number of people
[1] For at least 5 matches, 311.449: average number of people
[1] For at least 6 matches, 456.016: average number of people
[1] For at least 7 matches, 616.617: average number of people
[1] For at least 8 matches, 790.3: average number of people
[1] For at least 9 matches, 974.894: average number of people
[1] For at least 10 matches, 1168.76: average number of people
winsome johnny (not Win some johnny)
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 6th, 2019 at 5:59:20 AM permalink
7Craps, that is some good stuff. I'm impressed you could calculate this much so fast. I'll have to look over your previous posts more carefully. The following list for six people having a common birthday took days of computer time. I had to start going in groups of 10 people because it was going so slowly. We agree on the median probability at 460 people.

People Probability*
6 0.0000000000
7 0.0000000000
8 0.0000000000
9 0.0000000000
10 0.0000000000
11 0.0000000001
12 0.0000000001
13 0.0000000003
14 0.0000000005
15 0.0000000008
16 0.0000000012
17 0.0000000019
18 0.0000000028
19 0.0000000041
20 0.0000000058
21 0.0000000081
22 0.0000000111
23 0.0000000150
24 0.0000000199
25 0.0000000261
26 0.0000000339
27 0.0000000435
28 0.0000000552
29 0.0000000695
30 0.0000000866
31 0.0000001072
32 0.0000001316
33 0.0000001605
34 0.0000001944
35 0.0000002340
36 0.0000002802
37 0.0000003336
38 0.0000003953
39 0.0000004661
40 0.0000005470
41 0.0000006393
42 0.0000007441
43 0.0000008627
44 0.0000009966
45 0.0000011472
46 0.0000013162
47 0.0000015053
48 0.0000017163
49 0.0000019512
50 0.0000022121
51 0.0000025011
52 0.0000028208
53 0.0000031734
54 0.0000035617
55 0.0000039885
56 0.0000044566
57 0.0000049693
58 0.0000055296
59 0.0000061412
60 0.0000068076
61 0.0000075326
62 0.0000083201
63 0.0000091743
64 0.0000100997
65 0.0000111007
66 0.0000121822
67 0.0000133491
68 0.0000146067
69 0.0000159604
70 0.0000174158
71 0.0000189788
72 0.0000206557
73 0.0000224528
74 0.0000243767
75 0.0000264344
76 0.0000286330
77 0.0000309800
78 0.0000334831
79 0.0000361503
80 0.0000389900
81 0.0000420106
82 0.0000452211
83 0.0000486308
84 0.0000522490
85 0.0000560857
86 0.0000601510
87 0.0000644554
88 0.0000690098
89 0.0000738253
90 0.0000789134
91 0.0000842860
92 0.0000899554
93 0.0000959342
94 0.0001022353
95 0.0001088721
96 0.0001158585
97 0.0001232085
98 0.0001309366
99 0.0001390579
100 0.0001475877
101 0.0001565418
102 0.0001659363
103 0.0001757880
104 0.0001861138
105 0.0001969314
106 0.0002082586
107 0.0002201138
108 0.0002325161
109 0.0002454846
110 0.0002590392
111 0.0002732003
112 0.0002879885
113 0.0003034251
114 0.0003195320
115 0.0003363313
116 0.0003538459
117 0.0003720990
118 0.0003911145
119 0.0004109166
120 0.0004315303
121 0.0004529809
122 0.0004752945
123 0.0004984974
124 0.0005226168
125 0.0005476802
126 0.0005737159
127 0.0006007526
128 0.0006288195
129 0.0006579467
130 0.0006881647
131 0.0007195044
132 0.0007519977
133 0.0007856768
134 0.0008205746
135 0.0008567246
136 0.0008941611
137 0.0009329187
138 0.0009730328
139 0.0010145396
140 0.0010574756
141 0.0011018783
142 0.0011477855
143 0.0011952360
144 0.0012442689
145 0.0012949244
146 0.0013472429
147 0.0014012659
148 0.0014570352
149 0.0015145937
150 0.0015739845
151 0.0016352519
152 0.0016984405
153 0.0017635958
154 0.0018307639
155 0.0018999918
156 0.0019713270
157 0.0020448178
158 0.0021205132
159 0.0021984630
160 0.0022787177
161 0.0023613285
162 0.0024463474
163 0.0025338269
164 0.0026238207
165 0.0027163828
166 0.0028115682
167 0.0029094326
168 0.0030100324
169 0.0031134248
170 0.0032196678
171 0.0033288202
172 0.0034409414
173 0.0035560917
174 0.0036743321
175 0.0037957245
176 0.0039203315
177 0.0040482164
178 0.0041794433
179 0.0043140773
180 0.0044521840
181 0.0045938299
182 0.0047390824
183 0.0048880095
184 0.0050406801
185 0.0051971639
186 0.0053575313
187 0.0055218535
188 0.0056902027
189 0.0058626515
190 0.0060392738
191 0.0062201439
192 0.0064053369
193 0.0065949290
194 0.0067889969
195 0.0069876183
196 0.0071908715
197 0.0073988356
198 0.0076115908
199 0.0078292177
200 0.0080517980
201 0.0082794138
202 0.0085121485
203 0.0087500858
204 0.0089933106
205 0.0092419082
206 0.0094959649
207 0.0097555677
208 0.0100208045
209 0.0102917638
210 0.0105685349
211 0.0108512080
212 0.0111398739
213 0.0114346242
214 0.0117355512
215 0.0120427482
216 0.0123563089
217 0.0126763280
218 0.0130029008
219 0.0133361233
220 0.0136760922
221 0.0140229053
222 0.0143766605
223 0.0147374569
224 0.0151053940
225 0.0154805723
226 0.0158630926
227 0.0162530566
228 0.0166505668
229 0.0170557260
230 0.0174686381
231 0.0178894073
232 0.0183181386
233 0.0187549376
234 0.0191999105
235 0.0196531641
236 0.0201148060
237 0.0205849440
238 0.0210636870
239 0.0215511440
240 0.0220474248
241 0.0225526398
242 0.0230668998
243 0.0235903163
244 0.0241230011
245 0.0246650666
246 0.0252166259
247 0.0257777923
248 0.0263486798
249 0.0269294025
250 0.0275200754
251 0.0281208137
252 0.0287317329
253 0.0293529491
254 0.0299845789
255 0.0306267388
256 0.0312795462
257 0.0319431185
258 0.0326175735
259 0.0333030294
260 0.0339996046
261 0.0347074178
262 0.0354265880
263 0.0361572343
264 0.0368994762
265 0.0376534333
266 0.0384192254
267 0.0391969726
268 0.0399867949
269 0.0407888125
270 0.0416031460
271 0.0424299156
272 0.0432692420
273 0.0441212456
274 0.0449860471
275 0.0458637670
276 0.0467545259
277 0.0476584444
278 0.0485756428
279 0.0495062415
280 0.0504503609
281 0.0514081209
282 0.0523796415
283 0.0533650426
284 0.0543644436
285 0.0553779638
286 0.0564057224
287 0.0574478380
288 0.0585044291
289 0.0595756138
290 0.0606615099
291 0.0617622347
292 0.0628779050
293 0.0640086374
294 0.0651545478
295 0.0663157517
296 0.0674923640
297 0.0686844991
298 0.0698922707
299 0.0711157919
300 0.0723551752
301 0.0736105324
302 0.0748819746
303 0.0761696119
304 0.0774735540
305 0.0787939096
306 0.0801307864
307 0.0814842915
308 0.0828545309
309 0.0842416097
310 0.0856456320
311 0.0870667009
312 0.0885049184
313 0.0899603856
314 0.0914332023
315 0.0929234671
316 0.0944312775
317 0.0959567299
318 0.0974999192
319 0.0990609392
320 0.1006398823
321 0.1022368394
322 0.1038519001
323 0.1054851528
324 0.1071366840
325 0.1088065788
326 0.1104949211
327 0.1122017926
328 0.1139272740
329 0.1156714439
330 0.1174343793
331 0.1192161555
332 0.1210168461
333 0.1228365227
334 0.1246752552
335 0.1265331116
336 0.1284101577
337 0.1303064578
338 0.1322220738
339 0.1341570657
340 0.1361114914
341 0.1380854066
342 0.1400788651
343 0.1420919182
344 0.1441246150
345 0.1461770024
346 0.1482491251
347 0.1503410253
348 0.1524527427
349 0.1545843147
350 0.1567357764
351 0.1589071600
352 0.1610984955
353 0.1633098101
354 0.1655411285
355 0.1677924727
356 0.1700638621
357 0.1723553132
358 0.1746668398
359 0.1769984530
360 0.1793501608
361 0.1817219686
362 0.1841138789
363 0.1865258909
364 0.1889580013
365 0.1914102034
366 0.1938824876
367 0.1963748412
368 0.1988872485
369 0.2014196905
370 0.2039721450
371 0.2065445868
372 0.2091369872
373 0.2117493144
374 0.2143815332
375 0.2170336051
376 0.2197054884
377 0.2223971376
378 0.2251085043
379 0.2278395362
380 0.2305901778
381 0.2333603701
382 0.2361500503
383 0.2389591525
384 0.2417876068
385 0.2446353399
386 0.2475022750
387 0.2503883314
388 0.2532934250
389 0.2562174679
390 0.2591603684
391 0.2621220312
392 0.2651023574
393 0.2681012441
394 0.2711185848
395 0.2741542692
396 0.2772081831
397 0.2802802087
398 0.2833702242
399 0.2864781041
400 0.2896037190
401 0.2927469356
402 0.2959076169
403 0.2990856221
404 0.3022808062
405 0.3054930206
406 0.3087221129
407 0.3119679267
408 0.3152303017
409 0.3185090739
410 0.3218040752
411 0.3251151339
412 0.3284420742
413 0.3317847167
414 0.3351428780
415 0.3385163708
416 0.3419050042
417 0.3453085834
418 0.3487269096
419 0.3521597806
420 0.3556069901
421 0.3590683281
422 0.3625435811
423 0.3660325317
424 0.3695349588
425 0.3730506376
426 0.3765793398
427 0.3801208334
428 0.3836748827
429 0.3872412486
430 0.3908196885
431 0.3944099561
432 0.3980118017
433 0.4016249722
434 0.4052492111
435 0.4088842585
436 0.4125298512
437 0.4161857227
438 0.4198516033
439 0.4235272200
440 0.4272122967
441 0.4309065541
442 0.4346097101
443 0.4383214793
444 0.4420415734
445 0.4457697012
446 0.4495055688
447 0.4532488793
448 0.4569993330
449 0.4607566277
450 0.4645204585
451 0.4682905178
452 0.4720664958
453 0.4758480798
454 0.4796349552
455 0.4834268046
456 0.4872233089
457 0.4910241462
458 0.4948289931
459 0.4986375237
460 0.5024494104
461 0.5062643235
462 0.5100819317
463 0.5139019018
464 0.5177238991
465 0.5215475871
466 0.5253726280
467 0.5291986823
468 0.5330254096
469 0.5368524678
470 0.5406795140
471 0.5445062038
472 0.5483321923
473 0.5521571331
474 0.5559806796
475 0.5598024840
476 0.5636221980
477 0.5674394728
478 0.5712539591
479 0.5750653073
480 0.5788731673
481 0.5826771891
482 0.5864770224
483 0.5902723170
484 0.5940627228
485 0.5978478899
486 0.6016274687
487 0.6054011100
488 0.6091684651
489 0.6129291857
490 0.6166829246
491 0.6204293349
492 0.6241680710
493 0.6279000000
500 0.6537605648
510 0.6897667626
520 0.7243809408
530 0.7573108330
540 0.7883012600
550 0.8171416340
560 0.8436717536
570 0.8677855381
580 0.8894324667
590 0.9086166356
600 0.9253934985
610 0.9398645199
620 0.9521701040
630 0.9624812818
640 0.9709907059
650 0.9779035263
660 0.9834286938
670 0.9877711665
680 0.9911253836


* Probability represents probability at least six people will share at least one common birthday.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
April 6th, 2019 at 8:28:09 AM permalink
Quote: Wizard

7Craps, that is some good stuff. I'm impressed you could calculate this much so fast. I'll have to look over your previous posts more carefully.

I think I mentioned that the R code I used was from a webpage that started with Mathematica code first and then the author converted that to R. I made some changes since but cannot find that original page.
I found a page with the R code but it is different from what I remember.
https://stats.stackexchange.com/questions/333471/die-100-rolls-no-face-appearing-more-than-20-times
maybe searching the author can find both code versions as I remember the explanation and code was well done.

Someday I will clean it up and post it and give proper credit.

For the at least 6 people share a BDay, it uses the multinomial distribution for no more than 5 share and subtract from 1.
I now use Microsoft R Open 3.5.1 in my win 10 laptop as it is 10 times faster than basic R.
1826                0                     1                    0    
> end.time <- Sys.time()
> print(end.time - start.time)
Time difference of 8.573598 secs
> trialsSeq <- 0:n
> meanBDay <- crossprod(trialsSeq,yesPdf)
> #meanBDay
> print(sprintf("For at least %g matches, %g: average number of people",m+1,meanBDay),quote=0)
[1] For at least 6 matches, 456.016: average number of people
9 seconds from start, I can live with. Distribution from 0 to 1826
here is a link to the text file code and results in Google Drive
https://drive.google.com/open?id=1EK6yXUEfgQxgZp2Y5C3IZm6n0Z1n10kM
winsome johnny (not Win some johnny)
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 6th, 2019 at 7:30:06 PM permalink
I'm afraid I don't know much about R code, in fact this thread is the first I've heard of it, to be honest. Perhaps it found a faster way to do simple math calculations, which are slow in C++, and this project is a perfect example. I hope we can discuss it over a beer sometime.

It took my program about a day to calculate the probability of 7 people not sharing a birthday out of 800 (6.23859%).
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Ace2
Ace2
  • Threads: 32
  • Posts: 2672
Joined: Oct 2, 2017
April 7th, 2019 at 12:43:12 AM permalink
Quote: Wizard


It took my program about a day to calculate the probability of 7 people not sharing a birthday out of 800 (6.23859%).

A somewhat decent/easy approximation is to use Poisson distribution to determine the probability of any selected birthday having less than 7 hits after 800 draws, which is 99.268105%. Then take that to the 365th power to account for all birthdays which is 6.85%.

You can also use the binomial distribution to calculate the exact probability of any selected birthday having less than 7 hits after 800 draws, which is 99.277063%. Then take that to the 365th for 7.08%. But the Poisson calculation is much easier if you like to count with your fingers.

I was expecting more accuracy from this approximation since the results of the birthdays seem effectively independent in this scenario.
Last edited by: Ace2 on Apr 7, 2019
It’s all about making that GTA
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 8th, 2019 at 5:59:12 PM permalink
Those are both good ideas for finding estimates. I did the Poisson before and found it surprisingly accurate. However, perfectionists like me seek exact answers wherever possible.

My table below shows the probability a birthday common to seven or more people out of 600 is 43.143%. The Poisson estimate is 43.330%. Not bad.

Here are my results for seven people. This table took about five days of computer time. Until I learn R code, I'm taking this project off my desk for now.

People Common Birthday
100 0.0000054175
200 0.0006086869
300 0.0084681973
400 0.0499840887
500 0.1780872266
600 0.4314305835
700 0.7383784089
800 0.9376140797
900 0.9943841169
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Dalex64
Dalex64
  • Threads: 1
  • Posts: 1067
Joined: Feb 10, 2013
April 8th, 2019 at 7:59:11 PM permalink
Quote: Wizard

I'm afraid I don't know much about R code, in fact this thread is the first I've heard of it, to be honest. Perhaps it found a faster way to do simple math calculations, which are slow in C++, and this project is a perfect example. I hope we can discuss it over a beer sometime.

It took my program about a day to calculate the probability of 7 people not sharing a birthday out of 800 (6.23859%).



I am surprised that you don't know much about R. It seems like the sort of thing that is right up your alley.

It is pretty easy to set up and play with, either directly or with a science and math distribution like Anaconda.

I am not sure about what online resources are out there for it, but here is one:
http://www.r-tutor.com/elementary-statistics/probability-distributions/poisson-distribution
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 8th, 2019 at 8:25:06 PM permalink
Trust me, I could teach a college course on Poisson. However, I will need to get up to speed on R.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
April 9th, 2019 at 7:31:21 AM permalink
Quote: Wizard

However, perfectionists like me seek exact answers wherever possible.

many like also having arbitrary precision with computer calculations, and there are many good ones to select from.

Quote: Wizard

My table below shows the probability a birthday common to seven or more people out of 600 is 43.143%. The Poisson estimate is 43.330%. Not bad.

Here are my results for seven people. This table took about five days of computer time. Until I learn R code, I'm taking this project off my desk for now.

here is a link to the R text file produced. (for at least 7 people)
https://drive.google.com/open?id=1TVr6nrADb1RjS4AmdY4CgwSLskid_I6E

the end of the results for the mean
Time difference of 9.15665 secs
> trialsSeq <- 0:n
> meanBDay <- crossprod(trialsSeq,yesPdf)
> #meanBDay
> print(sprintf("For at least %g matches, %g: average number of people",m+1,meanBDay),quote=0)
[1] For at least 7 matches, 616.617: average number of people
9 seconds.
You knowing C++ should easily grasp R (it is so basic - but not Basic)
R uses a lot of functions written in C, but base R is really simple and one does not need to know the code behind the function, but can if wants to.

I like , now, using pari/gp as I love the precision one can easily select.
R will produce results like this
7    1.0000000000000024425      -2.4424906541753443889e-15 -2.4424906541753443889e-15
for very small values used in calculations, where pari/gp does not (has more of a learning curve)


I would suggest, IF you have a windows machine, to use Microsoft R Open 3.5.1
(on my dell i7 quad-core, 10 times faster than just R)
some even like using R Studio (helps with coding and such)

whatever the decision, thanks!
I may take you up on that beer offer in the future. (root beer)
winsome johnny (not Win some johnny)
Wizard
Administrator
Wizard
  • Threads: 1493
  • Posts: 26497
Joined: Oct 14, 2009
April 9th, 2019 at 9:47:00 AM permalink
Thank you for all the suggestions! When things get a bit slow for me, I think I will indeed learn R. I already know several languages, so picking up new ones comes easily.

Do you mind if I use those numbers for 7 people sharing a birthday? Full credit to 7craps, of course.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
LuckyPhow
LuckyPhow
  • Threads: 55
  • Posts: 698
Joined: May 19, 2016
April 9th, 2019 at 10:33:50 AM permalink
Quote: Dalex64

I am surprised that you [Wizard] don't know much about R. It seems like the sort of thing that is right up your alley. It is pretty easy to set up and play with, either directly or with a science and math distribution like Anaconda.



Sorry coming a bit late to the party. I agree the Wiz is in for a pleasant surprise once he starts playing with R.

In my research I find it is increasingly common for journal articles to include links to the author's R code and to the raw data the author analyzed. This allows others to more easily review results of the research and how the author obtained those results. That often allows the reader to leverage the author's findings in their own research. The result has been an explosion of add-ins for R for hundreds of different, specialized applications, such as metallurgy and microbiology (and other equally diverse tool-sets).

Sort of an R newbie, myself, I was not aware of Anaconda until I read Dale's post. (Big thank-you, Dale!) R-Commander, another Anaconda-like add-on, provides more of an Excel-like user-interface some (non-programmers, perhaps) appreciate. (I find it gets in my way.)

I sure do enjoy it when the WoV stat sharpies use R to explore complex gaming mathematics. (Hint, hint!) WoV members have provided many great examples applying R to gaming questions. I know those gaming-related examples have helped me, and I expect the Wiz may also find them helpful. Perhaps, the Wiz will keep us posted as he plays with R. I sure hope so.
7craps
7craps
  • Threads: 18
  • Posts: 1977
Joined: Jan 23, 2010
April 9th, 2019 at 11:20:39 AM permalink
Quote: Wizard

I already know several languages, so picking up new ones comes easily.

R should be easy for you.
added: R is an interpreted language, it does not compile like C or C++ or even Excel vba. It can be real slow with for loops but there are ways to make those faster, maybe not as fast as C++. any code can be made to run slow... trying or not trying.
would be interesting to see what code you actually used.
Quote: Wizard

Do you mind if I use those numbers for 7 people sharing a birthday? Full credit to 7craps, of course.

Sure.
I can also do 8 -10 people sharing if wanted and link to those.

I will do them later tonight and up to you if you want to use them.
(want to see if I can get arbitrary precision using R easily)

I did change some of the R code the original author had, just to have it my way for what I was after.
He (in the link provided knows his stuff and is a moderator at that other math site)
did change that page last year that I remember had both R and Mathematica. I hope I saved that page some place in a folder years ago. I just not have had time to get back to the code to see exactly how it works and have fun with it.

thanks again!
Last edited by: 7craps on Apr 9, 2019
winsome johnny (not Win some johnny)
  • Jump to: