additive smoothing for theta_hat and pi_hat to solve numerical issue