S
sulprobil
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)
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)