Skip to content

Speed up single-source fits with analytic solution for free rate multiplier #207

@JelleAalbers

Description

@JelleAalbers

When fitting a single source, there is a simple analytic solution for the best-fit rate multiplier at each shape parameter combination. We could use this to save the optimizer some iterations/time.

Consider a single-source fit with no prior on the rate multiplier r, and define

  • s one or more shape parameters
  • mu(s) the expected total events at r=1 (estimated from simulation)
  • N the total observed events, and
  • d_i(s) the differential rate of event i

Then log likeliood is

lnL(r, s) = -mu(s) * r + sum_i ln[ r * d_i(s) ]
          = -mu(s) * r + N ln r + sum_i ln[d_i(s)] .

Now dlnL/dr = -mu(s) + N/r, so the best-fit r = N/mu(s).

So for single-source fits, we could optimize - N ln mu(s) + sum_i ln[d_i(s)] instead of the log likelihood. Or equivalently, we could optimize the likelihood as usual but set the rate multiplier to N/mu(s) at each iteration of the fit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions