Statistics Toolbox    
polyconf

Polynomial evaluation and confidence interval estimation

Syntax

Description

[Y,DELTA] = polyconf(p,X,S) uses the optional output S generated by polyfit to give 95% confidence intervals Y ± DELTA. This assumes the errors in the data input to polyfit are independent normal with constant variance.

[Y,DELTA] = polyconf(p,X,S,alpha) gives 100(1-alpha)% confidence intervals. For example, alpha = 0.1 yields 90% intervals.

If p is a vector whose elements are the coefficients of a polynomial in descending powers, such as those output from polyfit, then polyconf(p,X) is the value of the polynomial evaluated at X. If X is a matrix or vector, the polynomial is evaluated at each of the elements.

Examples

This example gives predictions and 90% confidence intervals for computing time for LU factorizations of square matrices with 100 to 200 columns.


  poisstat polyfit