Re: Re: serie of random number
- To: mathgroup at smc.vnet.net
- Subject: [mg21323] Re: [mg21314] Re: [mg21202] serie of random number
- From: "ARNOLDK" <arnoldk at gauss.cam.wits.ac.za>
- Date: Fri, 24 Dec 1999 03:42:27 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
The method below wont work in general since the sum of the first n-1 random numbers is very likely to be greater than one. Arnold Knopfmacher -----Original Message----- From: Harvey P. Dale <hpd1 at is2.nyu.edu> To: mathgroup at smc.vnet.net Subject: [mg21323] [mg21314] Re: [mg21202] serie of random number >Several suggestions have been posted, each of which involves dividing each >of n random terms by the sum of those n terms. There's another obvious way: >generate n-1 random terms and add a final term equal to 1 minus their sum. >t=Table[Random[Real,{0,1}],{9}];Join[t,{1-Plus@@t}] >The distribution will be somewhat skewed, however, because all of the >"correction" to sum to 1 will be contained in the single final term. If n >is large enough, that shouldn't make much difference, and with a large n >this method is probably faster. > Harvey Dale > > -----Original Message----- >From: BobHanlon at aol.com [mailto:BobHanlon at aol.com] To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Sent: Monday, December 20, 1999 2:28 AM >To: mathgroup at smc.vnet.net >Subject: [mg21323] [mg21261] Re: [mg21202] serie of random number > >x = (y = Table[Random[Real, {0, 1}], {10}])/(Plus @@ y) > >{0.07821331795569339, 0.14548316858210597, > 0.09071562642905695, 0.17301007335002186, > 0.11717865235373884, 0.09217996450546272, > 0.042026501149567214, 0.006182891897813822, > 0.181653714876191, 0.07335608890034818} > >Plus @@ x == 1 > >True > >Bob Hanlon > >In a message dated 12/17/1999 2:54:43 AM, raphael.suire at univ-rennes1.fr >writes: > >>i want to compute a serie of random number >>Table[random[Real,{0,1}],{n}]] >> >>which sum is always one >> >>How can i do ?? >> >