How To Compute General Weighted Average