Bug #2266

Verify computation of WSTAT in GCTAOnOffObservation::likelihood_wstat

Added by Knödlseder Jürgen about 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:10/28/2017
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.5.0
Duration:

Description

The pull distribution obtained with the WSTAT statistic seems to be to broad, the fit results appear however relatively unbiased (see #2263).

The formulae for the WSTAT should be verified to correct this issue (is there for example somewhere a factor of 2 in the log-likelihood that could lead to too large errors?)

PrefactorHist_newwstat_b05.png (40.7 KB) Knödlseder Jürgen, 10/28/2017 06:07 PM

Index_newwstat_b05.png (44.4 KB) Knödlseder Jürgen, 10/28/2017 06:07 PM

IndexHist_newwstat_b05.png (38.8 KB) Knödlseder Jürgen, 10/28/2017 06:07 PM

Prefactor_newwstat_b05.png (42.5 KB) Knödlseder Jürgen, 10/28/2017 06:07 PM

PrefactorHist_newwstat_b10.png (40.3 KB) Knödlseder Jürgen, 10/30/2017 09:28 PM

IndexHist_newwstat_b10.png (39.3 KB) Knödlseder Jürgen, 10/30/2017 09:28 PM

Prefactor_newwstat_b10.png (42.5 KB) Knödlseder Jürgen, 10/30/2017 09:29 PM

Index_newwstat_b10.png (44.4 KB) Knödlseder Jürgen, 10/30/2017 09:29 PM

PrefactorHist_newwstat_0.05-100_b40.png (40.9 KB) Knödlseder Jürgen, 10/30/2017 09:32 PM

Prefactor_newwstat_0.05-100_b40.png (48.3 KB) Knödlseder Jürgen, 10/30/2017 09:33 PM

Index_newwstat_0.05-100_b40.png (33.3 KB) Knödlseder Jürgen, 10/30/2017 09:33 PM

IndexHist_newwstat_0.05-100_b40.png (46.5 KB) Knödlseder Jürgen, 10/30/2017 09:34 PM

Prefactorhist_newwstat_b05 Index_newwstat_b05 Indexhist_newwstat_b05 Prefactor_newwstat_b05 Prefactorhist_newwstat_b10 Indexhist_newwstat_b10 Prefactor_newwstat_b10 Index_newwstat_b10 Prefactorhist_newwstat_0.05-100_b40 Prefactor_newwstat_0.05-100_b40 Index_newwstat_0.05-100_b40 Indexhist_newwstat_0.05-100_b40

Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 7 years ago

The formulae for the derivative in the general case were not correct. After correcting the formula things seems to be okay. Here an example for 5 energy bins between 100 GeV and 100 TeV.

#2 Updated by Knödlseder Jürgen about 7 years ago

Here the same for 10 bins. Also looks okay.

#3 Updated by Knödlseder Jürgen about 7 years ago

I also checked the pull distributions for 40 bins and an energy range from 50 GeV to 100 TeV. Now the Prefactor seems to be slightly biased and too broad. I double checked all formulae and did not find any error. I guess this behaviour comes from the fact that in many cases the number of On or Off events per bin is zero and the special cases where the background estimate is set to zero is encountered.

I don’t think that we can do something about this, it seems to be an inherent limitation of the statistic.

The Xspec page (https://heasarc.nasa.gov/xanadu/xspec/manual/XSappendixStatistics.html) mentions by the way:
In practice, it works well for many cases but for weak sources can generate an obviously wrong best fit. It is not clear why this happens although binning to ensure that every bin contains at least one count often seems to fix the problem.

Also available in: Atom PDF