UniformIntegerSimplex
RiskAMP Random Distribution Functions
Using this function in Excel:
=UniformIntegerSimplex(n, k, [allow zero])
Function arguments:
n | Number of values |
k | Target sum |
[allow zero] | Allow zero (default TRUE) |
This function returns a random integer vector of length n whose entries sum to k. Each valid combination is equally likely. This is like dividing k identical units among n buckets, possibly leaving some empty.
By default, individual components may take any value in [0, n]. You can set
the allow zero argument to FALSE
to require that each component be at
least 1.