In probability theory, the birthday problem concerns the probability that, in a set of k randomly chosen people, some will have the same birthday. Below, we will find the probability that three individuals share the same birthday when choosing a random sample of 25 individuals.

k = 25
p <- numeric(k)
for (i in 1:k)      {
            q <- 1 - (0:(i - 2))/365
            p[i] <- 1 - prod(q)  }
birthday <- p[k]
birthday
## [1] 0.5383443
plot(p, main="Probability of at least 3 people with the same Birthday", xlab ="Number of People", ylab = "Probability", col="blue")        

We find that the probability of three indivduals sharing the same birthdate in a group of 25 people is 53.8%. We can see as the number of people(sample size) grows, the probability increases.