Median voter rule (source code)

= Median voter rule
{title2=$f(p_1,\ldots,p_n)=\operatorname{median}(p_1,\ldots,p_n)$}

On a fixed common axis, select the median of reported peaks. For odd $n$ this is the unique <Condorcet winner>. For even $n$, a fixed lower-median or upper-median convention selects a <weak Condorcet winner>. Holding other peaks fixed, the attainable outcomes form an interval between two order statistics. Truthful reporting obtains the true peak if it is inside that interval, or its nearest interval endpoint otherwise, so no allowed report improves the outcome under <single-peaked preferences>.