I have some numbers mostly less than 1, and a few of them are negative. How can I calculate mean of them so it will skew towards the largest number? for example my numbers are: $1.2, 0.01, 0.1, -0.2 $. so the mean of them is:
$$ (1.2+0.01+0.1-0.2)/4=0.227 $$
but if I calculates the mean like this:
$$ \left(\sqrt1.2 + \sqrt0.01 + \sqrt1.01 - \sqrt(|-0.2|)\right)^2/4 = 0.283 $$
my question is does calculating mean of numbers in this way pushes the mean of numbers towards the largest number in all cases? If yes, how can I prov that? If no, how should I calculate the mean?
How to push mean of numbers twards largest one?
25 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
What you’re proposing is a sort of reversal of a common type of average called root mean square, so you could call it a “square mean root”. It has two obvious drawbacks:
- It completely ignores the sign of the negative values;
- It is only weakly effective at highlighting the largest value.
In fact it is worse than the regular mean. The only reason it “won” in your example was because you effectively replaced the -0.2 with 0.2: had you done so for the usual mean it would have been 0.327 which is higher than the square-mean-root.
The RMS is definitely better than your proposal for accentuating large values, but it still shares the drawback of erasing negative signs. Since you call them out specifically I am going to assume that you care about this, otherwise you should just simplify your original question to consider positive values.
One approach is to generalize further to generalized means which admit a parameter $p$ (in your example $p=\frac12$ and in the case of RMS $p=2$). These are in generally only defined for sets of nonnegative reals. But by restricting $p$ to be an odd positive integer, the same definition works for a mixture of positive and negative values, but it has the following modified convergence property:
Let $X$ be a nonempty finite sequence of real numbers and let $m := \max \{|x| : x \in X \}$, the largest absolute value in $X$. Suppose $m$ occurs exactly $a$ times in $X$ and $-m$ occurs exactly $b$ times in $X$. If $a\ne b$ then $$\lim_{p\to \infty \\ p\text{ odd}} M_p(S) = \begin{cases}+x & \text{if }a>b,\\ -x & \text{if }a< b.\end{cases}$$ If $a=b$, this limit reduces to the same limiting mean as $X$ with all copies of $\pm m$ removed (if this results in an empty set, the limit is 0).
So this picks out the largest value in $X$ except when there are ties between the most negative and most positive values, in which case it becomes a popularity contest. If you are looking for the largest absolute value only, then you could just take absolute values first and there will be no tiebreaker needed. If you are looking for the largest positive value only (i.e. if the set is $\{1,-100\}$ you want to pick out the $1$), then you should follow Chris Culter’s answer.
What you want is called a smooth maximum function. Wikipedia gives the example of a weighted average function, where the weight of each $x_i$ is set to $e^{\alpha x_i}$. If $\alpha=0$ then we recover the unweighted average, also known as the arithmetic mean of the data. As $\alpha\to\infty$, the weighted average approaches the maximum of the data. So you can decide how large you want $\alpha$ to be, depending on how far you want to push away from the mean and towards the largest number.