Skip to main content
2 of 2
added 13 characters in body
chl
  • 54.3k
  • 23
  • 227
  • 388

How can I generate n random numbers whose summation will be around 1?

You can try the Dirichlet distribution (see also, https://statipedia.org/wiki/index.php?title=Dirichlet).

You need to specify more details about how they're distributed; using only the sum-constraint condition allows too many possible distributions over parameters. The Dirichlet is a commonly used distribution which satisfies this property.

Harsh
  • 353
  • 3
  • 8