Curve-fitting using the Curve Fitting Toolbox, gives wrong confidence intervals
Show older comments
We have a set of data that looks something like this:

What we are trying to do is by using the curve fitting toolbox, apply a polynomial curve and plot the curve together with the confidence interval. Sounds simple right?
The MATLAB "fit" function returns a cfit object. The object has the following output:
fitresult =
Linear model Poly2:
fitresult(x) = p1*x^2 + p2*x + p3
Coefficients (with 95% confidence bounds):
p1 = -0.01183 (-0.01667, -0.006986)
p2 = 1.337 (1.088, 1.585)
p3 = -45.94 (-48.62, -43.25)
I'm seeing a problem there, the p3 value interval is a bit small, and by plotting it you can see how weird it looks:

It looks "backwards" and I'm not sure why. Does anyone know why?
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!