1
$\begingroup$

I have a set of positive values and I need to increase or decrease this set by adding or reducing number of values. But I would like the mean of values is not altered much.

Example: I have this array {1,1,1,1,1,2,4,4,15,20} size is 10 I need size 8 or 16 (I always need pow of two) so not to alter too, I prefer to delete two values in this array, instead reaching size 16. How I chose this two value ?? The average may change a little bit, but not too.

  • 0
    Please retag this question to "Probability-distribution". "Distribution-theory" is meant for generalized functions.2012-02-12

1 Answers 1

1

Let say our set of values is $S=\{a_1,a_2,\dots,a_n\}$. You should look for values $x,y\in S$ such that have closest average to the average of the set: $\min_{x,y}|\frac{x+y}{2}-\frac{1}{n}\sum_{i=1}^na_i|$ This is what I mean: the average of $\{1,1,1,1,1,2,4,4,15,20\}$ is 5, so the perfect choice would be such $x,y$ that $\frac{x+y}{2}=5$, in this case we take $4,4$, because any other pair would have average further from 5 than 4

  • 0
    If I remove one value at time, removing value that minimize the change of avarage at each step, and repeat until the size is correct, is this a valid approach ??2012-02-13