Added unit tests for ReducedVarianceModelBuilder. Fixed bug in computation of variance