I am writing a computer program which involves generating 5 random non negative integer numbers with a specific sum, namely 30.
I've found this method, but I don't know if it really generates a uniform distribution for all 5-uples.
I generate 4 random numbers $x\leq y\leq z\leq w$ between 0 and 100. Then my 5 random numbers are $$ a=x,\;b=y-x,\;c=z-y,\;d=w-z,\;e=100-w $$
Is this method correct or it gives a different distribution? For example, is (0,0,0,0,100) likely as much as (0,0,0,100,0)?