# Combining TEfficiency's with weights

Hi all,

I would like to combine efficiencies (using TEfficiency::Combine) from different channels, with an external weight for each. I provide an example of the observed behaviour in the little program attached (tefficiency.cc). In this file, a desired weight of 1 for each channel is taken.

I compute efficiencies from MC and apply a weight from data for each of the channels. I then would like to compute the combined efficiency on the merged channels to apply it on data, with a correct estimate of the error on it.

From the ROOT code (see root.cern.ch/root/html534/src/TE … .html#1727), it seems that the combination takes the total numbers of events for each channel as implicit weights between the different channels.
To correct for this effect for my use case, I set the weights with a reweighting for the number of total events of each channel. If I don’t do it, the result is not the expected one (the electron example of the documentation can here be misleading).
Is this reweighting the correct way to proceed in my case ?

Moreover, the central value of the combined efficiency, even with reweighting by the number of entries, is slightly different from the central value with the same equivalent case. Is it expected ?

What is the correct way to estimate the error on the combined efficiency ?

Thank in advance for any help !

Thierry
tefficiency.cc (1.7 KB)

Hi,

When combining different TEfficiency, you need to rescale the channels in order that the total number of events
are compatible. TEfficiency applies to binomial quantities which are conditioned on the total number of events.
In TEfficiency::Combine what is one is, given a Binomial(k1|n1,eps) and Binomial(k2 | n2, eps) we assume the combined distribution is Binomial(k1+k2 | n1+n2, eps). In case of weights we rescale the components according to their weights.

In your example, after reweighting by the number of entries, you get a slightly different result because by default the mean of the combined posterior distribution is used. If you use the mode (option “mode” in Combine) you will get exactly the same result

Best Regards

Lorenzo