Fitting general pareto distribution to histogram

2 ビュー (過去 30 日間)
Josh Wagner
Josh Wagner 2015 年 8 月 11 日
コメント済み: Josh Wagner 2015 年 8 月 11 日
I am trying to get an understanding of how the example is done at this link: http://www.mathworks.com/help/stats/generalized-extreme-value-distribution.html Can someone explain why the gppdf is being multiplied by .5. It makes sense that you would multiply the gppdf by the number of excesses in order to get a number instead of a probability so that it fits to the histogram, but why are they are multiplying by .5 in the last two lines?
rng default % For reproducibility t = trnd(5,5000,1); y = t(t > 2) - 2; paramEsts = gpfit(y) hist(y+2,2.25:.5:11.75); xgrid = linspace(2,12,1000); line(xgrid,.5*length(y)*... gppdf(xgrid,paramEsts(1),paramEsts(2),2));

回答 (1 件)

Brendan Hamm
Brendan Hamm 2015 年 8 月 11 日
The 0.5 has to do with the bin width. So the area under the curve of the pdf is equal to one and needs to equal the area under the curve of the histogram, which is binWidth*numberOfObservations.
  1 件のコメント
Josh Wagner
Josh Wagner 2015 年 8 月 11 日
Ahh, duh! Thanks!

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by