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

39 Ansichten (letzte 30 Tage)
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 Kommentare
Sim
Sim am 22 Jun. 2023
Thanks a lot @Mathieu NOE, that's great! .....I did not think about the R2 for this case..... :-)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by