Removing code duplication when calculating the bias threshold.