calculate effective sample size.