Calculate the weighted average of a set of values with corresponding weights. This is useful for calculating grades, portfolio returns, or any scenario where some data points contribute more to the final average than others.