- Ratings
- Reviews
- Competitors
- Firefox
- Node.js
Bayesian average rating: rank extensions and apps fairly
A Bayesian average rating ranks listings with few ratings fairly. The formula, how to pick the prior, real Firefox Add-ons data and a Node.js script.
- Author
- Extenify Team
- Published
- Reading time
- 13 min read

On this page
A Bayesian average rating answers a question every store makes you ask: is an extension with a perfect 5.0 from three ratings really better than one with 4.6 from two thousand? Sort by the raw average and the answer is yes, which is why "top rated" lists fill up with listings nobody has heard of. A Bayesian average fixes that by blending each listing's own ratings with a sensible starting point, so a handful of five-star reviews cannot outrank thousands of real users.
This guide explains the formula in plain terms, shows how to choose its two settings, ranks a real set of Firefox add-ons with it, takes apart the version Firefox Add-ons uses for its own "Top rated" sort, and gives you a dependency-free Node.js script. Everything here works the same for Chrome Web Store, Edge Add-ons, Google Play and App Store listings, because all of them publish an average and a rating count.
Key takeaways
- The Bayesian average rating is
(C × m + n × R) / (C + n): the listing's averageRfromnratings, blended with a prior averagemthat counts asCextra ratings.- Pick
mfrom the listings you are comparing (their pooled average) andCfrom their rating counts (the median is a good default). Use the same prior for every listing in one comparison.- In our November 16, 2026 sample of 41 rated Firefox add-ons for "tab manager", the raw average put five listings with one to four ratings at the top. The Bayesian average moved them below listings with 23 and 262 ratings.
- Firefox Add-ons sorts by its own
bayesian_average, which uses a prior pulled toward roughly 0.8 stars, so a single five-star rating shows up as about 2.3.- Use it to compare listings, not to report your own rating. Your store rating is what users see; the Bayesian score is for ranking yourself against competitors.
Why a raw average misleads
An average says nothing about how much evidence sits behind it. One happy user produces a 5.0. A thousand users, most of them happy, produce something like 4.4. Sorted by average, the first listing wins every time.
We saw exactly this on November 16, 2026, when we pulled the first 50 Firefox Add-ons search results for "tab manager" from the public AMO API. The search also returned a few neighbouring "manager" add-ons such as password and download managers, which is what a real competitor set often looks like. Forty-one results had at least one rating. Sorted by raw average, the top of the list looked like this:
| Raw rank | Raw average | Ratings |
|---|---|---|
| 1 to 5 | 5.00 | 1, 1, 1, 3 and 4 |
| 6 | 4.83 | 6 |
| 7 | 4.78 | 23 |
| 8 | 4.68 | 22 |
| 9 | 4.58 | 9,379 |
| 10 | 4.50 | 262 |
Five of the six "best" listings had six ratings or fewer. Meanwhile, a tab manager with 262 ratings averaging 4.50 sat in tenth place. If you were deciding which competitor to study, or judging where your own listing stands, the raw sort would point you at the wrong ones.
The Bayesian average rating formula
The fix is to assume, before you see any ratings, that a listing is about as good as a typical listing in its group. Each real rating then pulls the score away from that assumption. With few ratings the score stays close to typical; with many ratings it converges on the listing's own average.
bayesian = (C × m + n × R) / (C + n)
R = the listing's average rating
n = the listing's number of ratings
m = the prior: a typical rating for this group of listings
C = how many ratings the prior is worth
The easiest way to read it: pretend every listing starts with C extra ratings of exactly m stars, then take the plain average. That is all the formula does.
Using the numbers from our sample, where the prior worked out to m = 4.12 and C = 16:
- 5.0 from 1 rating:
(16 × 4.12 + 1 × 5.00) / 17 = 4.17. One rating barely moves it. - 4.78 from 23 ratings:
(16 × 4.12 + 23 × 4.78) / 39 = 4.51. Enough evidence to rise well above typical. - 4.58 from 9,379 ratings:
(16 × 4.12 + 9,379 × 4.58) / 9,395 = 4.58. The prior disappears into the data.
This is the same idea Evan Miller describes in Ranking Items With Star Ratings, where he notes that "an item with a single perfect rating probably should not sit atop a list of top-rated items." His article goes further and ranks by a lower bound of the Bayesian estimate, which also accounts for how spread out the ratings are. For store listings, where you usually only have an average and a count, the simple form above is the practical choice.
How to choose m and C
The two settings decide everything, so choose them on purpose and write them down.
The prior m: what is typical here
m should describe the group you are comparing, not the whole store. A good rating for a VPN extension is not the same as a good rating for a new tab page. Two common choices:
- Pooled mean: the average of every individual rating in the group, computed as
sum(R × n) / sum(n). Large listings dominate it. In our sample it was 4.12. - Mean of means: the plain average of the listings' averages. Small listings count as much as large ones, so a group full of tiny listings with extreme ratings can drag it around.
The pooled mean is the safer default for competitor comparisons, because it reflects what users of this kind of product actually rate.
The weight C: how much evidence is enough
C is the number of ratings at which a listing's own average and the prior get equal weight. A listing with C ratings lands exactly halfway between its average and m.
- Median rating count of the group is a good starting point. In our sample it was 16, so a listing needs about 16 ratings before its own average outweighs the prior.
- A fixed threshold works when you compare across groups over time. If you decide "we trust an average after 25 ratings", use
C = 25everywhere. - Too small (1 or 2) and the raw-average problem comes back. Too large (thousands) and every listing collapses toward
m, which hides real differences between mid-sized listings.
Keep the prior stable
Recompute m and C occasionally, for example once a month, not every day. If the prior moves daily, a listing's score changes even when none of its own ratings did, and that makes a trend chart useless. Store the prior next to each score so you can explain any jump later.
A real ranking: Firefox tab managers
Here is the same sample of 41 rated listings from November 16, 2026, ranked by the Bayesian average with m = 4.12 and C = 16:
| Bayesian rank | Bayesian score | Raw average | Ratings | Raw rank |
|---|---|---|---|---|
| 1 | 4.58 | 4.58 | 9,379 | 9 |
| 2 | 4.51 | 4.78 | 23 | 7 |
| 3 | 4.48 | 4.50 | 262 | 10 |
| 4 | 4.45 | 4.68 | 22 | 8 |
| 5 | 4.35 | 4.36 | 398 | 11 |
| 7 | 4.31 | 4.83 | 6 | 6 |
| 8 | 4.30 | 5.00 | 4 | 1 to 5 |
| 13 to 15 | 4.17 | 5.00 | 1 | 1 to 5 |
The order now matches intuition. Listings with a strong average and real volume lead. Listings with a perfect score from one rating sit in the middle, which is exactly where the evidence puts them: they might be excellent, but nobody can tell yet.
Notice what happens at the bottom too. A listing with a single one-star rating scored 3.94, close to typical, not last. That is the correct reading of one angry review, but if you are hunting for risky competitors you may prefer a lower bound such as Evan Miller's approach, which treats thin evidence as a reason for caution rather than a reason to assume average.
How Firefox Add-ons calculates its Bayesian average
The AMO API returns two numbers for every add-on: ratings.average and ratings.bayesian_average. Mozilla's add-ons API documentation says the Bayesian one "is used when sorting add-ons by rating", so it decides the order of AMO's rating sort.
The calculation lives in the open-source addons-server code. It is the formula above, with the prior taken from every valid add-on on the site: m is the average of all add-ons' average ratings and C is the average number of ratings per add-on. Add-ons with no ratings are stored with an average of 0, and most add-ons have very few ratings, so both numbers end up small.
We fitted the formula to the 41 listings in our sample. The values that reproduce AMO's numbers are roughly m = 0.80 stars and C = 1.75 ratings, and the fitted formula matched every listing within about 0.02 stars. In practice:
| Ratings | Raw average | AMO Bayesian average |
|---|---|---|
| 1 | 5.00 | 2.34 |
| 3 | 5.00 | 3.47 |
| 6 | 4.83 | 3.93 |
| 23 | 4.78 | 4.50 |
| 262 | 4.50 | 4.48 |
So AMO's rating sort treats a new add-on with one five-star review as a 2.3. That is a deliberate choice: it keeps new add-ons out of the top of the rating sort until they earn a few reviews. It also means the AMO sort is not a fair way to compare a young add-on with an established one. If you track Firefox listings, keep the raw average and the count, and apply your own prior. Our guide to Firefox add-on stats lists the other fields the same endpoint returns.
A Node.js script to rank any set of listings
This script ranks Firefox add-ons for a search term with Node.js 18 or later and no dependencies. Swap the fetch for your own data source to rank Chrome, Edge, Google Play or App Store listings: all it needs is a name, an average and a count per listing.
// rank.mjs: rank Firefox add-ons by a Bayesian average rating.
// Usage: node rank.mjs "tab manager" (Node.js 18+, no dependencies)
const query = process.argv[2] ?? 'tab manager';
const url = new URL('https://addons.mozilla.org/api/v5/addons/search/');
url.search = new URLSearchParams({
q: query, type: 'extension', app: 'firefox', page_size: '50', lang: 'en-US',
}).toString();
const res = await fetch(url);
if (!res.ok) throw new Error(`AMO search failed: ${res.status}`);
const { results } = await res.json();
const listings = results
.filter((a) => a.ratings.count > 0)
.map((a) => ({
name: typeof a.name === 'string' ? a.name : a.name?.['en-US'] ?? a.slug,
average: a.ratings.average,
count: a.ratings.count,
amoBayesian: a.ratings.bayesian_average,
}));
// The prior: m is the pooled mean of every rating in the set,
// C is the median rating count, so a typical listing gets 50% weight.
const totalRatings = listings.reduce((sum, l) => sum + l.count, 0);
const m = listings.reduce((sum, l) => sum + l.average * l.count, 0) / totalRatings;
const counts = listings.map((l) => l.count).sort((a, b) => a - b);
const C = counts[Math.floor(counts.length / 2)];
const bayesian = (l) => (C * m + l.count * l.average) / (C + l.count);
const ranked = listings
.map((l) => ({ ...l, score: bayesian(l) }))
.sort((a, b) => b.score - a.score);
console.log(`prior: m = ${m.toFixed(2)} stars, C = ${C} ratings, ${listings.length} rated listings`);
for (const [i, l] of ranked.entries()) {
console.log(
`${String(i + 1).padStart(2)}. ${l.score.toFixed(2)} ` +
`(raw ${l.average.toFixed(2)} from ${l.count}, AMO ${l.amoBayesian.toFixed(2)}) ${l.name}`,
);
}
We ran it on November 16, 2026. The first lines of output were:
prior: m = 4.12 stars, C = 16 ratings, 41 rated listings
1. 4.58 (raw 4.58 from 9379, AMO 4.58) Bitwarden Password Manager
2. 4.51 (raw 4.78 from 23, AMO 4.50) SleepyTabs - Tab Suspender & Manager
3. 4.48 (raw 4.50 from 262, AMO 4.48) Tab Manager Plus for Firefox
Your numbers will differ as ratings come in. Search results change too, so for a competitor comparison, fix the list of listings you care about instead of re-running a search each time.
Using the Bayesian average for store and competitor tracking
The formula is store-agnostic, but each store hands you slightly different inputs.
- Chrome Web Store shows the average to one decimal and rounds larger rating counts, such as "43.2K ratings". Rounding does not matter much: at those volumes the prior has almost no effect. Since August 2026, Google has also said the extension rating "will focus on more recent reviews" (Chrome Web Store update), so the displayed average already leans toward recent sentiment. We covered what that change means in Chrome Web Store changes in 2026.
- Google Play shows a rating that is weighted toward recent ratings and can differ by country and device, as explained in our guide to the Google Play rating calculation. Compare listings from the same country.
- App Store ratings are per country, and the rating count is the number to keep next to the average. The iTunes Search API returns both for any app.
- Edge Add-ons and Firefox Add-ons publish the average and count for every listing. Use the raw average from AMO, not its
bayesian_average, if you want to apply your own prior.
A few rules keep the comparison honest:
- Compare like with like. Build the prior from one category or one competitor set, on one store.
- Rank, do not report. Your listing's public rating is what users see and what support should talk about. The Bayesian score is an internal tool for questions such as "which competitor is actually best rated?"
- Watch the count as closely as the score. A Bayesian score that rises because ratings are piling in is good news; one that rises because an old listing lost ratings is not. Our guide to reading review and rating trends covers how to read the count, the distribution and the review stream together.
- Keep history. A single ranking is a snapshot. The useful signal is how the order changes after your release, or after a competitor's.
The data side of this is where Extenify helps. It records the rating and rating count of your Chrome, Edge and Firefox extensions and your Google Play and App Store apps every day, along with any competitor listing you paste in, so you have the inputs for a fair ranking over time. It also sends a daily alert to email, Slack, Telegram, Discord or Microsoft Teams when a rating drops or a new low review arrives. The pricing page lists the plans; every plan starts with a 7-day free trial and no card. If you are building a full competitor review, our app competitor analysis guide shows where a fair rating comparison fits.
Frequently asked questions
What is a Bayesian average rating?
It is an average that starts from an assumed typical rating and moves toward a listing's own average as ratings accumulate. Listings with few ratings stay close to typical, listings with many ratings keep their own average, so the two can be ranked on one scale.
How do you calculate a Bayesian average?
Multiply the prior rating m by its weight C, add the listing's average times its number of ratings, and divide by C plus the number of ratings: (C × m + n × R) / (C + n). With m = 4.12 and C = 16, a listing with 4.78 from 23 ratings scores 4.51.
What value of C should I use?
Start with the median rating count of the listings you compare. It means a listing needs about as many ratings as a typical competitor before its own average outweighs the prior. If you track scores over months, fix C at a round number instead, so it does not drift.
Is a Bayesian average the same as a weighted average?
It is a kind of weighted average: the listing's average and the prior are weighted by n and C. What makes it "Bayesian" is the prior, the assumption you start from before seeing any ratings.
Does the Chrome Web Store use a Bayesian average?
Google has not documented one. What it has said is that the extension rating focuses on more recent reviews. Firefox Add-ons is the one store that publishes a Bayesian average, and it uses it for sorting by rating, not for the rating shown on the listing.
Summary
A Bayesian average rating lets you rank listings with very different amounts of evidence on one scale. Pick a prior from the group you are comparing, usually the pooled average rating and the median rating count, keep it stable, and apply it to the raw average and count from each store. On real Firefox data, it moved one-review "perfect" listings out of the top spots and put established, well-rated listings first. Treat it as a comparison tool, keep the history, and read it next to the rating count.
Image credits
- Cover photo: Three rusty antique scale weights on marble before a cornfield by appealdahal on the WordPress Photo Directory, CC0.


