Announcement The Coop Page / Article Rating & Review Project!

:woot I understand this clearly!!! :yesss:
Go Bayesian Average!

To explain to those who want a simple English explanation:
A traditional average is done by taking all sets of data (in this case stars) divided by the total number of sets of data (in this case reviews)
In a traditional average an example would go like this:
You have two articles. Article 1 and Article 2.
Article 1 has 1 rating of 5 stars with an average rating of 5
Article 2 has 50 ratings with an average rating of 4.5
Article 1 would appear above Article 2 based on average rating. But would you rather have Article 2 above Article 1?
If yes, that is where the Bayesian average comes into play.

The Bayesian average computes the average (for this case average rating) using two extra variable, m and C.
For our purposes, our parent equation would look like this:
Rating of article = C x m + total number of stars/ C + number of reviews

m represents the predicted average rating of stars. So for us, we have a maximum of 5 stars. The average rating of 5 stars is 3.
So, m=3

C represents the value that is proportional to the typical data set. The typical data set is 5 stars.
So, C=5

Back to our articles.
Rating of Article 1= 5 x 3 + 5 x 1/ 5 + 1
Article 1 has an average rating of 3.3
Note: (5 x 1) comes from there being an average rating of 5 stars from 1 review. Therefore, the total number of stars is 5; 5 x 1
(5+1) comes from there being a C=5 plus the total number of reviews; 1

Rating of Article 2= 5 x 3 + 4.5 x 50/ 5 + 50
Article 2 has an average rating of 4.36

Using the Bayesian average, Article 2 now has a higher rating than Article 1
 
:woot I understand this clearly!!! :yesss:
Go Bayesian Average!

To explain to those who want a simple English explanation:
A traditional average is done by taking all sets of data (in this case stars) divided by the total number of sets of data (in this case reviews)
In a traditional average an example would go like this:
You have two articles. Article 1 and Article 2.
Article 1 has 1 rating of 5 stars with an average rating of 5
Article 2 has 50 ratings with an average rating of 4.5
Article 1 would appear above Article 2 based on average rating. But would you rather have Article 2 above Article 1?
If yes, that is where the Bayesian average comes into play.

The Bayesian average computes the average (for this case average rating) using two extra variable, m and C.
For our purposes, our parent equation would look like this:
Rating of article = C x m + total number of stars/ C + number of reviews

m represents the predicted average rating of stars. So for us, we have a maximum of 5 stars. The average rating of 5 stars is 3.
So, m=3

C represents the value that is proportional to the typical data set. The typical data set is 5 stars.
So, C=5

Back to our articles.
Rating of Article 1= 5 x 3 + 5 x 1/ 5 + 1
Article 1 has an average rating of 3.3
Note: (5 x 1) comes from there being an average rating of 5 stars from 1 review. Therefore, the total number of stars is 5; 5 x 1
(5+1) comes from there being a C=5 plus the total number of reviews; 1

Rating of Article 2= 5 x 3 + 4.5 x 50/ 5 + 50
Article 2 has an average rating of 4.36

Using the Bayesian average, Article 2 now has a higher rating than Article 1
:woot
 
:woot I understand this clearly!!! :yesss:
Go Bayesian Average!

To explain to those who want a simple English explanation:
A traditional average is done by taking all sets of data (in this case stars) divided by the total number of sets of data (in this case reviews)
In a traditional average an example would go like this:
You have two articles. Article 1 and Article 2.
Article 1 has 1 rating of 5 stars with an average rating of 5
Article 2 has 50 ratings with an average rating of 4.5
Article 1 would appear above Article 2 based on average rating. But would you rather have Article 2 above Article 1?
If yes, that is where the Bayesian average comes into play.

The Bayesian average computes the average (for this case average rating) using two extra variable, m and C.
For our purposes, our parent equation would look like this:
Rating of article = C x m + total number of stars/ C + number of reviews

m represents the predicted average rating of stars. So for us, we have a maximum of 5 stars. The average rating of 5 stars is 3.
So, m=3

C represents the value that is proportional to the typical data set. The typical data set is 5 stars.
So, C=5

Back to our articles.
Rating of Article 1= 5 x 3 + 5 x 1/ 5 + 1
Article 1 has an average rating of 3.3
Note: (5 x 1) comes from there being an average rating of 5 stars from 1 review. Therefore, the total number of stars is 5; 5 x 1
(5+1) comes from there being a C=5 plus the total number of reviews; 1

Rating of Article 2= 5 x 3 + 4.5 x 50/ 5 + 50
Article 2 has an average rating of 4.36

Using the Bayesian average, Article 2 now has a higher rating than Article 1
:woot I always use weighted average when rating things :p
 
Code:
   // same as the xf resource manager to maintain a standard.
    public static $voteThreshold = 10;
    public static $averageVote = 3;

    public function getWeightedRating($count, $sum)
    {
        return (self::$voteThreshold * self::$averageVote + $sum) / (self::$voteThreshold + $count);
    }
As @Nifty-Chicken kindly included, this code is what the site is using.
It is taking our vote threshold, multiplying it by the average vote and adding the sum (total number of stars). It is then dividing that number by the vote threshold + the total number of reviews.
vote threshold = 10
average vote = 3

10 x 3 + total number of stars/ 10 + number of reviews
Take an article with 5 reviews and a total number of 18 stars
10 x 3 + 18/ 10 + 5 = Rating
 

New posts New threads Active threads

Back
Top Bottom