Let $X$ ~ Uniform(0,1) with pdf $f(x)$:
http://www.tri.org.au/se/Uniformpdf01.pngThe joint pdf of the 1st and $n$th order statistics is, say, $g(x_\left(1\right), x_\left(n\right))$:
http://www.tri.org.au/se/OrderstatUniformpdf01.pngwhere I am using the OrderStat
function from the mathStatica
package for Mathematica to automate the nitty gritties for me (I am one of the authors of the former).
... and with domain of support:
http://www.tri.org.au/se/domainOrderstatUniformpdf01.pngWe seek $P(X_\left(n\right)- X_\left(1\right) > d)$:
http://www.tri.org.au/se/proborderstatsol.pngAll done.
Just as a side note, this solution is different result to that of Carlo's posting:
carlo = ((d*n - d - n)*d^n + d)/(d*(n - 1)*n);
carlo /. {d -> 1/3, n -> 4}
2/27
whereas I obtain, for the same parameter values:
sol /. {d -> 1/3, n -> 4}
8/9
[Checked via Monte Carlo ]