擅长:python、mysql、java
<p>您可以将它们转换为<a href="http://en.wikipedia.org/wiki/Standard_score" rel="noreferrer">Z-scores</a>并查找异常值。在</p>
<pre><code>>>> import numpy as np
>>> stats = [100, 98, 102, 100, 108, 23, 120]
>>> mean = np.mean(stats)
>>> std = np.std(stats)
>>> stats_z = [(s - mean)/std for s in stats]
>>> np.abs(stats_z) > 2
array([False, False, False, False, False, True, False], dtype=bool)
</code></pre>