maani
- 10
- 0
Hi everyone,
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!
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!