There's live feed from ~30 exchanges http://www.coinparator.com/live/BTC/USD/ I'm calculating and displaying average of all prices (on the top, orange box).
Problem is, that usually one or two exchanges have too extreme prices (too low, too high). While 28 exchanges are trading around \$9500, one or two exchanges are trading at \$7000. Which will affect my average result.
Is there some mathematics formula, that would give less importance to values, that are too extreme?