Problem: Let $X \sim U(0,a)$ with $a>0$ unknown. Find an asintotic confidence interval for $a$ at 95% using a transfomration which preserves the variance.
Attempt: I tried to use the method of moments to get $\overline a= 2\overline X_n$ and then $$ \sqrt{3n}(2\overline X_n-a) \sim N(0,a^3) $$ and look for a function $\phi'(a)^2a^3=1$, but I don't know if it makes any sense.
Thanks!
A confidence interval based on the asymptotic normality of the sample mean $\bar X$ of a random sample $X_1, X_2, \dots, X_n$ from $\mathsf{Unif}(0, \theta)$ is relatively easy to find and has a familiar form, but such an interval depends on approximations, which improve with increasing $n.$
Mean-based CI: Even for relatively small $n$ the mean $\bar X$ is roughly normally distributed. Because $Var(X_i) = \frac{\theta^2}{12},$ we have $Var(\bar X) = \frac{\theta^2}{12n},$ so that the standard error of the estimate $\check\theta = 2\bar X$ is $SE(\check\theta) = \sqrt{\frac{4\theta^2}{12n}} = \frac{\theta}{\sqrt{3n}}.$
Then a reasonable 95% CI for $\theta$ is of the form $$2\bar X \pm 1.96\frac{2\bar X}{\sqrt{3n}},$$ where we rely on the approximate normality of $\bar X$ and the approximation $SE \approx \frac{2\bar X}{\sqrt{3n}}.$
Specifically, for the case $n = 5$, this amounts to $2\bar X \pm 1.012\bar X.$ Because of the two approximations involved (normal distribution of $\bar X$ and estimated SE) we are entitled to wonder whether this style of CI actually provides the advertised 95% coverage. As the simulation in R below shows, coverage for $n = 100$ is nearly 95%. [about 90% for $n=5$; about 94% for $n = 25].$
Note: The vector
covercontains a millionTRUE's andFALSEs; itsmeanis its proportion ofTRUEs.Maximum-based CI. The maximum $W$ of the $n$ observations can be used to obtain an exact 95% CI for $\theta.$ By looking at CDFs, one can show that $W/\theta \sim \mathsf{Beta}(n,1).$ Then choose $L$ and $U$ so that
$$0.95 = P\left(L \le \frac{W}{\theta} < R\right) = P\left(\frac 1 U \le \frac{\theta}{W} \le \frac 1 L\right) = P\left(\frac W U \le \theta \le \frac W L\right).$$
For the case, $n = 5,$ and $L, U$ the 3rd and 98th quantiles of $\mathsf{Beta}(5,1),$ respectively, we have the interval $(W/.996, W/.496),$ which has exactly 95% coverage probability.