Mathematics Previous page   Next Page

Error Bounds

Error bounds are useful for determining if your data is reasonably modeled by the fit. You can obtain the error bounds by passing an optional second output parameter from polyfit as an input parameter to polyval.

This example uses the census demo data and normalizes the data by centering it at zero mean and scaling it to unit standard deviation. The example then uses polyfit and polyval to produce error bounds for a second-order polynomial model. Year values are normalized. This code uses an interval of ±2capital delta, corresponding to a 95% confidence interval.


Previous page  Exponential Fit The Basic Fitting Interface Next page

© 1994-2005 The MathWorks, Inc.