<div dir="ltr"><div><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">I mean the median.</span><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"><br></span></div><div><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"><br></span></div><div><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">From Wikipedia...</span></div><div><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"><br></span></div><div><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">For example, if </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">a</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> < </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> < </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">c</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, then the median of the list {</span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">a</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">c</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">} is </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, and, if </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">a</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> < </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> < </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">c</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> < </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">d</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, then the median of the list {</span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">a</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">c</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">, </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">d</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">} is the mean of </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> and </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">c</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">; i.e., it is (</span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">b</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"> + </span><i style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">c</i><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px">) / 2.</span></div><div><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;line-height:20.3636px"><br></span></div><div>-V</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 11, 2015 at 9:29 PM John <<a href="mailto:oneofthem@riseup.net">oneofthem@riseup.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think you are confusing the median with the mean:<br>
<br>
<a href="https://en.wikipedia.org/wiki/Median" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Median</a><br>
<a href="https://en.wikipedia.org/wiki/Mean" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Mean</a><br>
<br>
Taking the median instead of the mean can be beneficial in situations<br>
where you have larger outliers in your data, which typically affect the<br>
mean very much.<br>
<br>
-j<br>
<br>
Virgil Griffith:<br>
> Is there some implementation-specific reason not to use the standard<br>
> mathematical definition of "median"?  If not, I propose changing the<br>
> implementation to become it.<br>
><br>
> -V<br>
><br>
> On Tue, Aug 11, 2015 at 2:44 AM Nick Mathewson <<a href="mailto:nickm@alum.mit.edu" target="_blank">nickm@alum.mit.edu</a>> wrote:<br>
><br>
>> On Mon, Aug 10, 2015 at 1:11 PM, nusenu <<a href="mailto:nusenu@openmailbox.org" target="_blank">nusenu@openmailbox.org</a>> wrote:<br>
>>> -----BEGIN PGP SIGNED MESSAGE-----<br>
>>> Hash: SHA512<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> <a href="https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n2028" rel="noreferrer" target="_blank">https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n2028</a><br>
>>><br>
>>>> If 3 or more authorities provide a Measured= keyword for a router,<br>
>>>> the authorities produce a consensus containing a "w" Bandwidth=<br>
>>>> keyword equal to the median of the Measured= votes.<br>
>>><br>
>>> a random sample from recent votes:<br>
>>><br>
>>> grep 37.59.38.117 -A 3 *|grep Measured<br>
>>> w Bandwidth=6869 Measured=7570<br>
>>> w Bandwidth=6869 Measured=15500<br>
>>> w Bandwidth=6869 Measured=18100<br>
>>> w Bandwidth=6869 Measured=30500<br>
>>><br>
>>> Tor says the median value is<br>
>>> 15500<br>
>>><br>
>>> 2015-08-10-16-00-00-consensus:<br>
>>> w Bandwidth=15500<br>
>>><br>
>>> but the median of these 4 values is actually:<br>
>>> (18100+15500)/2 = 16800<br>
>>> no?<br>
>>><br>
>>> Has tor a different definition of 'median' and simply takes always the<br>
>>> second ordered measurement vote out of 4 votes or is there a bug in<br>
>>> the spec or implementation?<br>
>><br>
>> There's one misplaced throwaway sentence in dir-spec.txt:<br>
>><br>
>> "  All ties in computing medians are broken in favor of the smaller or<br>
>>    earlier item.<br>
>> "<br>
>><br>
>> We should bring this, and probably other things, into a "definitions"<br>
>> section earlier in dir-spec.txt.  Patches welcome. ;)<br>
>><br>
>> --<br>
>> Nick<br>
>> _______________________________________________<br>
>> tor-dev mailing list<br>
>> <a href="mailto:tor-dev@lists.torproject.org" target="_blank">tor-dev@lists.torproject.org</a><br>
>> <a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
>><br>
><br>
><br>
><br>
> _______________________________________________<br>
> tor-dev mailing list<br>
> <a href="mailto:tor-dev@lists.torproject.org" target="_blank">tor-dev@lists.torproject.org</a><br>
> <a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
><br>
_______________________________________________<br>
tor-dev mailing list<br>
<a href="mailto:tor-dev@lists.torproject.org" target="_blank">tor-dev@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
</blockquote></div>