Confidence interval for Uniform($\theta$, $\theta + a$) I am encountering a difficulty with the following task.  Have I made a mistake, or is this an inherent flaw in the notion of confidence intervals?  (Other such flaws exist.)
Consider a random sample $X_1,\ldots , X_n$ from a Uniform($\theta$, $\theta + a$) distribution, where $\theta$ is unknown and $a$ is known.  We wish to determine a confidence interval for $\theta$.
The reader may verify the following details: The statistics $Y=\text{min}_i X_i$ and $Z=\text{max}_i X_i$ are jointly sufficient for $\theta$.  For  $\theta \le c_1 \le c_2 \le \theta + a$,
$P\{c_1 \le Y \le Z \le c_2\} = [(c_2 - c_1)/a]^n$.  For $0 < \gamma < 1$, set $d_1 =(1-\sqrt[n]\gamma)/2$ and $d_2 =(1+\sqrt[n]\gamma)/2$.  Then
$\gamma = P\{\theta + ad_1 \le Y \le Z \le \theta + ad_2\} = 
P\{Z -ad_2 \le \theta \le Y-ad_1\}$.  Thus, $[Z -ad_2, Y -ad_1]$ is a $\gamma$ confidence interval for $\theta$.
Now here's the difficulty:  If we observe $Z - Y > a\sqrt[n]\gamma$, then $Z -ad_2 > Y -ad_1$, so our formula yields a nonsensical answer.  Have I made an error in my calculations?  Or is this one of those problems with confidence intervals?
(Homework?  I guess so - but a homework problem that I wrote for my students.  Inspired by another problem in DeGroot & Schervish.)
[Also posted at math.stackexchange.  I didn't know about this group, and I received no satisfactory answer there.]
 A: It's possible to construct silly confidence intervals that are technically valid, i.e. have the claimed coverage, but it's not obligatory. So I don't know why doing so should demonstrate a flaw in "confidence interval methodology" (whatever that is)—you could have constructed a more appropriate one for your purposes.
A more orthodox approach to this particular problem:
First, note that you can reëxpress the sufficient statistic $(Y,Z)$ to contain an obvious ancillary component: the sample range $Z-Y$. It's a very strong precision index: as it approaches $a$, $\theta$ is known almost exactly. So any inference should be conditional on its observed value $z-y$.
Second, the sample minimum $Y$ conditional on the observed value of the range is uniformly distributed between $\theta$ and $\theta+a-r$. Confidence intervals based on this distribution could be constructed & would be well behaved. Still, the likelihood for $\theta$ is flat between $z-a$ and $y$, so it wouldn't be possible to say for any confidence interval with less than 100% coverage that it contained values of $\theta$ less discrepant with the data than those outside it. Best to stick with the 100% interval.
[Response to comments:
(1) Your confidence interval does have some undesirable properties* but that's no reason to tar all confidence intervals with the same brush.  You only took unconditional coverage into account when you derived it & therefore have no right to complain that unconditional coverage is all it gives you.
(2) You're right that $\left(Y-\left(1-\frac{1-\gamma} 2\right)(a-r),Y-\frac{1-\gamma} 2(a-r)\right)$ is a valid C.I., conditional on $r$, but why not use $(Y-\gamma(a-r),Y)$? The likelihood is $\frac{1}{a-r}$ for all values of $\theta$ between $y+r-a$ and $y$, & I don't see any generally compelling reason to honour an arbitrary 95% of those values with inclusion in my confidence interval. The 100% interval $(y+r-a,y)$ is preferable as it separates zero-likelihood values of $\theta$ from those with positive likelihood.
*At least for inference on $\theta$ from a single sample: there may be some applications—say in quality control, where consideration of coverage over repeated samples is more than a thought experiment—for which it could have some use.]
