Formula behind sample size calculator