Deciding on the Number of Trials to Perform