Can someone help me understand Bayesian averages?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,660
Office Version
  1. 365
Platform
  1. Windows
I have been looking into ways to "adjust" ratings like the 5-star ratings on Amazon and elsewhere based on the number of reviews. I think anyone would put more confidence in a product with a 4.9 rating based on 10,000 ratings than one with a 5.0 rating based on just 1 rating. But what about one with a 4.8 rating based on 100 ratings vs one with a 4.7 rating based on 300 ratings?

I initially thought about using confidence intervals, but then I found several websites that mention Bayesian Averages. The problem is that the formulas don't seem to all agree and the derivations are beyond my math skills.

This is what I think the various parameters mean:

ProdRtgThe actual product rating.
productRatingsAvgI think this is the same as ProdRtg.
NumRtgsThe number of ratings or reviews.
productRatingsCountI think this is the same as NumRtgs.
AvgRtgThe average of the ratings of all of the products. I am not sure if this is just the products in the table or all products on sale or what.
CI think this is the same as AvgRtg.
mThis is some kind of a confidence interval. Different websites had different definitions.

This equation seemed to agree with several websites.

1728334976202.png

This equation was here Using the Bayesian average in custom ranking | Algolia. But it doesn't seem to even work with their own data.
1728333679553.png


Anyway, I will include two minisheets. This first one has some sample product ratings. The Average1 column uses the first equation above. The Average2 column uses the second equation above, which gets crazy results.

BayesRtg.xlsx
CDEFGHIJ
2278 m
3
4ProductRankRating# RatingsBayesian Average1Rank 1Bayesian Average2Rank 2
5A15.01,0004.96716.31813
6B25.01004.890217.6289
7C35.0104.855594.1625
8D45.014.8517231.3331
9E54.91,0004.88936.21814
10F64.91004.863417.53310
11G74.9104.852694.0946
12H84.914.8508231.3162
13I94.81,0004.811146.11915
14J104.81004.8371317.43711
15K114.8104.8481194.0277
16L124.814.8509231.2993
17M134.71,0004.733166.01916
18N144.71004.8101517.34212
19O154.7104.8451293.9608
20P164.714.84910231.2824
21Averages4.85278
Simple
Cell Formulas
RangeFormula
G5:G20G5= (([@Rating] * [@['# Ratings]]) + (Table16[[#Totals],[Rating]] * m)) / ([@['# Ratings]] + m)
H5:H20H5=RANK.EQ([@[Bayesian Average1]],[Bayesian Average1])
I5:I20I5= ([@Rating]*[@['# Ratings]] + Table16[[#Totals],[Rating]]*m) / ([@['# Ratings]]+Table16[[#Totals],[Rating]])
J5:J20J5=RANK.EQ([@[Bayesian Average2]],[Bayesian Average2])
D5:D20D5=MATCH([@Product],SORT([Product],1,1),0)
E21E21=SUBTOTAL(101,[Rating])
F21F21=SUBTOTAL(101,['# Ratings])
Named Ranges
NameRefers ToCells
m=Simple!$E$2G5:G20, I5:I20


This minisheet has a table I created using data from the Algolia website. The Claimed column is the adjusted ratings it says it will get. The Average1 column is the ratings using their equation. They do not match. Tne Average2 is the results using the first equation above. I think I must have done something wrong, because those results are crazy. But I cannot find the error.

BayesRtg.xlsx
BCDEFG
2m3.5
3c100
4ItemRating# RatingsClaimed Bayesian AverageBayesian Average1Bayesian Average2
5A5.0104.33.63611.429
6B4.81004.84.1502.371
7C4.61,0004.64.5001.414
8Average4.8
Algolia
Cell Formulas
RangeFormula
F5:F7F5= ([@Rating]*[@['# Ratings]] + c_num*m) / ([@['# Ratings]]+c_num)
G5:G7G5=(([@Rating]*[@['# Ratings]]) + (c_num*m)) / ([@['# Ratings]]*m)
C8C8=SUBTOTAL(101,[Rating])
Named Ranges
NameRefers ToCells
c_num=Algolia!$D$3F5:G7
m=Algolia!$D$2F5:G7


I would love it if someone can put me out of my misery. Any statisticians out there?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Don't you think you also need to know how old the scores and how reliable the voters are?
I would care most about recent scores from reliable voters. And without that info I would not trust any data too much.
 
Upvote 0

Forum statistics

Threads
1,222,630
Messages
6,167,191
Members
452,104
Latest member
jadethejade

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top