How to find an average for set of scores and a weight

80 Views Asked by At

I have a set of reviews for a product, such that each review has a score [1 - 10] and a year of review submittion. I need to find the average of scores for this product.

The challenging part that I need to give a weight for the reviews' scores depending on their year of submission, such that the newest the highest impact on the final product's score.

When the review is older than 5 years its weight value defaults to 0.5 Otherwise it equals: 1 - (current_year - year_of_review) * 0.1

What is the formula that I can use to find the final product score ?

I found something called "Weighted Mean", is that relevant ?

1

There are 1 best solutions below

3
On BEST ANSWER

Your formula for the weight is as good as any.

So if you have $n$ reviews with scores $s_j$ and weights $w_j$, then the weighted review score is

$$S = \frac{\sum_{j=1}^n w_j s_j}{\sum_{j=1}^n w_j}$$