Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for staterror modifier #1018

Open
alexander-held opened this issue Aug 5, 2020 · 4 comments
Open

Documentation for staterror modifier #1018

alexander-held opened this issue Aug 5, 2020 · 4 comments
Labels
docs Documentation related user request Request coming form a pyhf user

Comments

@alexander-held
Copy link
Member

Question

The staterror documentation https://scikit-hep.org/pyhf/likelihood.html#mc-statistical-uncertainty-staterror shows a modifier example:

{ "name": "mod_name", "type": "staterror", "data": [0.1] }

but does not clarify what exactly it is that should be specified under data. In particular, a user may wonder whether they should put the relative or absolute stat. uncertainty (the absolute is needed).

Users may also wonder why a Gaussian constraint term is used, and/or how to switch to a Poisson term which is available in ROOT HistFactory (see #760).

In the formula provided in the text, is the summation not in quadrature?

small typo in the text: "constrained term" -> "constraint term"

came up in conversation with @kratsg

Relevant Issues and Pull Requests

#760

@matthewfeickert matthewfeickert added docs Documentation related user request Request coming form a pyhf user labels Aug 5, 2020
@matthewfeickert
Copy link
Member

@paulgessinger given your comments on the staterror Stack Overflow question any thoughts or feedback on making things more clear would be helpful here as well.

@paulgessinger
Copy link

I guess mentioning that it's the absolute error would be a good idea (although that's what I personally assumed to be the case).

Apart from that, if my understanding that the alternative to staterror is a shapesys is correct, maybe it would be helpful to make the general reference "adding uncertainties for each sample would yield a very large number of nuisance parameters" in the doc right now more concrete.

@kratsg
Copy link
Contributor

kratsg commented Aug 7, 2020

Apart from that, if my understanding that the alternative to staterror is a shapesys is correct, maybe it would be helpful to make the general reference "adding uncertainties for each sample would yield a very large number of nuisance parameters" in the doc right now more concrete.

It's a matter of how you model the uncertainty. For example, a shapesys is useful to apply an uncertainty on a particular sample in a channel... whereas, if all your MC samples are generated with some correlated (generator-based, statistical) uncertainty -- then a staterror is more appropriate.

@matthewfeickert matthewfeickert added this to To do in v0.7.0 via automation Sep 2, 2022
@matthewfeickert matthewfeickert removed this from To do in v0.7.0 Sep 23, 2022
@matthewfeickert matthewfeickert added this to To do in v0.7.1 via automation Sep 23, 2022
@matthewfeickert matthewfeickert removed this from To do in v0.7.1 Apr 7, 2023
@sambklein
Copy link

Related to this, there is also an issue with the Modifiers and Constraints table, where the form of the gaussian and the input would have the data in the modifier definition be the relative variance rather than the absolute standard deviation.

I think the constraint term should be $\prod_b\mathrm{Gaus}\left(a_{\gamma_b} = 1\middle|,\gamma_b,\delta_b / \nu_b\right)$ and the input should be $\delta_b = \sqrt{\sum_s\delta^2_{sb}}$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related user request Request coming form a pyhf user
Projects
Status: Todo
Development

No branches or pull requests

5 participants