ConfidenceInterval (FPScript)
Calculates a confidence interval for the mean or the variance of the normal distribution to which the specified sample belongs.
Syntax
ConfidenceInterval(Sample, ConfidenceLevel, Parameter [ , Mode = PROCESS_ROWS ])
The syntax of the ConfidenceInterval function consists of the following parts:
Part |
Description |
||||||||
---|---|---|---|---|---|---|---|---|---|
Sample |
The sample to be examined. All data structures are allowed. All numeric data types are permitted. For complex data types the absolute value is formed. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||
ConfidenceLevel |
Specifies the confidence level, on which the calculation is to be based, as a percentage. Permitted data structures are scalar value. All numeric data types are permitted. The argument is transformed to the unit %. The value must be greater or equal to 0 % and less or equal to 100 %. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||
Parameter |
Selects the parameter for which a confidence interval is to be calculated. The argument Parameter can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||
Mode |
Specifies how data matrices and signal series are to be processed. The argument Mode can have the following values:
If this argument is omitted, it will be set to the default value PROCESS_ROWS. |
Remarks
As the result the function returns a data series of data type 64-bit floating point.
The sample must originate from a normally distributed population. The function returns a data series with two floating point values as the result, which contains the upper and lower interval limits. If DataSet is a data series or signal, the result is a data series containing the upper and lower limits of the interval. If DataSet is two-dimensional, then the result is a data matrix or a signal series with two columns containing the upper and lower limits of the intervals for each column or row of the DataSet. If Parameter has the value PARAMETER_DISTFROMMEAN, then half the width of the interval is returned instead of the interval limits. This result is ideal for situations such as displaying the confidence intervals of a signal series as error indicators in a diagram. The rank of the result then decreases by one for each, so that in the event that DataSet is two-dimensional, for instance, a data series is returned instead of a data matrix with two columns.
Available in
Option Enhanced Statistics
Examples
ConfidenceInterval({87, 112, 110, 87, 96, 118, 108, 114, 87, 90, 85, 84, 113, 90, 90, 104 }, 95, PARAMETER_MEAN)
Results in {91.05, 105.08}. For example, the data series involves the quantity of a product sold over 15 days. You can assume that the count is distributed evenly. In 95% of the cases, distribution is between 91 and 105 pieces.
See Also
Confidence Interval Analysis Object
References
[1] "Hartung, Joachim": "Statistik (Statistics), 9th Edition", page 160 f. "Oldenbourg Verlag GmbH, Munich",1993.ISBN 3-486-22055-1.