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 *i*th bin is m_{i}. Note that m_{i} is a function of the source model, and will differ for different models. The probability of detecting n_i counts in this bin is p_{i}=m_{i}^{n_i} exp[-m_{i}]/n_i!. The likelihood *L* is the product of p_{i} for all *i*. But notice that this product factors into the product of the m_{i}^{n_i}/n_i!, which depends on the data—the values of n_i—and the product of the exp[-m_{i}]. The product of exp[-m_{i}] for all i is equal to the exponential of minus the sum of m_{i}. The sum of m_{i} is just the total number N_{exp} of counts that the source model predicts should have been detected.

Therefore, the likelihood *L* can be factored into exp[-N_{exp}], which is purely a function of the source model, and the product of m_{i}^{n_i}/n_i!, which is a function of both the source model and the data:

*L* = exp[-N_{exp}] ∏_{i} m_{i}^{n_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[-N_{exp}], as before, and the product of m_{i} where *i* is now the index over the counts.

*L* = exp[-N_{exp}] ∏_{i} m_{i}

Since m_{i} 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