Students are assigned numbers 1 to n; 3 are chosen randomly which turn out to be 1,3,7. Given max(n) = 30 what is the MLE of n? The students are drawn from a discrete uniform distribution.
This is one of the exercise questions from mit.ocw. I can't quite figure out how to use the numbers selected (1,3,7) into the likelihood estimator.
P.S - This is not a homework question that I am asking others to do for me. I'm just not able to get this.

The probability that an observation is equal to $k$ is $1/n$ if $0\leq k<n$ and 0 otherwise. The likelihood is a product of terms like that for each observation, so it's $1/n^3$ if all three numbers are less than $n$ and $0$ otherwise. The likelihood gets larger as you decrease $n$, because $1/n$ gets larger -- except that it falls to zero when you make $n$ so small that the data are impossible.
