How to calculate the dirichlet cdf
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
xueqi
am 14 Jun. 2014
Kommentiert: Star Strider
am 14 Jun. 2014
Dear Fellows,
Do you know how to write the cdf of dirichlet distribution? I could write the pdf but do not know how to formulate the cdf. I would like to calculate the area between x-0.5 to x+0.5, which is F(x+0.5)-F(x-0.5) where F refers to the cdf. Could you offer me some advice about this?
Thanks very much.
Xueqi
0 Kommentare
Akzeptierte Antwort
Star Strider
am 14 Jun. 2014
Bearbeitet: Star Strider
am 14 Jun. 2014
Wikipedia doesn’t give an analytic expression for the cdf. Since you already have a function written for the pdf, I suggest simply integrating it using the integral or integral2 function.
2 Kommentare
Star Strider
am 14 Jun. 2014
It is difficult for me to follow your code. I have no experience with dirpdf.
If you are using vector-valued functions, or if your call to dirpdf returns a vector, it might be necessary for you to use two nested integral calls, one to evaluate the value for x1 and the other for x2. The integral function will take vectors, while integral2 will not.
If that is not the problem, you will likely need to go through your code and your calls to dirpdf with the arguments you present to it in your call to integral or integral2 to understand what it returns.
If all else fails, generate a vector of values for x, evaluate dirpdf in as many nested loops as necessary, and then use trapz to integrate it.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Generalized Extreme Value Distribution finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!