# Find the confidence interval, uniform distribution

Let $X_1,..,X_n$ a random sample of $X$~$U[-\theta,\theta]$, $\theta>0$. Find the confidence interval for $\theta$.

I'm trying to find a pivotal quantity with the maximum and minimum, but I can not find any, can anyone give me a tip?

EDIT: I can take $Q(X;\theta)=\frac{max|X_i|}{\theta}$ as pivotal quantity?

• First, what's the distribution of $|X_i|$ ? – Scortchi - Reinstate Monica Jun 5 '15 at 22:03
• @Scortchi $U[0,\theta]$? – user72621 Jun 5 '15 at 22:09
• And then the distribution of $\max|X_i|$? – Scortchi - Reinstate Monica Jun 5 '15 at 22:16
• @Scortchi $Q(X;\theta)$ is an unknown distribution, but the distribution does not depend on the parameter – user72621 Jun 5 '15 at 22:18
• If you can you work out the distribution of $\max|X_i|$ it'll be clear how to make it not depend on $\theta$. – Scortchi - Reinstate Monica Jun 5 '15 at 22:39

First you need to find the distribution of the sufficient statistic $T=\max |X_i|$. You've already seen that $|X_i|=U\sim\mathrm{U}(0,\theta)$. To find the distribution of the maximum of $n$ observations, $T=U_{(n)}$, it's easiest to consider the cumulative distribution function:

\begin{align} F_T(t) &= \Pr (U_{(n)} < t) = \Pr(U_1 <t, U_2 <t, \ldots, U_n <t)\\ &=F_U(t)^n= \left(\frac{t}{\theta}\right)^n \end{align}

Differentiating with respect to $t$ gives the density

$$f_T(t)= \frac{nt^{n-1}}{\theta^n}$$

You can now calculate the density function of your proposed pivot $Q = \frac{T}{\theta}$ to confirm it's free of $\theta$:

$$f_Q(q)=f_T(\theta q)\cdot\left|\frac{\mathrm{d}t}{\mathrm{d}q}\right|=\frac{n(\theta q)^{n-1}}{\theta^n}\cdot\theta=nq^{n-1}$$

• My question here was more whether the interval of $X$~$U[-\theta,\theta]$ and $|X|$~$U[0,\theta]$ is the same. – user72621 Jun 5 '15 at 23:12
• Not sure what you mean by that - you're finding an interval for $\theta$. The distribution for $|X|$ you have is correct- it's just folding about zero. – Scortchi - Reinstate Monica Jun 5 '15 at 23:19

You are looking for sufficient statistics. Read http://math.arizona.edu/~tgk/466/sufficient.pdf and look at question 2 at the end of the exercises

• I know that $max{|X_1,...,X_n|}$ is a sufficient statistics, but if I take module, I would not be altering the interval? – user72621 Jun 5 '15 at 20:26
• No, (I assume by module you mean modulus or absolute value). In the proof, we find the likelihood which has an indicator for the support. If there is a +7, the support has to include -7. Alternatively, by symmetry you can say that uniform on $[-\theta,\theta]$ can be thought of as $|X_{1}|,|X_{2}|...|X_{N}|$ is uniformly distributed on $[0,\theta]$ – Sid Jun 5 '15 at 20:35
• It was exactly what I was talking about, so I can say that $\frac{|X_{(n)}|}{\theta}$ It is a pivotal quantity, where $|X_{(n)}|$ is the maximum of $|X_1|,...,|X_n|$? – user72621 Jun 5 '15 at 20:54
• Why divided by $\theta$? Can you please explain why you mean by "pivotal quantity"? – Sid Jun 5 '15 at 21:15
• I want to build a confidence interval, so I need to find $Q(X;\theta)$ such that the distribution of $Q(X;\theta)$ do not depend of parameter, where $Q(X;\theta)$ is a pivotal quantity – user72621 Jun 5 '15 at 21:21