Amazon calculates a product's star ratings based on a machine learned model instead of a raw data average. The model takes into account factors including the age of a rating, whether the ratings are from verified purchasers and factors that establish reviewer trustworthiness.
I gave 5 stars to this book because this book deserved it. It was actually a very interesting book. My disliking in the book was that the author did not give any twist at the ending of the story. But still the book was a very good one.