Take single element of a list, and compare to average of whole list
if you want to choose a specific element use
F[x_] := Mean@Complement[lst, {x}]
1 == F[1]
2 == F[2]
3 == F[3]
False
False
True
Note
if you want to choose the first,second,nth element use
F[x_] := Mean@Complement[lst, {lst[[x]]}]
1 == F[1]
2 == F[2]
3 == F[3]
False
False
True
ClearAll[subMeans]
subMeans = (Total[#] - #)/(Length[#] - 1) &;
Examples:
lst = {a, b, c, d};
subMeans[lst]
{1/3 (b + c + d), 1/3 (a + c + d), 1/3 (a + b + d), 1/3 (a + b + c)}
subMeans[{a, b, b, b}]
{b, 1/3 (a + 2 b), 1/3 (a + 2 b), 1/3 (a + 2 b)}
MapThread[Equal, {#, subMeans @ #}]& @ lst
{a == 1/3 (b + c + d), b == 1/3 (a + c + d), c == 1/3 (a + b + d), d == 1/3 (a + b + c)}
MapThread[Equal, {#, subMeans @ #}]& @ Range[5]
{False, False, True, False, False}
Update: For checking equality, there is a simpler way (because $x_i = \frac{\sum_{j \neq i}^{n} x_j}{n-1}$ iff $x_i =\frac{\sum_{j = 1 }^{n} x_j}{n}$):
Thread[# == Mean[#]] &@Range[5]
{False, False, True, False, False}
lst = {1, 2, 3, 4, 5};
(Last@# == Mean@Most@# &) /@ (RotateLeft[lst, #] & /@ Range@Length@lst)
{False, False, True, False, False}
Ugly version.
(First@# - Mean@Last@# == {0} &) /@ (TakeDrop[lst, {#}] & /@ Range@Length@lst)