# Distribution of maximal distance between uniformly sampled variables

• Jul 10th 2011, 04:18 PM
quoth
Distribution of maximal distance between uniformly sampled variables
Hi everyone!

I've got $\displaystyle n$ uniformly distributed iid random variables $\displaystyle X_i\backsim U(0,1)$.

Then I sort them ($\displaystyle i>j \rightarrow X_i > X_j$).
My interest lies in

$\displaystyle Y = X_{i+1}-X_{i}$

the distance between two adjacent values.

What I'd like to know is the distribution of $\displaystyle Y$. I'm working on a delta-encoding method (storing a sorted list by their differences indead of directly storing the values) and this would help me understand what values I can expect. So a decent approximation is good enough for me.

Thanks a lot!
• Jul 12th 2011, 02:08 PM
Moo
Re: Distribution of maximal distance between uniformly sampled variables
Hello,

Well I don't know about the approximation, but it's easy to get the pdf of Y if you're familiar with the change of variable transform for the pdf.
Otherwise, you could also do it this way, with conditional expectations (your question doesn't look like high school probability) :

it would approximately give this, with a suitable y... :

$\displaystyle P(Y<y)=P(X_{i+1}-X_i<y)=E[P(X_{i+1}-X_i<y | X_i)]=E[P(X_{i+1}<y+X_i | X_i]=E[y+X_i]=y+1/2$