  Calculating the expected number of misclassified outcomes is a standard
problem of particular interest for rare-event searches. The Clopper-Pearson
method allows calculation of classical confidence intervals on the amount of
misclassification if data are all drawn from the same binomial probability
distribution. However, data is often better described by breaking it up into
several bins, each represented by a different binomial distribution. We
describe and provide an algorithm for calculating a classical confidence
interval on the expected total number of misclassified events from several
bins, based on calibration data with the same probability of misclassification
on a bin-by-bin basis. Our method avoids a computationally intensive
multidimensional search by introducing a Lagrange multiplier and performing
standard root finding. This method has only quadratic time complexity as the
number of bins, and produces confidence intervals that are only slightly
conservative.
