A set based probabilistic approach to threshold design for optimal fault detection