You are not logged in.
Pages: 1
What is the number of people needed such that the probablity of any two people sharing a birthday? 23, although the exact probablity is closer to 0.507266.
What about the probabilty of 3 people sharing a birthday, or 4 or 5, heres a graph i've produced (would have done higher quality if i had the patience to let it do the calculations) showing the probablities
Here is the method i've used to approximate these probablities, obviously higher number of iterations will converge on exact probablity.
const int iterations = 400000;
float prob(int groupsize, int matchsize)
{
int count = 0;
int exist [365];
int number [365];
for(int i = 1; i<=iterations; i++)
{
for(int j = 0; j<groupsize; j++)
{
int k = rand()%365;
if(exist[k]==i)
{
if(++number[k]==matchsize)
{
count++;
break;
}
}else
{
exist[k] = i;
number[k] = 1;
}
}
}
return float(count)/float(iterations);
}
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Very, very cool.
There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.
Offline
Thats a lovely graph, luca-deltodesco!
If I am interpreting the graph correctly, the chances of six people sharing their birthday is more possible than not in a crowd of about 460! Truly difficult to believe!
It appears to me that if one wants to make progress in mathematics, one should study the masters and not the pupils. - Niels Henrik Abel.
Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.
Offline
Yep, and if you prefer this is the same as asking; what is the probablity that 'n' number of dice, dice which have 365 numbers on them, will all roll the same number
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Can we find a closed form solution to these curves? If you could post data on them, we could find Lagrange (polynomial) and Taylor approximations to them.
On second thought, Taylor would only be possible using linear extrapolation to nonintegral coordinates. It would be more useful if the question could be extended to all real numbers. In other words, 2.48386 people, what is the chance that they have the same birthday?
"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."
Offline
from here: http://leaver.org/noca//birthday/other.html, you can calculate the probablity of 2 people sharing a birthday as:
although clearly this doesn't work when n is larger than 365 for group size.
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Pages: 1