Hi everyone,(adsbygoogle = window.adsbygoogle || []).push({});

I am trying to generate 200 random numbers from an exponential distribution which have to add to one.

I guess I need a loop where in each step I generate a random number from the exponential distribution and check the sum, if it is less than one I add the number to a list and if not I generate another number. So at the and I have a list with 200 numbers which add to one.

The problem is I fail to implement this. Does anybody know an easier way to do this?

I will be grateful for any suggestions!

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Generating random numbers with Mathematica

**Physics Forums | Science Articles, Homework Help, Discussion**