Corrected computation of variance if numDocs == 1