# The Likelihood Functional Form

We argued before that the LAT data will be binned into a great many bins because the counts are characterized by many variables. Thus, even with many counts, each bin will contain a small number of counts. The observed number of counts in each bin is characterized by the Poisson distribution, and with a small number of counts per bin, the Poisson distribution cannot be approximated by a normal distribution.

The likelihood L is the product of the probabilities of observing the detected counts in each bin. Assume that the expected number of counts in the ith bin is mi. Note that mi is a function of the source model, and will differ for different models. The probability of detecting n_i counts in this bin is pi=min_i exp[-mi]/n_i!. The likelihood L is the product of pi for all i. But notice that this product factors into the product of the min_i/n_i!, which depends on the data—the values of n_i—and the product of the exp[-mi]. The product of exp[-mi] for all i is equal to the exponential of minus the sum of mi. The sum of mi is just the total number Nexp of counts that the source model predicts should have been detected.

Therefore, the likelihood L can be factored into exp[-Nexp], which is purely a function of the source model, and the product of min_i/n_i!, which is a function of both the source model and the data:

L = exp[-Nexp]  ∏i min_i/n_i!

This likelihood, with finite size bins and n_i that may be greater than 1, is the basis for binned likelihood. Since binning destroys information (i.e., the precise values of the quantities describing a count), there is a tradeoff between the number of bins (and thus the bin size) and the accuracy; smaller bins result in a more accurate likelihood.

If we let the bin sizes get infinitesmally small, then n_i=0 or 1. The likelihood is now the product of exp[-Nexp], as before, and the product of mi where i is now the index over the counts.

L = exp[-Nexp]  ∏i mi

Since mi is calculated using the precise values for each count, and not an average over a finite size bin, this unbinned likelihood is the most accurate.

For a small number of counts the unbinned likelihood can be calculated rapidly, but as the number of counts increases the time to calculate the likelihood becomes prohibitive, and the binned likelihood must be used.

» Forward to XSPEC Analysis of Fermi Data
» Back to Likelihood Overview
» Back to the beginning of the likelihood section
» Back to the beginning of the Cicerone