weightedAvg: fix an array indexing bug with a singleton vector.
weightedAvg: fix an array indexing bug with a singleton vector.

mihaimaruseac/statistics,bos/statistics,Shimuuar/statistics,fpco/statistics,mihaimaruseac/statistics,fpco/statistics,mihaimaruseac/statistics,Shimuuar/statistics,bos/statistics