First, the statistician may remove the suspected outliers from the data set and then use the arithmetic mean to estimate the location parameter.
The test, based on a likelihood ratio type of argument, had the distinction of producing an international debate on the wisdom of such actions (Anscombe, 1960, Rider, 1933, Stigler, 1973a)."
The principle upon which it is proposed to solve this problem is, that the proposed observations should be rejected when the probability of the system of errors obtained by retaining them is less than that of the system of errors obtained by their rejection multiplied by the probability of making so many, and no more, abnormal observations.
During these years his test was consistently employed by all the clerks of this, the most active and mathematically inclined statistical organization of the era.
This feature makes Peirce's criterion for identifying outliers ideal in computer applications because it can be written as a call function.
[5] A disconnect still exists between Gould's algorithm and the practical application of Peirce's criterion.
Dardis and fellow contributor Simon Muller successfully implemented Thomsen's pseudo-code into a function called "findx".
[9] In 2013, a re-examination of Gould's algorithm and the utilisation of advanced Python programming modules (i.e., numpy and scipy) has made it possible to calculate the squared-error threshold values for identifying outliers.
Because Peirce's criterion does not take observations, fitting parameters, or residual errors as an input, the output must be re-associated with the data.
Thomsen's code has been successfully written into the following function call, "findx" by C. Dardis and S. Muller in 2012 which returns the maximum error deviation,
Also, the "findx" function does not support any error handling when the number of potential outliers increases towards the number of observations (throws missing value error and NaN warning).
) returned by the "peirce_dev" function must be multiplied by the mean-squared error of the model fit to get the squared-delta value (i.e., Δ2).
Any observation pairs with a squared-error greater than Δ2 are considered outliers and can be removed from the model.
An iterator should be written to test increasing values of n until the number of outliers identified (comparing Δ2 to model-fit squared-errors) is less than those assumed (i.e., Peirce's n).