# Constructing a Confidence Interval for $\theta$ where $X_1, …, X_8$ iid $U(0, \theta)$ where $\theta \ge 0$

My homework question requires me to construct a 90% confidence for $$\theta \ge 0$$ where $$X_1, ..., X_8$$ iid $$U(0, \theta)$$ and the $$8$$ data values are given. However, I am not sure where to start with this. The question suggests using $$\frac{X_{(n)}}{\theta}$$ as a pivot variable (where $$X_{(n)}=$$ max{$$X_1, ..., X_n$$}), and I already have used $$P(a \le \frac{X_{(n)}}{\theta} \le b)=0.9$$ to get $$a=0.05^{\frac{1}{n}}$$ and $$b=0.95^{\frac{1}{n}}$$. I recognise that the solutions for $$a$$ and $$b$$ are not unique, however I just set each equal to the 5%-tile and 95%-tile respectively. I also know that I would let $$n=8$$ since there are $$8$$ observations, but am unsure of how to use this.

• This is fine as long as you are asked for any $90\%$ confidence interval. But this choice of $a,b$ is not optimal in the sense that this does not yield the shortest length interval for $\theta$ based on $X_{(n)}$. – StubbornAtom Oct 1 '20 at 14:31

Using the hint you got, the pivotal quantity is $$Y=\frac{X_{(n)}}{\theta}$$

You surely know that

$$f_Y(y)=8y^7\mathbb{1}_{(0;1)}(y)$$

thus the optimum confidence interval is $$[y;1]$$

concluding:

$$X_{(8)}\leq \theta \leq \frac{X_{(8)}}{\sqrt[8]{0.1}}$$

EDIT:

the density of your pivotal quantity is the following

It is evident that there are $$\infty$$ way to find the extremes of a CI at $$(1-\alpha)\%$$ but in this case the most reasonable solution is to minimize the range of your CI so the interval is of the form $$[a;1]$$

• There are $8$ data values, ranging from $0.476$ to $2.346$, however I did not include this latter value in the question which is what $X_{(8)}$ is. So I don't understand how you got $(y;1)$. – Viv4660 Oct 1 '20 at 12:01
• @Viv4660 : did some edits to clarify my answer – tommik Oct 1 '20 at 12:10
• Ok - just to check my understanding, would $[\frac{X_{(8)}}{b}, \frac{X_{(8)}}{a}]$ also work where $a=0.05^{1/8}$ and $b=0.95^{1/8}$? – Viv4660 Oct 1 '20 at 12:16
• @Viv4660 : this is an equiprobable tail CI that is not a reasonalbe CI in this case. You have to take into consideration to find the best CI you can.... IMHO – tommik Oct 1 '20 at 12:21
• But essentially your solution is saying that 90% of the time, $\theta$ is at minimum the largest value drawn from the sample and doesn't that seem not very reasonable? – Viv4660 Oct 1 '20 at 12:34