title: PHP/MySQL - algorithm for "Top Rated"
body: <p>So I just built a star-rating system and and trying to come up with an algorithm to list the "Top Rated" items. For simplicity, here are the columns:</p>
  
  <pre><code>item_name
  average_rating (a decimal from 1 to 5)
  num_votes
  </code></pre>
  
  <p>I'm trying to determine the "sweet spot" between number of votes and rating. For example...</p>
  
  <ul>
  <li>An item rated (4.6 / 20 votes) should be higher on the list than an item that's (5.0 / 2 votes)</li>
  <li>An item rated (2.5 / 100 votes) should be below an item that's (4.5 / 2 votes)</li>
  </ul>
  
  <p>So in other words, <strong>num_votes</strong> plays a factor in what's "Top".</p>
  
  <p>Anyone know of an algorithm that is pretty good at determining this "sweet spot"?</p>
  
  <p>Thanks in advance.</p>