Re: Randomize three variables subject to sum always equal to 1

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: sulprobil (anonymous_at_discussions.microsoft.com)
Date: 09/01/04


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)



Relevant Pages

  • Re: Difficult matrix construction
    ... This will work with matrix B of any dimensions, any square matrix A compatible with B and any non-negative integer n. ... I want to construct and use this matrix in an m-file for any arbitrary N. ... I hope that someone has an algorithm for the construction of this matrix and can help me. ... Kind Regards ...
    (comp.soft-sys.matlab)
  • STFT [C C++]
    ... Do you know where I can find STFT (Short Time Fourier Transform) algorithm ... Kind regards, ...
    (comp.programming)
  • Re: Different answers on different CPUs?
    ... If the solution of an equation differs on two computers, the algorithm has a limited stability. ... No bug. ... Kind regards, Jan ...
    (comp.soft-sys.matlab)
  • fmincon stops my algorithm
    ... is there a way to tell fmincon not to stop my algorithm? ... Meaning, a way of saying "ok, the function returned a "wrong" value, let's skip that initial point and get to the next one". ... Kind regards, ...
    (comp.soft-sys.matlab)
  • Re: Is there a polynomial algorithm for that problem?
    ... The sum over all n numbers is negative. ... Unfortunately that algorithm does not scale. ... An instance of 3-Partition consists of a list of 3m positive integers ... list can be partitioned into m lists of size 3, ...
    (sci.math)