EDIT: Background: I need to (lin) scale a big dataset to e.g [0,10]. Outliers (in example below 1 and 10000 get (non lin) mapped to resp 0 and 10, the rest (50,51 in this case) is scaled over 0 to 10 The goal is to catch as much as numbers in this range. If I do not protect myself against very large/small outliers all other values will be mapped to a very small range if that happens.
Assume I have a big dataset (million numbers), and I want the smallest range without outliers.
So e.g. I have:
$$x=[1,1,50,50,50,50,50,50,50,50,51,51,51,51,10000,10000]$$
I am looking for "the smallest range which include the maximum number of numbers", so that I am looking for an algorithm which finds $50$ (lower bound) and $51$ (upper bound) in this case.
My question:
- What is the statistical term or name of this kind of questions?
- How can I solve this?
- (For academics) are there any papers/researchers who wrote about different possibilities about solving this.
My ideas:
So my initial idea was: range = [average/mean $\pm$ $1$ or $2$ standard deviations)
$$\matrix{\text{mean}(x) &=& 1287\\ \text{std}(x) &=& 3292\\ \text{mean}(x) - \text{std}(x) &=& -2005}$$
So that is not a solution, so second thought:
$$\text{median}(x) - \text{std}(x) = -3242$$
So that also does not help.