P( at least 2 students sharing the same birthday)
= 1 - P( no 2 students having the same birthday)
= 1 - P( all students having distinct birthdays)
So now, P( all students having distinct birthdays) =>
The first student can have any birthday out of 181 possible days => 181/181
If the second student is not supposed to have the same birthday as first, then he is left with only (181 - 1) choices => 180/181
Similarly, if the third student is not supposed to share a birthday with either of the previous two students, then he is left with (181 - 2) choices => 179/181
Similarly, we can find the individual probabilities for a distinct birthday for each student as:
181/181, 180/181, 179/181, 178/181, ............................., 158/181, 157/181 ( for 25 terms)
=> P( all students having distinct birthdays) =
181/181 * 180/181 * 179/181 * 178/181 * .............................* 158/181 * 157/181
= (181!/(181 - 25)!)/(181^25) = 0.1759
Thus, P( at least 2 students sharing the same birthday) = 1 - 0.1759 = 0.8241