MAT8886 the Dirichlet distribution
[This article was first published on Freakonometrics - Tag - R-english, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In the course, still introducing some concept of dependent distributions, we will talk about the Dirichlet distribution (which is a distribution over the simplex of ). Let
denote the Gamma distribution with density (on
)
Let denote independent
random variables, with
. Then
where
has a Dirichlet distribution with parameter . Note that
has a distribution in the simplex of
,
and has density
We will write .
|
|
![]() |
![]() |
|
|
![]() |
![]() |
![http://freakonometrics.blog.free.fr/public/perso5/diri20.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri20.gif)
![http://freakonometrics.blog.free.fr/public/perso5/diri21.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri21.gif)
![http://freakonometrics.blog.free.fr/public/perso5/dirichlet222.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/dirichlet222.gif)
or
![http://freakonometrics.blog.free.fr/public/perso5/diri22.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri22.gif)
![http://freakonometrics.blog.free.fr/public/perso5/diri23.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri23.gif)
![http://freakonometrics.blog.free.fr/public/perso5/dirichlet522.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/dirichlet522.gif)
and finally, below,
![http://freakonometrics.blog.free.fr/public/perso5/diri24.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri24.gif)
![http://freakonometrics.blog.free.fr/public/perso5/dirichlet225.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/dirichlet225.gif)
Note that marginal distributions are also Dirichlet, in the sense that if
![http://freakonometrics.blog.free.fr/public/perso5/diri15.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri15.gif)
![http://freakonometrics.blog.free.fr/public/perso5/diri16.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri16.gif)
![http://freakonometrics.blog.free.fr/public/perso5/diri17.gif](http://freakonometrics.blog.free.fr/index.php?post/2012/02/14/public/perso5/diri17.gif)
> library(MCMCpack) > alpha=c(2,2,5) > x=seq(0,1,by=.05) > vx=rep(x,length(x)) > vy=rep(x,each=length(x)) > vz=1-x-vy > V=cbind(vx,vy,vz) > D=ddirichlet(V, alpha) > persp(x,x,matrix(D,length(x),length(x))(to plot the density, as figures above). Note that we will come back on that distribution later on so-called Liouville copulas (see also Gupta & Richards (1986)).
To leave a comment for the author, please follow the link and comment on their blog: Freakonometrics - Tag - R-english.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.