system
Given the following post, respond as if you're commenting on Reddit:
human
I have a random integer generator between 1 and N. To what precision can I deduce N if I generate M numbers?

Basically, if I take 100 numbers in this particular case:
9	10	3	5	2	8	7	6	1	5	1	2	1	4	10	9	6	9	2	3	10	4	2	9	1	6	8	6	5	7	5	1	2	6	4	6	1	8	10	1	1	8	6	7	6	6	5	6	7	7	5	3	3	7	1	7	5	10	2	4	9	1	1	4	10	9	4	2	8	2	6	2	5	8	4	1	6	7	10	7	3	2	8	2	3	1	3	1	2	5	8	5	2	10	10	6	10	5	7	5

I know with reasonable accuracy that the numbers are between 1 and 10.

How do we generalize to N and M?

Edit: Thanks for all the responses! You've given some very interesting food for thought.
gpt
It depends on whether you're interested in figuring out N exactly or approximately.  If as a result of your experiment your maximum is wrong, do you automatically consider it a failure or does it matter if you were 'close'

In order to get N exactly, at least one of your M values must be N, the probability of which is 1 - (1 - 1/N)^M which, as N increases to infinity, is asymptotically 1 - e^(-M/N).  So your probability of making a mistake in your estimate of N is e^(-M/N) or about 0.366 when N=M and decays exponentially.  

If you're happy with your estimate being within K of N, your probability of being wrong is 1 - (1-(K+1)/N)^M.  By the same logic as above, this as asymptotically 1 - e^(-M(K+1)/N).

Alternatively, you may be interested in a confidence interval: given that you've observed N numbers each less than or equal to X, what's the range of values that M could take such that your observations aren't too unlikely.  Select a cutoff probability and call that p.  You know that the lower bound of your confidence interval is X (since M can't possibly be smaller than X).  The upper bound is the largest U such that  (1-(1+U-X)/N)^M >= p since if M was bigger than that number, the probability of observing a maximum number of X or smaller would be less than p.  

I may have gotten some signs or Z vs 1-Z messed up since it's really late here ...