Simple example of the formula (in JS)
// Bayesian rating formula:
// score = (C*m + R*v) / (m + v)
function bayesianScore(R, v, C, m) {
// R = item's average rating (e.g., 4.6 out of 5)
// v = number of votes/ratings the item has
// C = global average rating across *all* items (e.g., 3.7)
// m = minimum votes threshold before trusting the item's own average
if (v <= 0) return C; // no votes → return global mean
return (C * m + R * v) / (m + v);
}