Let $X_1,X_2,\dots, X_n$ be rvs with pdf: $$f(x\mid \theta)=\frac{1}{2\theta}I(-\theta<x<\theta)$$ Let $Y = \max \{X_{(n)},-X_{(1)}\}$, where $X_{(n)}$ is the largest sample, $X_{(1)}$ is the smallest sample, then I should find $E(X_{(n)}-X_{(1)}|Y)$.
My strategy is
1. Find conditional distribution of $X_{(n)}, X_{(1)}$ given Y, respectively.
2. Then calculate $E(X_{(n)}-X_{(1)}|Y)$
First, note that joint distribution of $X_{(n)},X_{(1)}$
$$f_{X_{(n)},X_{(1)}}(s,t) = n(n-1)(\frac{1}{2\theta})^n(s-t)^{n-2}, s>t $$
and since $\max \{X_{(n)},-X_{(1)}\} = \max |X_i|$, that is $Y=\max |X_i|$, we have
$$f_Y(y) = \frac{n}{\theta^n}y^{n-1} $$
To find joind distribution of $X_{(n)}, Y$, consider
$$F(x,y)=P(X_{(n)}\leq x, Y<=y) = P(X_{(n)}\leq x, X_{(n)}<=y, -X_{(1)}<=y) $$
If $x\leq y$, then
$$P(X_{(n)}\leq x, X_{(n)}<=y, -X_{(1)}<=y) = P(X_{(n)}\leq x, -X_{(1)}<=y)$$
$$= \int_{-y}^{x}\int_{-y}^{s}n(n-1)(\frac{1}{2\theta})^n(s-t)^{(n-2)}dtds$$
$$= \frac{1}{(2\theta)^n}(x+y)^{n}, x\leq y$$
otherwise,
$$P(X_{(n)}\leq x, X_{(n)}<=y, -X_{(1)}<=y) = P(X_{(n)}\leq y, -X_{(1)}<=y)$$
So, we have joind distribution of $X_{(n)}, Y$.
$$f_{X_{(n)},Y}(x,y) = \frac{\partial^2F}{\partial x\partial y} = \frac{n(n-1)}{(2\theta)^n}(x+y)^{n-2}$$
if $x\leq y$, and $0$, otherwise(since $P(X_{(n)}\leq y, -X_{(1)}<=y)$ does not depend on $x$). Here, I have a trouble since the integral of the above joint distribution over $-y\leq x \leq y, 0< y< \theta$ does not equal to 1!!
What is my mistake? I think my strategy is somewhat so direct. So, there is other method to solve my problem?