TITLE: Prove:$|x-1|+|x-2|+|x-3|+\cdots+|x-n|\geq n-1$
QUESTION [6 upvotes]: Prove:$|x-1|+|x-2|+|x-3|+\cdots+|x-n|\geq n-1$

example1: $|x-1|+|x-2|\geq 1$
my solution：(substitution)
$x-1=t,x-2=t-1,|t|+|t-1|\geq 1,|t-1|\geq 1-|t|,$
square,
$t^2-2t+1\geq 1-2|t|+t^2,\text{Since} -t\leq -|t|,$
so proved.
question1 : Is my proof right? Alternatives?
one reference answer: 
$1-|x-1|\leq |1-(x-1)|=|1-x+1|=|x-2|$
question2 : prove:
$|x-1|+|x-2|+|x-3|\geq 2$
So I guess:( I think there is a name about this, what's that? wiki item?)
$|x-1|+|x-2|+|x-3|+\cdots+|x-n|\geq n-1$
How to prove this? This is  question3. I doubt whether the two methods I used above may suit for this general case.
Of course, welcome any interesting answers and good comments.

REPLY [3 votes]: (Edited)
Given a real-valued data set ${\bf y}=(y_k)_{1\leq k\leq n}$ the function
$$f(x):=\sum_{k=1}^n |x-y_k|$$
assumes its minimum at the median $\mu$ of ${\bf y}$. When $y_1\leq y_2\leq \ldots\leq y_n$ and $n=2m+1$ then $\mu=y_{m+1}$ (the "middle value"), and if $n=2m$ then $f$ is actually constant on the interval $[y_m,y_{m+1}]$, and one defines $\mu:=(y_m+y_{m+1})/2$.
Proof. When there are $r$ more $y_k$ to the right of $x$ than to the left of $x$ then increasing $x$ by $\Delta x$ will decrease $f$ by $r\cdot\Delta x$, and similarly, when there are $r$  more $y_k$ to the left of $x$ than to the right of $x$ then increasing $x$ by $\Delta x$ will increase $f$ by $r\cdot \Delta x$.$\qquad\square$
It follows that your sum $s(x)$ is minimal at $x={n+1\over2}$. It is then easily computed to $s_{\min}=n^2/4$ when $n$ is even and $s_{\min}=(n^2-1)/4$ when $n$ is odd.
When $n=1$ we have $s_{\min}=0=n-1$, and in the case $n=2$ we have $s_{\min}=1=n-1$. For $n\geq3$ we can argue as follows:
$$s_{\min}\geq{n^2-1\over 4}={(n-2)^2-1\over4}+n-1\geq n-1\ .$$