Derivation of the WStat formula¶
you can write down the likelihood formula as
where μsig and μbkg are respectively the number of expected signal and background counts in the ON region, as defined in the Introduction. By taking two time the negative log likelihood and neglecting model independent and thus constant terms, we define the WStat.
In the most general case, where μsrc and μbkg are free the minimum of W is at
Profile Likelihood¶
Most of the times you probably won’t have a model in order to get μbkg. The strategy in this case is to treat μbkg as so-called nuisance parameter, i.e. a free parameter that is of no physical interest. Of course you don’t want an additional free parameter for each bin during a fit. Therefore one calculates an estimator for μbkg by analytically minimizing the likelihood function. This is called ‘profile likelihood’.
This yields a quadratic equation for μbkg
with the solution
where
Goodness of fit¶
The best-fit value of the WStat as defined now contains no information about the goodness of the fit. We consider the likelihood of the data non and noff under the expectation of non and noff,
and add twice the log likelihood
to WStat. In doing so, we are computing the likelihood ratio:
Intuitively, this log-likelihood ratio should asymptotically behave like a
chi-square with m-n
degrees of freedom, where m
is the number of
measurements and n
the number of model parameters.
Final result¶
Special cases¶
The above formula is undefined if non or noff are equal to zero, because of the nlogn terms, that were introduced by adding the goodness of fit terms. These cases are treated as follows.
If non=0 the likelihood formulae read
and
WStat is derived by taking 2 times the negative log likelihood and adding the goodness of fit term as ever
Note that this is the limit of the original Wstat formula for non→0.
The analytical result for μbkg in this case reads:
When inserting this into the WStat we find the simplified expression.
If noff=0 Wstat becomes
and
For μsig>non(α1+α), μbkg becomes negative which is unphysical.
Therefore we distinct two cases. The physical one where
μsig<non(α1+α).
is straightforward and gives
For the unphysical case, we set μbkg=0 and arrive at