How do I make effective use of the formula for calculating the product of the members of a finite arithmetic progression?

29 Views Asked by At

Here's a question I was tasked to answer with limited knowledge/use of combinatorics:

In a class of 25 students, every student gets to pick a number 1 to 100. What is the probability that at least two students pick the same number?

My solution:

First I look at the complementary event, where every student picks a unique number. The first student has 100 unique numbers, the second 99, the third 98, and so on. Mathematically I express it like so:

$\frac{100}{100}\times\frac{99}{100}\times\frac{98}{100}\times\cdots\times\frac{76}{100}$

and as it would be tedious to compute on a calculator, I rewrote it somewhat:

$\frac{1}{100^{24}}\times\frac{99!}{75!}$

Which you then take the complementary probability of (which is the probability of at least two people having the same number)

$P = 1 - \frac{1}{100^{24}}\times\frac{99!}{75!}\approx0.962\rightarrow96.2\%$

Now, in my pursuit to provide a more elegant answer, I stumbled upon the Arithmetic progression Wikipedia page and found that "The product of the members of a finite arithmetic progression with an initial element $a_1$, common differences d, and n elements in total" can be expressed as:

$\prod_{k=0}^{n-1}\left(a_1+kd\right)=d^{n}\frac{\Gamma\left(\frac{a_1}{d}+n\right)}{\Gamma\left (\frac{a_1}{d}\right)}$

So I tried it with my numbers, but the answer is completely bananas. Therefore I assume I made a mistake somewhere, but as I have limited experience with the formula I do currently not see the error.

$\prod_{k=0}^{24}\left(1-\frac{1}{100}k\right)=\left ( \frac{1}{100} \right )^{25}\frac{\Gamma\left(\frac{1}{\frac{1}{100}}+25\right)}{\Gamma\left (\frac{1}{\frac{1}{100}}\right)}$

As $\Gamma$ denotes the "Gamma function", and the input is a positive integer for both instances of the Gamma function, we should be able to rewrite it like so:

$\Gamma \left ( n \right )=\left ( n-1 \right )!$

$\prod_{k=0}^{24}\left(1-\frac{1}{100}k\right)=\left ( \frac{1}{100} \right )^{25}\frac{\left ( 125-1 \right )!}{\left ( 100-1 \right )!}$

$\frac{1}{100^{25}}\times \frac{124!}{99!}\approx 16.1$

Which instantly can be dismissed as an incorrect probability! So my question is, how can I make use of this formula in regards to providing an answer for the question I was tasked with?