# Bayesian Voting System

**URL:** <https://forum.kirupa.com/t/bayesian-voting-system/315181>\
**Category:** programming\
**Created:** [October 19, 2010, 6:35pm UTC](https://forum.kirupa.com/t/bayesian-voting-system/315181 "2010-10-19T18:35:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![b\_rich](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@b\_rich](https://forum.kirupa.com/u/b_rich)\
**Post date:** [October 19, 2010, 6:35pm UTC](https://forum.kirupa.com/t/bayesian-voting-system/315181/1 "2010-10-19T18:35:30Z")

</div>

Hi,

I am trying to figure out the best formula to rate/order items based off user’s votes UP or DOWN. I found a nice example of the Bayesian formula here:

[http://www.thebroth.com/blog/118/bayesian-rating](http://www.thebroth.com/blog/118/bayesian-rating)

```php
$br = ( ($avg_num_votes * $avg_rating) + ($this_num_votes * $this_rating) ) / ($avg_num_votes + $this_num_votes)

```

This method takes in to account ratings and I’m just wanting to have a simple up or down vote. My question is what is the best most logical way to order a set of items based on the vote (+ or -) score from users?
