The cost-minimizing decision threshold
A monitoring system reads a value . Under background (), with prior probability . Under an anomaly (), with prior probability . A false alarm (declaring an anomaly when there is none) costs unit; a missed anomaly costs units. You will declare "anomaly" whenever .
Find the cutoff that minimizes the expected cost.