When generating toys using the ToyMCSampler, for a fit based model, the number of events generated per toy is calculated from the extended PDF (Generally). Then there is a poisson distribution around this value and the number of events generated fluctuates per toy experiment.
For a counting model (Poisson Model) the PDF is not extended. You can set the number of events per toy using:
However this is now constant from toy to toy. I guess there are three questions here…
1.a) Is it not natural to allow the number of events to fluctuate per toy (with a poisson distribution around the expected yield) as it is done in the fitting method?
1.b) If its not natural to do this (Why not?) and if it should be constant do I set it to the expected number of events for S+B?
- If it is suggested to do this, is it possible to do this with the ToyMCSampler?
Thanks for your help!
You can do both in the ToyMCSampler. In a standard number of counting model you generate as observable the number of events (n) and therefore you have only one event (one Poisson process) per toy.
You can also assume that in the counting model you have an arbitrary shape variable x, which you don’t care (for example having a uniform distribution) and in this case you described as an extend model, where the number of events/toy fluctuates as Poisson.
Both cases are supported and possible in RooStats and will produce the same result.
Thanks for explaining this a bit better. So I had a look in the Evaluate function in the ProfileLikelihoodTestStat class and realised that the single event in the poisson counting toy model has a data entry which is the number of observed events.
I was counting how many entries there were but like you say there is only 1 single entry with (n) events generated in it.
Thanks for clearing that up!