Add mean detection probability function