Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2016

URL: http://cxc.harvard.edu/sherpa/ahelp/wstat.html
AHELP for CIAO 4.9 Sherpa v1

wstat

Context: statistics

Synopsis

A maximum likelihood function from XSPEC

Description

The wstat statistic is equivalent to the XSPEC implementation of the Cash statistic where the observed background data is included (i.e. does not have to be modelled). The cstat statistic should be used if the background data is going to be modelled (i.e. fit).

This statistic corresponds to the "Poisson data with Poisson background (cstat)" section of the Statistics in XSPEC appendix, which includes the equations used to define the statistic.

Note that simulations should be used to verify that the statistic (including the reduced statistic) is robust, since there are a number of assumptions used in the derivation.

Example

sherpa> set_stat("wstat")
sherpa> show_stat()
Statistic: WStat
...

Set the fitting statistic and then confirm the new value.

WSTAT and background subtraction

The subtract command should NOT be used when the wstat is selected. The background data will be automatically included when calculating the statistic. This means that results that use or display the data - such as plot_data(), plot_fit(), and plot_resid() - will not be correct when the wstat statistic is in use, because the plots do not include the background component. If the background is to be modelled then the cstat statistic should be used.

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

info
list_stats
statistics
cash, chi2constvar, chi2datavar, chi2gehrels, chi2modvar, chi2xspecvar, chisquare, cstat, get_prior, leastsq, list_priors, set_prior, set_sampler, set_stat

Last modified: December 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.