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

9 visualizaciones (últimos 30 días)
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 comentarios
Jeff Miller
Jeff Miller el 23 de Nov. de 2018
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 el 23 de Nov. de 2018
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.

Iniciar sesión para comentar.

Respuestas (1)

Jeff Miller
Jeff Miller el 24 de Nov. de 2018
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)

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by