Earlier quoted context omitted.
You may think reviews are calculated as: SELECT app, AVG(stars) AS display_stars FROM customer_reviews GROUP BY app; It’s actually an ML algorithm that optimizes for revenue.
Being condescending is not constructive. Can you substantiate your claim? I'm sure that there are many tweaks to the way apps are ranked, but I would expect that the rating itself would, indeed, mostly be a star average.
I can confirm that the displayed rating on both stores is exactly the weighted average of valid reviews and ratings posted by users. No trickery there.
The only caveat here is that both platform regularly invalidate posted reviews and ratings for various reasons (the user asked for it to be removed, apple/google has reasons to believe it was fraudulent/automated, ...). If a review/rating is removed, it won't be shown and won't be taken into account in the calculation.
So the calculation is really along the lines of :
> SELECT app, AVG(stars) AS display_stars FROM customer_reviews WHERE deleted=false GROUP BY app;