The problem of the calculating the probability that there is a birthday shared by at least 2 people in a group of size n is well known. I am wondering if there is a way of finding the probability of there being a birthday shared by m people in a group of size n. I couldn't find any info about this online and was unable to solve it myself.
The particular question asked by a friend of mine was on the chances of there being some day which is at least 4 peoples birthday from a group of 50. I was able to get the answer through a monte-carlo simulation, but am still interested in an analytic solution.
Edit: I have since solved the problem, using Bernoulli trials, a technique I just learned in my discrete math class. The general formula is $1-\left(\sum_{i=0}^{m-1}\operatorname{nCr}\left(n,i\right)\cdot\frac{1}{365}^{i}\cdot\frac{364}{365}^{\left(50-i\right)}\right)^{365}$. The part inside the sum is the chance of, for a fixed day, that there are exactly i shared birthdays. The sum finds the chance that there are less than m shared birthdays. Raising this to the power of 365 finds the chance that there are less than m shared birthdays every day. Subtracting this from 1 gets the chance that there are m or more shared birthdays. The answer I got for the specific case agreed with my simulation within +-.000001.