[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how about this idea for sampling in the simplex?
From: |
Paul Johnson |
Subject: |
how about this idea for sampling in the simplex? |
Date: |
Mon, 11 Oct 1999 13:30:55 -0500 |
At some point, we will just need to master simulation of multivariate
pdfs on generic domains :)
Until then, I wonder what you think about this. Consider the simplex
that is the triangle with vertices (0 0 1) (0 1 0) (1 0 0).
We want points selected in there in an equally likely way. As noted in
this thread, it is obvious that x3=1-x1-x2, so this reduces to selecting
x1 and x2.
Suppose we know x1=X1. Then it is necessary that x2 be chosen uniformly
on 1-X1. Correct? Hence, the conditional probability density function
for x2 has to be
p(x2|x1)= 1/(1-x1).
Now we need to find a probability model for x1 such that the joint pdf
is a constant, or
p(x1,x2)= p(x1)*p(x2|x1)=C.
That's the goal, since we want sampling that is uniform. Solving for
p(x1), I get
p(x1)= (1-x1)*C.
In other words, the probability of getting a large value of x1 is
negatively proportional to the value of x1. C is the reciprocal of the
area of the triangle. On the same envelope I've done these other
calculations, I get the area of the triangle is sqrt(3).
So, how do we get a draw from this distribution, p(x1)=(1-x1)/sqrt(3),
from tools in swarm? .
Well, as McCoy says on Star Trek,"dammit, Jim, I'm just a country
doctor," but consider this possibility. At first, when I forgot to write
down the C part, it was obvious. If we just need a draw from p(x1)=1-x1,
then
Step 1. Draw a uniform variate s0 from [0,1].
Step 2. Draw a uniform variate s1 from [s0,1].
But we have to take into account C? Well, I stared at this a long time
and concluded that we don't have to, since it is a constant, it does not
alter the relative likelihood of the outcomes.
So I believe that this draw s1 has the desired distribution.
I usually make some colossal mistake when I try to solve these problems
for which I'm not well prepared, but in this thread I won't be the first
;)
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- how about this idea for sampling in the simplex?,
Paul Johnson <=