Calculates statistical intervals of the best linear fit for a data set (X, Y). You must manually select the polymorphic instance to use.


icon

Inputs/Outputs

  • cdbl.png confidence level

    confidence level specifies the level of certainty for the confidence interval. The default is 0.95, which means the probability that the best fit falls between Lower Bound and Upper Bound is 95%. confidence level must be greater than 0 and less than 1.

  • c1ddbl.png Y

    Y is the array of dependent values. Y must contain at least three points.

  • c1ddbl.png X

    X is the array of independent values. X must be the same size as Y.

  • c1ddbl.png Weight

    Weight is the array of weights for the observations (X, Y). Weight must be the same size as Y. Weight also must contain non-zero elements. If an element in Weight is less than 0, the VI uses the absolute value of the element.

    If you do not wire an input to Weight, the VI sets all elements of Weight to 1.

  • cdbl.png slope

    slope specifies the slope of the fitted model.

  • cdbl.png intercept

    intercept specifies the intercept of the fitted model.

  • i1ddbl.png Upper Bound

    Upper Bound returns the upper bound of the confidence interval.

  • i1ddbl.png Lower Bound

    Lower Bound returns the lower bound of the confidence interval.

  • idbl.png delta slope

    delta slope returns the confidence radius of slope.

  • idbl.png delta intercept

    delta intercept returns the confidence radius of intercept.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • Confidence Interval

    In the following illustration, the region between the upper and lower confidence bounds is the confidence interval.

    Prediction Interval

    In the following illustration, the region between the upper and lower prediction bounds is the prediction interval.

    If the noise of Y is Gaussian distributed, use both instances of the polymorphic VI to calculate the confidence interval and prediction interval. The following block diagram illustrates the calculation of the confidence interval and the prediction interval using the Linear Fit Intervals VI. You must fit the observations with the Linear Fit VI using the Least Square method to obtain the slope and intercept.