Skip to content

Instantly share code, notes, and snippets.

@tildebyte
Last active August 23, 2025 02:27
Show Gist options
  • Save tildebyte/bf194602dad0ee3a8e8880cac43fc05c to your computer and use it in GitHub Desktop.
Save tildebyte/bf194602dad0ee3a8e8880cac43fc05c to your computer and use it in GitHub Desktop.
Laplace's Rule of Succession or: How to Quickly and Easily Evaluate Star Reviews

Laplace's Rule of Succession or: How to Quickly and Easily Evaluate Star Reviews

e.g. Amazon, EBay, etc.

If you’ve observed 8 ravens and they’ve all been black, how certain should you be the next raven you see will also be black?

According to the Rule of Succession, 90%.

In general, the probability is

    k+1
p = ---
    n+2

that the next observation will be positive, given k positive observations out of n total

In plain English: Add two "imaginary" reviews: one positive and one negative. Now divide the new total number of positive reviews (k+1) by the new total number of reviews (n+2), and that's your adjusted rating.

Now, a walkthrough of the mathematical logic (not a proof, merely the logic).

We'll do a product which has 4.7 stars with 118 reviews.

  • How "positive" is 4.7 stars out of five? If you think of 5 stars out of 5 as being 100% positive, 4.7 stars is 94% positive (4.7/5 = 0.94)
  • OK, that's something to hang one's hat on; the percentage of reviews which are positive should be 94% as well (118x0.94 ~= 110)
  • Add one positive review (110+1 = 111), then up the total number of reviews by 2 (1pos and 1neg) (118+2 = 120)
  • 111/120 = 0.925 - this product has a 92.5% "satisfaction rating"

The interesting thing is how intuitively this works.

  • 4.2 stars, 17,000 reviews
  • 4.2/5 = 84% - off to a bad start :)
  • 17000*0.84 = 14280
  • 14281/17002 = 83.99%

More reviews really just reinforces the star rating.

If it still seems weird, remember the oversized impact that one F or (even worse) 0 has on a GPA...

@tildebyte
Copy link
Author

tildebyte commented Aug 22, 2025

Not 100% correct yet, needs fixing.

Should be good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment