Curve Fitting Tool - Weibull distribution

6 views (last 30 days)
SYML2nd
SYML2nd on 14 Nov 2020
Edited: SYML2nd on 15 Nov 2020
Hi all,
I am trying to do a fitting of a graph, using the curve fitting Tool and, in particular, using the Weibull option that use the formula:
a*b*x^(b-1)*exp(-a*x^b)
Despite the fact that the shape of the Weibull distribution seems to be the same of the one of my graph, the height of the Weibull distribution is lower. I have tried to calculate the integral of the Weibull function of the curve fitting tool of some data and the result is always 1. I think that this is due to the fact that it is a density function. With the above mentioned formula, it is impossible to fit properly the dataset because the Weibull distribution is always lower.
I used the approach shown here https://it.mathworks.com/help/curvefit/weibull.html, using the formula:
c*a*b*x^(b-1)*exp(-a*x^b)
Using this approach I have seen that the parameter c helps to scale the data. Is this approach correct? The second formula that I used should not substitute the first one that is used as default in the curve fitting tool?
if I want to obtain a Weibull distribution or a Lognormal distribution is it sufficient to apply a multiplier coefficient (e.g. the c parameter, which is necessary in the formula above to allow the curve's height to adjust to data) to a density function?
  6 Comments
dpb
dpb on 15 Nov 2020
I've never used the fitting tool appliction; I always just use fit at the command line so I know what I'm getting (plus, I think it is at least as simple if not simpler than going through the gui interface). Hence, I just quoted the doc which implies the default isn't a pdf; however, I agree your experiments indicate the doc and the routine are not in synch with each other.
Which behavior is considered to be the design would be up to TMW to clarify and correct whichever is incorrect in order to remove the inconsistency.
As to the comment above
"The second formula that I used should not substitute the first one that is used as default in the curve fitting tool?"
As you observed, "No.". That behavior I agree is as designed and documented; the tool uses what it has set as default for each type you can select; if you want something different inside it you must define the fit explicitly. I presume you could then save that and re-import that definition to avoid having to recreate it over every time, but that's also supposition on having not used the tool enough to be very familiar with it at all.
SYML2nd
SYML2nd on 15 Nov 2020
Edited: SYML2nd on 15 Nov 2020
Ok. What it is not clear to me now is: if I want to obtain a Weibull distribution or a Lognormal distribution is it sufficient to apply a multiplier coefficient (e.g. the c parameter, which is necessary in the formula above to allow the curve's height to adjust to data) to a density function?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!