Good formula for turning star reviews into upvotes I want to turn reviews of up to 5 stars and the number of reviews into upvotes. What's a good algorithm for doing this?

A venue with 10 reviews total with a 5-star average rating should obviously get more upvotes than a venue with 10 reviews total with a 3-star average rating. Also, a venue with 60 ratings and a 4-star rating should probably get more upvotes than the one with 10 reviews and a 5-star rating.

I need this rating to be based off of the total number of reviews and the average star rating, but I would also like the number to stay below a variable number (for example, say upvotes stay below 100, but I can also plug in 200 and it would stay below 200).
My recommendation would be to explore some statistical approach to represent the reviews/rating pair as significance. For example, to translate the [# reviews, rating] into some test statistic type model, such as Student's t for starters. 

Considering your example numbers, some approaches can be:

1) 

&gt;&gt;&gt; 5/(1/sqrt(10))
15.811388300841896
&gt;&gt;&gt; 3/(1/sqrt(10))
9.4868329805051381
&gt;&gt;&gt; 
&gt;&gt;&gt; 
&gt;&gt;&gt; 4/(1/sqrt(60))
30.98386676965934
&gt;&gt;&gt; 5/(1/sqrt(10))
15.811388300841896


2) Or, diving deeper into stats,:

&gt;&gt;&gt; (5-3)/(sqrt(1/10+1/10))
4.4721359549995796
&gt;&gt;&gt; (4-5)/(sqrt(1/60+1/10))
-2.9277002188455996

(you will need to do some work on the alpha level to get at the significance in ex 2 above)


You can see how these work out for you; if too basic/too many inaccurate assumptions/some other filtering that you need more resolution in your model/etc., you can explore ways to better represent:


the sample standard deviation (assumed to be 1 in my examples above), or
the distribution (assumed Gaussian in examples above), or 
the appropriate statistical test (plow through Wikipedia), or 
etc


Point is you can continuously refine your model, depending how much resolution you need. Only you can make that call. Hope this helps!