How to do error approximation of a weibull fit in matlab

1 次查看(过去 30 天)
Hello great community, I know this might a bit off from scope of the community but i beg your assistance please. I have doing some wind data analysis using matlab. I used weibull pdf as the fitting fucntion. Now I would like to asses how well is weibull fitting the data. I intended to use R-squared (method of coefficients) or the RMSE. I seem not just figure how I can do the assesment in matlab. Have tried even to use distribution fitter application however I cant find the option for diplaying the error between the data and the approximation. Coz my i used hist(data,bin,'Normalized','probabilty',) function to plot the real probabilty distruibution. Then I used the plot(data,wbl(pram1,param2)) to plot the fitted disribution on the same axes. Now, how can I do the error approximation? Been searching through the net, answers have found so far do not satisfy my expectations. Any leads will be much appreciated.

回答(1 个)

Paul
Paul 2023-6-15
The Weibull distribution is that of a continuous random variable. Are you trying to compare its fitted pdf with the plot returned by histogram using the 'probability' normalization? If so, it's not clear how to make that comparison, insofar as the pdf and that histogram mean different things. I suppose you could make the histogram using the 'pdf' normalization and then compare the histogram values to the fitted pdf evaluated at the bin centers. I guess more information is needed on how you want to quantify the error between the estimated pdf (or cdf?) and the data. Using the cdf might be easier, at least from the perspective that the cdf can be estimated pointwise from the data and can be compared to the fitted cdf at the same points.
If using fitdist to develop the fitted distribution, paramci provides some idea of how much to believe the parameters of the fitted distribution. Also, chi2gof does a hypothesis test on whether or not the data came from the fitted distribution. Neither of these will quantify how well the fitted distribution fits the data, but may give you useful information nevertheless.

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by