generalized sequential probability ratio test