Fix helper class used in StdDev test, tighten error margins and add tests.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>