MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Random points in triangle

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111758] Re: Random points in triangle
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Thu, 12 Aug 2010 05:31:00 -0400 (EDT)

On Wed, 11 Aug 2010 at 2:00 PM, Mark McClure <mcmcclur at unca.edu> wrote:
> On Sun, Aug 8, 2010 at 7:23 AM, Ray Koopman <koopman at sfu.ca> wrote:
>> Try this a few times. It looks pretty uniform to me.
>>
>> p = RandomReal[NormalDistribution[0,1],{3,2}];
>> r = #.p / Total[#,{2}] & @
>>    RandomReal[ExponentialDistribution[1],{5000,3}];
>> ListPlot[{p,r},PlotRange->All,AspectRatio->1,Frame->True,Axes->None,
>>    PlotStyle->{{Red,PointSize[.02]},{Black,PointSize[.005]}}]
> 
> Yes, it turns out that it *must* be.  According to Wikipedia, the
> obvious generalization works for the n-simplex:
> http://en.wikipedia.org/wiki/Simplex#Random_sampling
> 
> If you are happy working with change of variables for triple integrals
> and joint probability distributions, then the triangular case isn't
> too hard.  Here's my proof:
> http://facstaff.unca.edu/mcmcclur/blog/UniformTriangle.html
> 
> Mark McClure

I've been thinking about this, too, and had to ask for help. 
For the general case, see the thread "Uniform points in a simplex", 
http://groups.google.ca/group/sci.stat.math/browse_frm/thread/3c3d783438fa844a#


  • Prev by Date: Re: Mathematica won't stop
  • Next by Date: Re: Collecting Positive and Negative Terms
  • Previous by thread: Re: Random points in triangle
  • Next by thread: BinLists in Array