# Equation for Ranking Top Posts

I am trying to write an equation to solve my problem of figuring out which post is most popular. While one would think the one with the highest stars would be, if the stars are equal then the one with 61 votes should rise higher than the one with 5 for example (since more people are downloading that)

Star system is 1-5

I thought of something like numberofvotes*star

Would that work?

The issue comes in that something with less stars should never rank higher, so the number of stars is always the first determining factor.

-
This isn't a question about algebra, so I've retagged it. It's really a statistical question: given users' votes, how can we estimate the "true" popularity of a post? It's somewhat analogous to estimating the "true" strength of a chess player, for example. It's probably a much deeper question than you think! (For instance, there's a website which ranks shows using Bayesian techniques...) – Zhen Lin Feb 24 '11 at 19:41

An alternative might be something like $\frac{20 + \textrm{total number of stars}}{10 + \textrm{number of voters}}$ which might say that an unvoted post is assumed to be equivalent in quality to one with lots of two-star votes. If it then gets lots of five-star votes it will increase, and with lots of one-star votes will decrease. Going back to your example, 5 five-star votes would be roughly the same as a very large number of three-star votes.