Artificial intelligent assistant

Find formula for the most distant value from a mean I have a set of values and i need to find the most distant value from the mean of those values: Let's say the values are those: [3,2,5,4,1] Mean = 3 The most distant value would be 5 but how can i express this in a formula?

If the values are denoted $v_i$ and the mean $\overline v$,

$$v_{\text{argmax}_i|v_i-\overline v|}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 51c62dbc0829a7ff3c4f182084ddd4f8