What outlier score is used here? I have come across a score function in a program, but I don't exactly understand what it does. This score is a measure of how probable a sampled/created value is. I will describe the procedure for computing the score function as accurately as I can.
Let $Y$ be a normally distributed random variable (I think this assumption is necessary, as evident in the following).
Furthermore, we are given a sample $\{y_n\}$ of $Y$ and compute the midrange of this sample, called $y_{\text{midr}}$. Then some statistic, in the code called $y_{\text{std}}$ is computed by 
$ y_\text{std} = \frac{y_{\text{max}} - y_{\text{midr}}}{3}$
where $y_{\text{max}}$ is the largest value of the sample.
Finally, the score is computed for the value $y_{\text{true}}$:
$\text{score} = 2 \Phi(\frac{y_{\text{true}} - y_{\text{midr}}}{y_\text{std}}) - 1$
This just seems to be the scattering range of $y_{\text{true}}$ for the cdf of the standard normal distribution.
I then discovered some statement that checkes if the $\text{score}$ value is smaller than a certain threshold, but I have not found what this threshold is. 
Is this a known outlier test, or some frequently used statistical test? Why is the midrange and this strange deviation used?
 A: Well, $y_{std} = (y_{max} - y_{midr})/3$ is inspired by the fact that 99.7% of data will fall within 3 standard deviations of the mean. This is sometimes called the range rule and is sometimes recommended as a way you can mentally calculate a rough standard deviation in your head.
The range rule is not a great way to estimate a standard deviation and in particular it is anti-robust and extremely sensitive to outliers. There are robust ways to estimate the standard deviation such as $s = IQR / 1.34896$. (Here, "robust" means insensitive to rare outliers.)
The score part is simply the usual two-sided p-value for the one sample z-test.
I have never seen this used in a program (where there is always a library function which can calculate the usual unbiased estimate of variance). It makes little sense to use the range rule (which is really just a rule-of-thumb) if you have access to the full sample. The range rule estimate is particularly ill-suited to outlier testing, because it is guaranteed to overestimate variance if even one outlier is present in the sample. 
