Evaluating goodness of fit of a probability distribution at a certain interval

10 ビュー (過去 30 日間)
Darragh Kenny
Darragh Kenny 2018 年 11 月 22 日
回答済み: Jeff Miller 2018 年 11 月 24 日
Hi all,
I fitted probability distributions to some data and would like to evaluate their goodness of fit with
kstest
adtest
chi2gof
However, I am only interested in the lower tail of the distribution, and would therefore like to weight the tail higher, or restrain the evaluation to the lower half of the probability distribution object. So far I tried to use
truncate
, but then the pd rescales, so that the integral of the pdf would still be 1. Does anyone know how to avoid this or a different approach?
Cheers,
Darragh
  4 件のコメント
Jeff Miller
Jeff Miller 2018 年 11 月 23 日
Could you say a bit more about why truncate isn't satisfactory? It seems to me that if you truncate both the pd and the observations in the dataset at the same truncation point, then you are automatically weighting only the tail in the fitting process and also automatically evaluating only the fit of the tail with kstest, etc.
Darragh Kenny
Darragh Kenny 2018 年 11 月 23 日
pd=makedist('normal','mu',1,'sigma',1);
pd_trunc=truncate(pd,0,mean(asdf))
plot(-5:.1:5,pdf(pd,-5:.1:5))
hold on;
plot(-5:.1:5,pdf(pd_trunc,-5:.1:5))
Inside the truncation interval, the pdf of pd_trunc is not equal to the pdf of pd, because it is divided by the probability assigned to that interval by pd. Therefore, in this example pd_trunc will be larger than pd in the truncation interval. pd_trunc is scaled so that its integral is still 1.

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

回答 (1 件)

Jeff Miller
Jeff Miller 2018 年 11 月 24 日
Do you want to rescale the pdf back like this?
pd=makedist('normal','mu',1,'sigma',1);
pd_trunc=truncate(pd,0,mean(asdf))
plot(-5:.1:5,pdf(pd,-5:.1:5))
frac = cdf(pd,mean(asdf)) - cdf(pd,0)
hold on;
plot(-5:.1:5,pdf(pd_trunc,-5:.1:5)*frac)

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by