Re: Randomize three variables subject to sum always equal to 1
From: sulprobil (anonymous_at_discussions.microsoft.com)
Date: 09/01/04
- Next message: grinning_crow: "listbox default datatype"
- Previous message: Harald Staff: "Re: Populating Column Headers in a ListBox"
- In reply to: Tom Ogilvy: "Re: Randomize three variables subject to sum always equal to 1"
- Next in thread: Tom Ogilvy: "Re: Randomize three variables subject to sum always equal to 1"
- Reply: Tom Ogilvy: "Re: Randomize three variables subject to sum always equal to 1"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Sep 2004 03:59:29 -0700
Tom,
I do not think your solution is wrong. I think it produces
(relatively) more values in the [0.1,0.9]-intervall than
in (0,0.1) and (0.9,1), for example.
This is because if your algorithm creates a first extreme
value of 0.9999, for example, then a high likelihood
exists that it will be shifted into direction 0.5 due to
your sum- and 1/sum-calculation.
A quick simulation shows that my solution generates about
1% numbers < 0.01, 8% numbers < 0.1 and 14% numbers < 0.2;
where your algorithm generates about 0.5% numbers < 0.01,
3% numbers < 0.1 and 8% numbers < 0.2.
The stated problem introduced two restrictions (on all
three numbers, not the third or any other):
1. All numbers are > 0.
2. All numbers sum to 1.
With my algorithm I try to simulate this problem
efficiently without introducing further restrictions or
making further assumptions.
Kind regards,
sulprobil
Reverse(moc.liborplus.www)
- Next message: grinning_crow: "listbox default datatype"
- Previous message: Harald Staff: "Re: Populating Column Headers in a ListBox"
- In reply to: Tom Ogilvy: "Re: Randomize three variables subject to sum always equal to 1"
- Next in thread: Tom Ogilvy: "Re: Randomize three variables subject to sum always equal to 1"
- Reply: Tom Ogilvy: "Re: Randomize three variables subject to sum always equal to 1"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|