Question 1118481
P(at least two people share a birthday) = 1 - P(no two people share a birthday)<br>

The 1st person has some birthday...
The 2nd person has 364 possible non-matching birthdays…
 That leaves 363 non-matching birthdays for the 3rd person
 etc. <br>
Extending this to 40 people:
P(no two people share a birthday) = {{{ (364/365)(363/365) }}} * … * {{{ (327/365)(326/365) }}} = 0.1088<br>

P(two or more people share a birthday) = 1 - 0.1088 = {{{ highlight(matrix(1,3, " ", "0.8912", " ") ) }}}<br>

So in a class of 40, it is far more likely that two or more people share the same birthday than for no two people to share a birthday.  [ It only takes 23 people to reach a probability of >50% that two people will share the same birthday ].    If this seem nonintuitive, note that the above gives the probability that ANY two people share a birthday.   If you are in a class of 40 students, the probability that someone also has YOUR birthday is still a pretty small number (about 1/10). 
——————————————
Edit 6/11: Tutor @Shin123 has arrived at an incorrect answer, using an incorrect method.