I am trying to find the strength of signal over a background using a continuous variable, whose distributions are known for the expected signal, the expected background, and the observed data, along with corresponding uncertainties. Now if I understand correctly, due to a large number of observations, the distribution needs to be split into bins and the significance is to be evaluated using a binned maximum likelihood on the histograms.
Now the binning of the histogram, of course, can be done in many ways, the two extremes being just one bin for the whole data, and every datapoint getting its own bin. Furthermore, bin widths can be made variable, or equivalently, a different function of the variable can be discretized into equal-width bins (x^5 instead of x).
Is there a way to choose the binning in a way such that the net significance of the signal across all bins is maximized?