# There are 400 dormitory rooms along with 400 distinct room numbers for 60 math students. Any math st

There are 400 dormitory rooms along with 400 distinct room numbers for 60 math students. Any math student can stay in any of the 400 dormitory rooms.
Suppose you are a math student and are recording the room number for all math students, one at a time until you have found a match (This means that a room number has already been recorded).
i) What is the probability that it takes more than 30 students for this to happen?
ii) What is the probability that is takes exactly 25 people for this to happen?
Suppose you are a math student and are recording the room number for all math students, one at a time you have found a student who shares the same dormitory room with you. What is the probability that it takes exactly 28 math students for this to happen?
Well, I think that for 1(i), I may first select 30 persons out of 400 students as the numerator, then all those 30 students have 400 choices, so the denominator would be 400^30.
As for 1(ii), I just did it in the same way as (i) but to change 30 into 25. I also multiply 25 since 1 out of 25 has the same choice.
As for 2, I think that everyone just make a different choice than me so i put (399/400)^28 as my answer.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

diamondogsaz
The first situation has a changing probability as rooms are recorded. There's no chance of a match on the first student (p(non-match)=1), then (assuming always failing) the second student has 399/400 chance of nonmatch, the third student has 398/400 chance of non-match, and so on. The probability of reaching the situation where the thirtieth student has also failed to match any of the earlier 29 dormitory numbers is thus
$\frac{400!}{370!}\frac{1}{{400}^{30}}\approx 0.327828$
If you need to remove the case where there is never a match, do the same calculation for the case of 60 failures-to-match:
$\frac{400!}{340!}\frac{1}{{400}^{60}}\approx 0.009444$
For question 2, you are not trying to match an increasing population of rooms, so the problem just involves trying to match one number, with the same probability of failure or success on each trial - effectively the "second student" case, above, over and over again, with one success at the given endpoint.