is there codes that helps to find out the type of the distribution ?

조회 수: 3 (최근 30일)
Khaled aL Qattawi
Khaled aL Qattawi 2022년 8월 25일
댓글: Rik 2023년 2월 9일
i have a set of data of a certain parameter that i need to know the statistical distribution belong to, is there any way or codes can help?

채택된 답변

Rik
Rik 2022년 8월 25일
No. What you ask is fundamentally impossible.
What you can do is try several distributions and see how well they fit.
  댓글 수: 4
Mohamed Zied
Mohamed Zied 2023년 2월 9일
Thank you for your answer.
I plotted many PDFs (using the distributionFitter tool) as you can see in the attached scrreenshot.
Is the judgement of the best fit graphical?
In my case for example, is the Lognormal distribution the best fit to my Data.
Thank you in advance.
Rik
Rik 2023년 2월 9일
What exactly is the best fit depends on your domain knowledge. Your data looks like a skewed normal distribution to me (or the superposition of two). What makes sense in your situation is not something I can tell you, but you need to tell me. And that would answer your own question.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

John D'Errico
John D'Errico 2022년 8월 25일
편집: John D'Errico 2022년 8월 25일
As Rik said, difficult to know which distribution a random variable comes from. Don't believe me?
x = 0.96489;
Do you know if that number was generated from a uniform distribution? On what range? Was it from a normal distribution? A beta? Lognormal? Gamma? Weibull? Exponential? Poisson? Rayleigh? Lots more.
Even had I given you more data, you still cannot know. You can perform tests to see if one distribution would be more likely than another. (More data would be REALLY helpful then.)
You can use tools to fit a family of distributions. Common ones are the Johnson or Pearson family of distributions. Even then you won't KNOW which distribution a sample came from, only making a better guess. There are tools like fitdist and distributionFitter. I thought I remember the stats toolbox having a tool to fit the pearson family of distributions too. Ah, yes, it does, though I had to look. pearsrnd does it all.
The nice thing about the Pearson family (and the Johnson family as I recall) is they encompass a pretty wide variety of distribution shapes. But I have a funny feeling one can abuse them if you don't understand these things. And those tools are completely dependent on estimates of the first 4 moments of your distributino, but the higher order moments are difficult to estimate well.
Anyway, the fact is, almost NO data you will generate in the real world comes from a truly KNOWN distribution. All data will be corrupted in some way, so that even if it should be essentially normal, you will always have crap in there that makes it not quite normal, etc.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by