MathGroup Archive 2011

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

Search the Archive

Re: Extra parameter for DirichletDistribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121966] Re: Extra parameter for DirichletDistribution
  • From: sashap <pavlyk at gmail.com>
  • Date: Fri, 7 Oct 2011 04:49:35 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j6jpbm$mdk$1@smc.vnet.net>

Dirichet distribution with (K+1) parameters is a distribution on a symplex
which has dimension K. See

http://en.wikipedia.org/wiki/Dirichlet_distribution

In other words, in Mathematica, vector {x[1], x[2], ..., x[k]} \
[Distributed]
DirichletDistribution[{a[1],a[2],...,a[k],a[k+1]}] contains
independent
variables only.

One occasionally sees reference to Dirichlet vector as having k+1
elements,
subject to constraint x[1]+x[2]+...+x[k]+x[k+1] == 1

To reconstruct such a distribution in Mathematica 8, for K=2, we would
write:

TransformedDistribution[ {x, y, 1-x-y}, {x,y} \[Distributed]
DirichletDistribution[{a1,a2,a3}] ]

Notice, that parameters a1, a2, a3 need to be strictly positive for
the distribution to be defined.

Also notice, that the distribution so constructed is degenerate in 3D,
because its probability is concentrated
on the lower-dimensional subspace, but you can use it to compute
expectations:


In[179]:= Mean[
 TransformedDistribution[{x, y, 1 - x - y}, {x, y} \[Distributed]
   DirichletDistribution[{a1, a2, a3}]]]

Out[179]= {a1/(a1 + a2 + a3), a2/(a1 + a2 + a3), a3/(a1 + a2 + a3)}

In[180]:= Probability[
 x < y < z, {x, y, z} \[Distributed]
  TransformedDistribution[{x, y, 1 - x - y}, {x, y} \[Distributed]
    DirichletDistribution[{1, 2, 3}]]]

Out[180]= 67/144

In[182]:= RandomVariate[
 TransformedDistribution[{x, y, 1 - x - y}, {x, y} \[Distributed]
   DirichletDistribution[{1, 2, 3}]], 2]

Out[182]= {{0.0222922, 0.40553, 0.572177}, {0.0958752, 0.541714,
  0.362411}}

and so on.

Hope this helps.

On Oct 6, 3:37 am, Todd <johnson.tod... at gmail.com> wrote:
> Can anyone tell me why DirichletDistribution in Mathematica 8 requires
> k+1 parameters for a k-dimensional distribution and why the extra
> parameter cannot be 0, which would give results similar to other
> software packages that require only k parameters. The function of the
> extra parameter is clear from the mean of the 2D distribution given in
> the help file:
>
> Namely, the mean of DirichletDistribution[a1, a2, a3] is {a1/
> (a1+a2+a3), {a2/(a1+a2+a3)}.
>
> In this case, setting a3 to 0 would give me the desired result, but
> the function requires a3 to be positive.
>
> I noticed that a definition of DirichletDistribution from an older
> Wolfram tutorial required only k parameters for a k-dimensional
> distribution.
>
> Todd




  • Prev by Date: Re: Table NDSolve Plot
  • Next by Date: Wolfram LinkLibrary and additional dll on Windows
  • Previous by thread: Extra parameter for DirichletDistribution
  • Next by thread: Table NDSolve Plot