Skip to content
Back to formatted view

Raw Message

Message-ID: <55C7D49B-9B9E-4032-A14B-5EA97118AD46@comcast.net>
Date: 2012-01-09T15:27:46Z
From: David Winsemius
Subject: runif with condition
In-Reply-To: <1326121586995-4278704.post@n4.nabble.com>

On Jan 9, 2012, at 10:06 AM, arunkumar1111 wrote:

> Hi
> I want to generate 4 random number which sum up to 100 always

"Random" plus condition == "non-random"

Perhaps you want 3 "random" numbers conjoined to the difference of  
their sum and 100? Or perhaps you want 4 "random" numbers multiplied  
by 100/sum(.)

(In either case you will not be getting "4 random numbers".)

-- 
David Winsemius, MD
West Hartford, CT