[Math] Probability of 2 or more people sharing same birthday given 365 days

birthdayprobability

My question is: Find the probability that at least 2 people in a room of 30 share the same birthday.

I looked at this problem – Having birthday at the same day after watching the Birthday Probability video ;

the way to solve this problem is 1 – P(unique birthdays) which is quite straightforward.

But,
Q1: how to solve it the other way around? Instead of finding unique birthdays, just find P(Same birthdays). How would that happen?

I thought if everyone from 2 to 30 ppl share 365 bdays and order matters then,

365Pr / 365 where r = 2 to 30

and then summing them up will give the total probability

sum([permutation(365,ppl)/365 for ppl in xrange(2,31)])
Decimal('5.965783049451056333110639647E+73')

Evidently that's not the case. so how to solve #1 ?

Also

Q2: What if there were 1000 people in a room since 365 < 1000, how would that go?

UPDATE

With the Q1, what I mean is the chances 2 people share the same bday and 3 ppl might share some other day, while 4 ppl might not share the same day, 17 ppl might share some other day. For the sake of academic discussion, however complex this might be, I am only interested in knowing how does one solve this, say if we reduce the number of people to 5 just to reduce the complexity, I still would like to know how to approach this problem.

UPDATE ON Q1
Specifically I am asking what is the method/logic to calculate problems on such conditional probability?

Say, there are 4 genes discovered so far and 6 bases in total;
What are the Chances of 2 or more genes sharing same bases.

Given 4 genes ('ABCD') there are following sets of possibilities:
[['AB', 'CD'],
['AC', 'BD'],
['AD', 'BC'],
['BC', 'AD'],
['BD', 'AC'],
['CD', 'AB'],
['ABC'],
['ABD'],
['ACD'],
['BCD'],
['ABCD']]

So what are the chances?

Best Answer

I Think it would be wise to consider the complement/opposite case first, since it is much easier to calculate:

Blockquote

-What is the probability that none of 30 people share any birthday.

Blockquote

The first one could be born any of 365 days, but for the second remains only 364 days and so on (you could consider Feb. 29th and make it 366 possible birthdays if you want). To calculate this complement probability, just multiply the thirty factors 365/365 * 364/365 * ... * 336/365 and then, to get the probability you asked for in the first Place, finally subtract this product from 1. That should do it!