Imagine I have 76 million boxes, and I want to put only 2 particles maximum for each box, I want to find the total numbers of ways (combinations) that involves placing 2 particle in each box given that you have 40,000 particles in total.
I have attempted the question, and Here is my step:
$$\Sigma_{i=1}^{20000} \frac{76000000!}{(2!^{i}1!^{N-i})}$$
Eventually, I would divide this number by 76000000! to compute the probability of placing 2 particles in each box.
To compute the higher order terms, I would also start including the case when some boxes have 3 particles, but the majority has 2 particles.
To convince you that my initial thoughts is correct: Let's imagine a simpler problem with 4 boxes, and only 3 particles.
If you draw all the possible cases with 2 particles maximum for each box you realise placing the first two particles in the same box, you have 4 choices, after that you are left with 3 choices for placing only one particle. So the number of ways for 2 particles maximum in a box is Number of ways = 4!/(2!1!)
Consider one particular box: the number of particles is a binomial random variable with parameters $40000$ and $1/76000000$. So the probability of the number $k$ of particles in the box is $$\displaystyle {\text{particles} \choose k} \frac{(\text{boxes}-1)^{ \text{particles}-k}}{\text{boxes}^{ \text{particles}}}$$ though in practice you will calculate this with logarithms or something pre-programmed.
For example the R code
dbinom(0:5, size=particles, prob=1/boxes)gives the following probabilities:If you multiply these by the number of boxes, this gives the expected number of boxes with a given number of particles
i.e. an expected number of fewer than $0.002$ boxes with $3$ or more particles, about $10.52$ boxes with $2$ particles, and so almost $40000-2\times 10.52$ boxes with $1$ particle and about $76000000-40000+10.52$ with no particles
As an approximation, you might set aside the possibility of three or more particles and look at the distribution of the number of boxes with two particles. If you assume each box with $2$ particles is independent of the others (they are not, but they are very close to being independent) and using the
1.384278e-07probability calculated earlier, you can again use the binomial distribution with parameters of $76000000$ and that probability to find a good approximation to the probability of boxes with exactly $2$ particles. Assuming no boxes with $3$ or more, the number of boxes with exactly $1$ is then $40000$ minus twice the number with $2$, and the number with $0$ being the remainder.A further approximation could be to use the Poisson distribution as a good approximation to the binomial distribution.