added tests for mean and variance