Problem with FeldmanCousins roostats tutorial

Hi all,

executing roostats example


I couldn’t get the same results expected in the inline comments.
According to the code, I should find the interval [0.2625, 10.6125], while I get [0.2625, 14.9625].
I just changed the following lines to be consistent with the comments (200 bins and 0.075 step width):

  RooStats::FeldmanCousins fc(*data,modelConfig);
  fc.SetTestSize(.05); // set size of test
  fc.FluctuateNumDataEntries(false); // number counting analysis: dataset always has 1 entry with N events observed
  fc.SetNBins(200); // number of points to test per parameter

Did I forget anything?
Thank you!



Are you sure you have generate a dataset with nobs = 7 ? What I get in 5.34 is [0.2625, 10.9875].

However, if you want to get FeldmanCousins interval for only one parameter of interest, I would reccomend you to use the StandardHypoTestInvDemo macro (i.e. via the HypoTestInverter class).
In this case you configure for using the FrequentistCalculato, use CLs+b and the two-sided profile likelihood test statistic (testStatistic type == 2).
See for example slide 41 of … fId=188176

Best Regards