Hi,

I'm starting with

$\displaystyle X_1, X_2, ... iid ~ U(0,1) $

and I'm trying to find the density of

$\displaystyle S_N = X_{k:n} - X_{k-2:n}. $

I look at the joint pdf, then do a Jacobian transformation and get very close to the expression of a beta function, but it's not quite it (but should be):

$\displaystyle \frac{n!} {(k-3)!(n-k)!} \ (y-z)^{k-3} * z * (1-y)^{n-k} $

Any suggestions on how I can get it into the form of a beta function or where I may have gone awry?

Thanks!