Probabilty of random number distribution

23 Views Asked by At

Given a random number generator generating integer numbers in the range 1 to N. What is the probability that a given number appears Q times (not necessarily sequentially, but in any order) in a sequence of M numbers, ie P1 is the probability that it appears once, P2 twice, P3 thrice, etc? This is for a research project to asses if marked ants go to a foraging site randomly or whether there is a learning effect.

1

There are 1 best solutions below

0
On

The probability that a specific number will appear exactly $k$ times is equal to $$\binom{M}{k}\left(\frac{1}{N}\right)^k \left(\frac{N-1}{N}\right)^{M-k}.$$

For the probability that the specific number appears in $k$ specified positions, with other numbers at the other positions, is $\left(\frac{1}{N}\right)^k \left(\frac{N-1}{N}\right)^{M-k}$, and there are $\binom{M}{k}$ ways to choose the $k$ positions.

The above expression simplifies to $\dfrac{1}{N^{M}}\dbinom{M}{k}\left(1-\dfrac{1}{N}\right)^{M-k}$.