title: Evaluating a score that indicates a state of a group of elements based on the counts of specific properties of the elements
body: <p>I have a program that handles several lists of elements (always with length > 4) that can have either an "up" or a "down" property each. </p>
  
  <p>To put it into code:</p>
  
  <pre><code> mylist = [element1, element2, element3]
  </code></pre>
  
  <p>and each element has "up" or down" element (a simplification of the actual problem):</p>
  
  <pre><code>element1 = ["up", "down", "up", "up"]
  element2 = ["down", "down","down", "down", "up"]
  element3 = ["up", "up", "down", "down", "up", "up", "up"]
  </code></pre>
  
  <p>What I'm trying to find if there's an algorithm or some method to infer a score that may be indicative of  "direction" for the list itself by using the counts of "up" and "down" elements. The existing code (which I didn't write) used a simple comparison of those two counts:</p>
  
  <pre><code> if count_up &gt; count_down
       return "up"
   else if count_down &gt; count_up
       return "down"
  </code></pre>
  
  <p>Of course this is prone to size effects pretty badly (some lists can be of almost 100 elements, others of just 5) and also fails when both counts are equal. I'd prefer a numerical score. I looked at the Wilson score (the one used by Reddit) but it considers (as far as I can tell) success/failure, while the two states I mentioned can't be defined like that. </p>
  
  <p>Is there any existing statistic that I can use for this?</p>