# MLE discrete uniform distribution

Let $X_1, X_2, \ldots, X_n$ be a random sample of discrete random variable with Uniform distribution on set of integers $\{-\theta, -\theta+1, ... ..- 1, 0, 1, \theta-1, \theta\}$ where $\theta$ is positive integer. Find estimator $\theta$ by the method of maximum-likelihood.

I read that $\theta$ should be the $n^\text{th}$ order statistic? So $\theta=X_{(n)}$? Why? Can someone explain me?

• Please add the [self-study] tag & read its wiki. Then tell us what you understand thus far, what you've tried & where you're stuck. We'll provide hints to help you get unstuck. – gung Jan 13 '16 at 18:07
• Could it be that there is an absolute value in the nth order statistic? – JohnK Jan 13 '16 at 18:09
• Hint: The solution is certainly not the $n$-th order statistic. – Xi'an Jan 13 '16 at 20:05
• @Cherryl I am sure Xi'an does know the answer (I am fairly sure everyone who responded does); but if you do as gung asks you'll see why X'an 's trying to give you a hint. JohnK gave a bigger. It will pay you dividends to think about what they're saying. [What exactly did you read? Are you sure you read it carefully? Didn't miss anything? (Did you try sketching the likelihood? What does that look like?)... You may like to start with a simpler problem where $Y$ is on $\{ 0,1,...,\theta\}$ (again, try drawing the likelihood); once you have that figured out this one should be simple. – Glen_b Jan 13 '16 at 21:48
• @ Cherryl: yep! – Alex R. Jan 14 '16 at 22:43

Consider a similar problem with a specific data set

$X\sim U(0,\beta)$ (continuous uniform)

Let $x_1=4.31$, $x_2=1.24$, $x_3=5.15$

Note that $0<X_i<\beta$ and so in turn $0<x_i<\beta$.

Consequently, $\beta<x_i$ for any $x_i$ is not a possible value for the parameter.

As a result the likelihood function for this slightly different problem looks like this:

Now consider a discrete (integer-valued) uniform $U[0,a]$ and the observations 4, 1 and 5. Can you draw the likelihood (hint: don't draw a curve again)

Then tackle the original problem. Make sure your answer makes sense for the $x_1=1,x_2=-1000$ case Alex R mentioned in comments.

• in this case β=max{x1,x2,x3}=5.15 and in mine ? in U[a,b] a=min{X1..Xn} and b=max{X1...Xn} ? – Cherryl Jan 14 '16 at 13:32
• No, $\beta$ was not 5.15 (it was 6 but in practice we never know it). The MLE of it , $\hat\beta$ is 5.15 – Glen_b Jan 14 '16 at 16:31
• Oh yes I wrote β instead of β^ by mistake... Actually we can't draw likelihood of integer-valued distribution. So the nth-ordered statistic is not the true answer ?. – Cherryl Jan 14 '16 at 16:49
• You don't seem to have read the guidelines in the tag-wiki for self-study questions -- I see no genuine attempt (random guesses and no progress when errors are pointed out does not constitute genuine attempts). The guidelines ask us to give you hints, rather than complete answers, yet you're asking for what the guidelines tell us not to do . Can you do the first question under the plot in my answer now? – Glen_b Jan 14 '16 at 16:49
• I understand the example above. If for example the U[-a,0] then it should be a^=min{X1,X2....Xn}. I would say average for the example x1=1, x2=−1000.. since there is no logic β=1. How to drow mine function ? – Cherryl Jan 14 '16 at 17:04