"Distribution" of numbers $0\leq a\leq b\leq c\leq d\leq 1$ A friend came up with the next problem:
Consider $0\leq a\leq b\leq c\leq d\leq 1$ numbers such that $a+b+c+d=1$. Are there numbers $a_{0}$, $b_{0}$, $c_{0}$, $d_{0}$ that minimize $$|a-a_{0}|+|b-b_{0}|+|c-c_{0}|+|d-d_{0}|$$ most of the time? I mean, if we repeat the process of choosing $a$, $b$, $c$ and $d$ randomly, is there a expected value for $a$, $b$, $c$ and $d$? And what it is?
I tried to start with an easiest problem, with just $a$ and $b$, such that $0\leq a\leq b\leq 1$ and $a+b=1$ but I had no idea where to start, so I decided to try with some numerical sampling, and I did the next in Python: 
Choose a number $x\in [0,1]$ uniformely, and define $a=\min\{x,1-x\}$ and $b=\max\{x,1-x\}$. Clearly $0\leq a\leq b\leq 1$ and $a+b=1$. Doing this, and repeating a lot of times I got that the "expected value" for $a$ was $0.25$ and for $b$ was $0.75$, so the ratio is $1:3$.
Next, I tried the same in Python but with two values: Choose $x,y\in [0,1]$ uniformely, and let $x_{1}=\min\{x,y\}$ and $x_{2}=\max\{x,y\}$, now define $$A=\{x_{1},x_{2}-x_{1},1-x_{2}\}$$ and let $a_{1}$, $a_{2}$, $a_{3}$ be the elements of $A$ in increasing order. Clearly $0\leq a_{1}\leq a_{2}\leq a_{3}\leq 1$, and $a_{1}+a_{2}+a_{3}=1$, and repeting a lot of times I got that the "expected values" were of the ratio $2:5:11$.
Repeating the same method but now with one more variable I got that the "expected values" were on ratio $3:7:13:25$.
Lastly, with one more variable the ratios were $12:27:47:77:137$.
All this calculations were found just by trial and error, and are clearly non mathematically justified, but seems like, at least, a good conjecture.
Is there any hidden pattern behind these ratios? Is there any reason for this numbers to came up?
Any help would be appreciated.
 A: It seems that your process is: 


*

*choose $n-1$ values independently and uniformly on $[0,1]$

*sort these values into order

*find the gaps between successive sorted values, and between $0$ and the smallest, and between the largest and $1$, so you calculate $n$ non-negative gaps adding up to $1$

*sort these gaps into order

*consider the expected values of these sorted gaps


For what it is worth, I believe the $n$ gaps (before sorting) have identical but not independent distributions with density $f(x)=n(1-x)^{n-1}$ when $0 \le x \le 1$ and so mean $\frac{1}{n}$
You asked for an explanation of the ratios pattern you observed.  Empirically it seems that the expected length of the $k$th sorted gap out of $n$ is related to the difference of two harmonic numbers $$\frac{1}{n}\left(\sum_{i=1}^{n} \frac1{i} - \sum_{j=1}^{n-k} \frac1{j} \right) \\ = \sum_{j=n-k+1}^{n} \frac1{nj} $$  
So in your initial example with $n=4$, you get for different values of $k$:


*

*: $\frac1{4\times4} = \frac1{16} = \frac{3}{48}$

*: $\frac1{4\times3}+\frac1{4\times4} = \frac{7}{48}$   

*: $\frac1{4\times2}+\frac1{4\times3}+\frac1{4\times4} = \frac{13}{48}$   

*: $\frac1{4\times1}+\frac1{4\times2}+\frac1{4\times3}+\frac1{4\times4} = \frac{25}{48}$ 


reproducing your $3:7:13:25$ ratios.  This happens with other values for $n$ too  
I believe that these expected values do not minimise $\mathbb E [ |a-a_{0}|+|b-b_{0}|+|c-c_{0}|+|d-d_{0}| ]$ but they do minimise $\mathbb E[(a-a_{0})^2+(b-b_{0})^2+(c-c_{0})^2+(d-d_{0})^2]$  
To minimise the expected absolute sums I think you would do better with the medians of the distributions of the ordered gaps, and I suspect these medians may not add up to $1$ when $n \gt 2$.  So for example with $n=4$ the means are about $0.0625, 0.1458, 0.2708, 0.5208$ but the medians seem experimentally to be closer to something like $0.052, 0.145, 0.276, 0.500$  
