Borrar filtros
Borrar filtros

Evaluate the "goodness of fit" of a distribution fitting, when using the function "fitdist"

33 visualizaciones (últimos 30 días)
When I use the function fitdist to find the best distribution fitting, I would like to measure or assess the goodness of fitting.
What are the possible ways to measure the goodness of fitting of a distribution fitting, when employing the function fitdist?
% Example where I would like to assess the goodness of fit for this
% histogram:
rng default;
r = normrnd(10,10,1000,1);
histogram(r,'binwidth',1,'Normalization','pdf') % <-- my data
pd = fitdist(r,'normal'); % <-- fit the distribution to the data (fitdist)
xgrid = linspace(-30,100,100)';
pdfEst = pdf(pd,xgrid);
line(xgrid,pdfEst,'Linewidth',2,'color','r')
  7 comentarios
Sim
Sim el 22 de Jun. de 2023
Thanks a lot @Mathieu NOE, that's great! .....I did not think about the R2 for this case..... :-)

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by