"I think you start by working the maximum likelihood estimation formula of a binomial RV. The number of photons captured is (1,000,000) and the probability of the camera catching a photon is p, n (the number of photons total) is what we are looking for.
$ \hat n_{ML} = \text{max}_n ( \binom{n}{k} p^{k} (1-p)^{n-k} ) $
$ \hat n_{ML} = \text{max}_n ( \binom{n}{1000000} p^{1000000} (1-p)^{n-1000000} ) $
But to find the maximum I think you have to take the derivative of an n!... Does anyone know how to do this? Or am I going about the problem completely wrong?"
Quote from Beau.
Here is what we needed to do.
1st) we know that for n+1 must be smaller than n
2nd) same thing we know from n-1 must be greater than n
then from sandwich theorem, obtain a inequality with n+1<n<n+1
solve for n.
Hi Beau, Shao-Fu,
Good work, but a quick clarification: If n is the maximum, then both n ≥ n + 1 and n ≥ n - 1 must be true. (If n-1 > n, then n is clearly not a maximum.) Using this, I get that $ \frac{10^6}{p} - 1 \leq n \leq \frac{10^6}{p} $. So, we're guaranteed that n is a maximum if $ n = \lfloor \frac{10^6}{p} \rfloor $
(Note that it may be possible that both $ \frac{10^6}{p} - 1 $ and $ \frac{10^6}{p} $ are maxima, in the event that p ends up such that both numbers are integers and their probabilities are equal... the floor function will give us the latter of these two in this case, which in any event is still a maximum.)