computation of detection rate