返回列表 发帖
maratikus Wrote:
-------------------------------------------------------
> ohai Wrote:
> --------------------------------------------------
> -----
> > Yeah. There are lots of ways to do this. The
> > simplest way I can think of is:
> >
> > 1) In column A, use =rand() for each of the 10
> > cells. This generates a uniform random variable
> (0
> > to 1) for each cell.
> > 2) Then, take the sum of all the column A
> values.
> > 3) In column B, divide the column A values by
> the
> > sum from 2). The column B values will be random
> > and will sum to 1.
>
> While this would be a random allocation it would
> not be uniformly distributed. For random
> allocations, it would be more practical looking at
> algorithms of generating random points on a
> simplex (since one might want to consider upper
> constrait for each component below 1). I started
> a discussion about that on wilmott a few years
> ago, it might be easy to find suggested solutions
> there.

Well if you ignore how you derived the 10 numbers (which add up to 1) then they sound pretty random to me...

TOP

返回列表