# Math Help - Distribution of maximal distance between uniformly sampled variables

1. ## Distribution of maximal distance between uniformly sampled variables

Hi everyone!

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

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

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

the distance between two adjacent values.

What I'd like to know is the distribution of $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!

2. ## 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... :

$P(Y