result = 1 for (i in 1:30){ p = (365-i+1)/365 result = result * p } 1- result
The chance of having at least 2 students(amongs 30 students) got the same birthday is approximately 70.6%