
## 4. Examples To Explain פ Algorithm

 In prior work (Hsiao, 2009A), we have already gave an example to interpret פ algorithm. It seems necessary to give further examples. We still take the same Barnett data for analysis. Barnett data: 3, 4, 7, 8, 10, 949, 951 If we directly use IIR algorithm (the center-safe one), we can get two outliers: 949,951. The corresponding IIR values are as Table 2.

Optionally, we can use פ algorithm. We can randomly chose a reasonable pattern. Here the pattern to describe the data is normal distribution and we suppose all data are just within three-sigma. The "view" could be calculated in this way: To any datum, i.e. 3, find its furthest neighbor, say 951, as its three standard deviation. Then we use RDD algorithm. The detail is like following. Input: Barnett data set Output: RDDs of Barnett data
- for ( i from 1 to N) {
 find the furthest neighbor of i, fari.

 construct a density function: 2 2 2 ( )    x f x ewith   iand  2 1 ( )  

$$\sigma=(f a r_{i}-i)/3$$
 Calculate the max densities max= *f(i)*. for( j from 1 to N) { Calculate the densities: *f(j)*

Calculate the similarity: $\hat{\mbox{\it sim}}^{i}=1-(max-f(j))/max$,
 and the offset: off j i
$$\mathrm{and~the~offset:}\;\;o f\!f\,_{,}^{i}=\left|j-i\right|.$$
 } }