# Weighted average factor change

Let's say, we have some product in an online store, which overall rating calculates by weighted average of the following sub-ratings left by customer:

Quality ✮✮✮✮☆

Price   ✮✮✮☆☆

Whatever ✮✮✮☆☆


The weight factors are: Quality - 50%, Price - 25%, Whatever - 25%

Thus, the overall rating will be: 0.8 * 0.5 + 0.6 * 0.25 + 0.6 * 0.25 = 0.7

, which is 70% of max possible rating and equals to 3.5 stars

But what if customer assessed only Quality and Price or any other combination? How to calculate weight factors correctly in such cases?

(Quality * 0.5 + Price * 0.25) / 0.75