Minimizing the cost of environmental management decisions by optimizing statistical thresholds