GrubbsBeckTest (FPScript)

21.09.2021

Carries out a Grubbs-Beck outlier test. The test checks whether the highest and/or lowest value in the sample belongs to the sample or not.

Syntax

GrubbsBeckTest(Sample, ErrorProbability, Result)

 

The syntax of the GrubbsBeckTest function consists of the following parts:

Part

Description

Sample

Contains the sample to be examined with at least 3 values and a maximum of 147 values.

Permitted data structures are data series und signal. 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.

ErrorProbability

Specifies the error probability, on which the test is to be based, as a percentage. Here, the values 0.5, 1, 2.5, 5 and 10 % are permitted.

Permitted data structures are scalar value. All numeric data types are permitted. The argument is transformed to the unit %.

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.

Result

Determines the result of the function.

The argument Result can have the following values:

Constant

Meaning

TEST_RESULT

The test result is the output.

TEST_REMOVE_OUTLIER

The sample is output with all outliers set to void. In this case, the test is repeated using the remaining values until no more outliers can be found.

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.

Remarks

The sample must originate from a normally distributed population.

The result is either an integral scalar value with the test result or the sample cleaned of outliers with a 64-bit floating point value data type. The values recognized as being outliers are marked as void.

In the first case, the following values are possible:

Value

Interpretation

0

The lowest and highest values are, with the error probability specified, outliers.

1

The lowest value is, with the error probability specified, an outlier.

2

The highest value is, with the error probability specified, an outlier.

3

With the probability of error specified, there are no outliers in the sample.

4

No result could be determined, since the sample size is outside the valid range.

Available in

Option Enhanced Statistics

Examples

Dim data = {36, 37, 39, 39, 40, 40, 41, 41, 41, 42, 44, 46}
GrubbsBeckTest(data, 1 %, TEST_RESULT)
 

Results in 3s. Neither the smallest nor the largest value is an outlier when the error probability is one percent. Thus: (Mean(data) - Minimum(data)) / Sqrt(Variance(data)) = (40.5 - 36) / 2.74 = 1.64 < 2.55 = T12;0.99 (Grubbs-Beck test quantile)

(Maximum(data) - Mean(data)) / Sqrt(Variance(data)) = (46 - 40.5) / 2.74 = 2.01 < 2.55 = T12;0.99 (Grubbs-Beck test quantile)

See Also

DavidHartleyPearsonTest Function

Outlier Test Analysis Object

Statistics Option

References

[1] "Hartung, Joachim": "Statistik (Statistics), 9th Edition", page 344 f. "Oldenbourg Verlag GmbH, Munich",1993.ISBN 3-486-22055-1.

Share article or send as email:

You might be interested in these articles