next up previous contents
Next: The XSPEC implementation Up: Spectral Fitting and XSPEC Previous: Introduction

The Basics of Spectral Fitting

Although we use a spectrometer to try to find out the spectrum of a source, what the spectrometer obtains is not the actual spectrum, but rather photon counts (C) within specific instrument channels, (I). This observed spectrum is related to the actual spectrum of the source (f(E)), such that:

displaymath10229

where R(I,E) is the instrumental response and is proportional to the probability that an incoming photon of energy E will be detected in channel I. Ideally, then, we would like to determine the actual spectrum of a source, f(E), by inverting this equation, thus deriving f(E) for a given set of C(I). Regrettably, this is not possible in general, as such inversions tend to be non-unique and unstable to small changes in C(I). (For examples of attempts to circumvent these problems see Blissett & Cruise 1979; Kahn & Blissett 1980; Loredo & Epstein 1989).

The usual alternative is to try to choose a model spectrum, f(E), that can be described in terms of a few parameters (i.e., f(E,p1,p2,...)), and match, or ``fit" it to the data obtained by the spectrometer. For each f(E), a predicted count spectrum ( tex2html_wrap_inline10231 ) is calculated and compared to the observed data (C(I)). Then a ``fit statistic'' is computed from the comparison, which enables one to judge whether the model spectrum ``fits'' the data obtained by the spectrometer.

The model parameters then are varied to find the parameter values that give the most desirable fit statistic. These values are referred to as the best-fit parameters. The model spectrum, tex2html_wrap_inline10247 , made up of the best-fit parameters is considered to be the best-fit model.

The most common fit statistic in use for determining the ``best-fit" model is tex2html_wrap_inline10235 , defined as follows:

displaymath10235

where tex2html_wrap_inline10239 is the error for channel I (e.g., if C(I) are counts then tex2html_wrap_inline10239 is usually estimated by tex2html_wrap_inline10241 ; see e.g. Wheaton et.al. 1995 for other possibilities).

Once a ``best-fit" model is obtained, one must ask two questions:

  1. First, one must ask how confident one can be that the observed C(I) can have been produced by the best-fit model tex2html_wrap_inline10247 . The answer to this question is known as the ``goodness-of-fit" of the model.

    The tex2html_wrap_inline10235 statistic provides a well-known goodness-of-fit criterion for a given number of degrees of freedom ( tex2html_wrap_inline10249 , which is calculated as the number of channels minus the number of model parameters) and for a given confidence level. If tex2html_wrap_inline10235 exceeds a critical value (tabulated in many statistics texts) one can conclude that tex2html_wrap_inline10247 is not an adequate model for C(I). As a general rule, one wants the ``reduced  tex2html_wrap_inline10235 " ( tex2html_wrap_inline10235 / tex2html_wrap_inline10249 ) to be approximately equal to one ( tex2html_wrap_inline10251 ). A reduced tex2html_wrap_inline10235 that is much greater than one indicates a poor fit, while a reduced tex2html_wrap_inline10235 that is much less than one indicates that the errors on the data have been over-estimated.

    Even if the best-fit model ( tex2html_wrap_inline10247 ) does pass the ``goodness-of-fit" test, one still cannot say that tex2html_wrap_inline10247 is the only acceptable model. For example, if the data used in the fit are not particularly good, one may be able to find many different models for which adequate fits can be found. In such a case, the choice of the correct model to fit is a matter of scientific judgement.

  2. Second, for a given best-fit parameter (p1), one must determine the range of values within which one can be confident the true value of the parameter lies. The answer to this question gives one the ``confidence interval" for the parameter.

    The confidence interval for a given parameter is computed by varying the parameter value until the tex2html_wrap_inline10235 increases by a particular amount above the minimum, or ``best-fit" value.

    The amount that the tex2html_wrap_inline10235 is allowed to increase (also referred to as the critical tex2html_wrap_inline10259 tex2html_wrap_inline10235 ) depends on the confidence level one requires, and on the number of parameters whose confidence space is being calculated. The critical tex2html_wrap_inline10259 tex2html_wrap_inline10235 for common cases are given in the following table (from Avni, 1976):

    Confidence Parameters
    1 2 3
    0.68 1.00 2.30 3.50
    0.90 2.71 4.61 6.25
    0.99 6.63 9.21 11.30

    There is a good discussion of confidence ranges in Press et al., (1992) for readers who want more detailsgif.


next up previous contents
Next: The XSPEC implementation Up: Spectral Fitting and XSPEC Previous: Introduction

Keith Arnaud (kaa@genji.gsfc.nasa.gov)
Wed May 28 10:59:33 EDT 1997