Sum Controlled Sequence of Numbers

Attention: open in a new window. PDF 

User Rating: / 4

This powerfull generator allows to produce variable sequences of numbers for which the sum is known. For example, you can configure this rule to produce 10 numbers for a sum 340, then 23 numbers for a sum of 900 and so on.


After the end of a given sequence, a completely new sequence is started with new number of numbers and new sum for the sequence.

Each generated sequence is made of random numbers choosen around the mean with a variance expressed in percentage of the mean.

For example, you can say that you want 20 numbers for a sum of 1,000 and a variance of 50%. In that case, the mean is 1,000 / 20 = 500 and the variance is +/- 250.

Each number in the sequence will be generated in the range [ mean - variance ; mean + variance ] by making sure that the sum is still 1,000.

Actually, to ensure that everything fit in the result, the generator recomputes the mean and the range after each generated value, and the last value is alway the remaining of what is expected minus what is already generated.

Add comment

Security code