[tor-bugs] #6232 [Analysis]: Make entropy-over-time graph

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Jul 5 10:54:05 UTC 2012


#6232: Make entropy-over-time graph
-------------------------+--------------------------------------------------
 Reporter:  arma         |          Owner:              
     Type:  enhancement  |         Status:  needs_review
 Priority:  normal       |      Milestone:              
Component:  Analysis     |        Version:              
 Keywords:               |         Parent:              
   Points:               |   Actualpoints:              
-------------------------+--------------------------------------------------

Comment(by phw):

 Replying to [comment:9 phw]:

 > A clarification for the math which changed between the initial code and
 my update:
 >
 > Assume the early days of Tor, where we have only a few relays in the
 consensus. In fact, it's 7 relays with the following bandwidth:
 > `[1, 1, 2, 2, 2, 3, 4]`
 >
 > The old code determined the total bandwidth (15, the sum of all
 bandwidths in the list) and calculated:
 > `1/15 * log2(1/15) + 1/15 * log2(1/15) + 2/15 * log2(2/15) + 2/15 *
 log2(2/15) + 2/15 * log2(2/15) + 3/15 * log2(3/15) + 4/15 * log2(4/15)`
 >
 > The problem is the probabilities. E.g., for the value '1', we expect a
 probability of 2/7 (There are two instances of '1' in all 7 values) and
 not 1/15.
 >
 > The uploaded version fixes that. It builds a hash table of the form: `{
 bandwidth_value => observed occurrences }`. Then, it iterates over the
 hash table, adds up the result and we have the entropy.

 Note that the above is probably '''not''' what we want. It calculates the
 entropy based on the probability of a '''bandwidth''' instead of a
 '''relay''' being selected. So gsathya was right all along.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6232#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list