I have been spending the last two days trying to construct a solid answer to the question:
What is the distribution that best describes my sample?
I did the following:
- Plot the histogram (nomalized as pdf) to have a first idea of the shape of the distribution
- Fit a theoretical distribution with paramenters estimated from the sample
- Fit an empirical density (say Kernel
- QQplot of the theorethical quantiles vs empirical quantiles
Ok this is good, but no real answer to my question. I want to test if the sample came from the theoretical distribution. My journey continues and I have some well known tests that I can choose:
To put it simply I read that if I don't know the true value of the paramenters and I want to estimate them from the sample, the p-values are just wrong.
I am a MATLAB user and I see that there is a function namely
adt = adftest(mysample, 'Distribution', 'whatever')
that allows my to perform Anderson-Darling test even without specifying the value of the paramenters, as they are estimated from the sample and the pvalues are estimated using Montecarlo Simulation.
That's perfect BUT in MATLAB this can be done only with some probability distributions, not all of them.
If you know the parameters though, MATLAB allows you to perform the adtest for any distribution.
My questions are (in order of importance):
- Can I extent the current Anderson-Darling test to any distribution and unknown paramenters?
- Could anyone explain a general procedure that can be used in this case or even point me out to some academic papers or books where I can read more about this?
- How would you answer to the question: What is the distribution that best describes my sample?
Thank you very much for your help. Regards