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 - The Fusion of Science and Community**

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

# Generating random numbers with Mathematica

Loading...

Similar Threads - Generating random numbers | Date |
---|---|

Matlab Problem with Generating Barnsley Fern Fractal in MATLAB | Sep 21, 2016 |

Mathematica: Finding ideal generators as fast as possible | Jun 25, 2015 |

To generate and plot random real numbers in Mathematica within a specified time range | Sep 8, 2012 |

Computing with random generators (MATLAB) | Jul 4, 2011 |

How to get Excel to generate any random number besides x? | Jan 1, 2011 |

**Physics Forums - The Fusion of Science and Community**