#acl All:read This page summarizes statistical methods used in XSPEC. It is under construction. == Parameter estimation == The purpose of parameter estimation is to determine the best-fit parameter values for the data sets in use and the model defined. A statistic is calculated from the data and model and the parameters varied until this statistic is minimized. XSPEC can use either of two families of statistics. === Chi-squared (stat chi) === The chi-squared statistic is calculated by : chi^2_ = Sum (D_i - M_i)^2 / sigma_i^2 where $D_i$ are the observed counts, $M_i$ the model predicted counts, and $sigma_i^2$ the variance. The observed and predicted counts are straightforward however, in general, we do not know the true variance and have to estimate it. If the errors are Normal then we just use the variance associated with each bin as the estimator. There are no particular issues with this as long as the variances are reasonable estimates. If the errors are Poisson then the situation is more complex. The default option (weight standard) is to use the observed number of counts as an estimator for the underlying variance (equals the underlying mean). It is important to realize that this introduces a bias. Downward fluctuations will be weighted more heavily than upward fluctuations because, while the numerator of chi-squared for the bin will be the same, the denominator will be smaller for the downward fluctuation. An obvious alternative to try is to use the predicted counts from the model as an estimator for the Poisson variance (weight model). This does not have the bias problem of the standard method however in practice it turns out to be unstable and can drive the fit away from the best parameters. A clever alternative was suggested by Churazov et al. and appears to work well (weight churazov). In this case the variance is estimated from the mean of nearby channels. This reduces the size of the bias since the variance is less dependent on the fluctuation of an individual bin. It does require the expected counts/bin to be relatively constant over the bins being averaged to estimate the variance. === C statistic (stat cstat) === == Confidence intervals == === Fisher matrix === === Error command === == Goodness-of-fit == === Chi-squared === === goodness command === == Model comparison == == Bayesian methods ==