I dont think this method is the rigth place to set the config. This is just calculating the sample size. Should move this outside or in a different utility method.