Clear Filters
Clear Filters

How to determine the parameters of statistical distributions

2 views (last 30 days)
Hey, I have a dataset which consist of hourly wind speed points. I would like to know ho to use the "mle" command to determine the estimates for the parameters of a weibull, rayleigh, gamma and chi-square distribution?

Accepted Answer

Star Strider
Star Strider on 26 Mar 2018
Use the Statistics and Machine Learning Toolbox fitdist (link) function.
  5 Comments
vedesh Mohit
vedesh Mohit on 26 Mar 2018
Yea I know fitdist is not an app, I was just testing out the distribution fitter app because it has these distributions built in already. However I think the issue that I am facing is that even if I use the app or the fitdist function, my wind speed data consist of points with the value 0 and these distribution does not consider zero to be a positive integer. Is there a way I could go about doing this? If I exclude the zeros, would that be considering as biasing the results?
Star Strider
Star Strider on 26 Mar 2018
I usually substitute a very small scalar for zero entries, usually 1E-7, 1E-8 (essentially sqrt(eps)) or something in that range. I choose the magnitude so that squaring it remains a very small scalar, rather than zero, since zero could result in non-finite results. That also does not (in my experience at least) significantly affect the estimated distribution parameters.
However it could affect the parameter values if the rest of your data have very small amplitudes as well. The only solution for that might be to do your calculations in the Symbolic Math Toolbox, where extended precision is allowed. Then you could use an even smaller symbolic scalar to substitute for zero values.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!