-
Notifications
You must be signed in to change notification settings - Fork 16
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
Poisson uncertainty convention #15
Comments
Good question, and I don't know what we should do here. As much of a fan of the I like the discussion in [1] and think it would be neat if we could support plots like the "rainbow" plots they show in Figure 2. |
Whatever we decide here, one of the things I would like us to support is using a Poisson maximum likelihood estimator for our fits. This would be appropriate for all N including 0, not just N >~ 20, which the Gaussian approximation does well for. If \sum_i \frac{(n_i - y_i)^2}{n_i} (i.e., the chi-squared) but for a Poisson distribution we should minimize \sum_i (y_i - n_i \log y_i) |
All that sounds good. One approach would be to have a module-level option for the type of uncertainties used, Gaussian or at least one Poisson-friendly option. I'm not clear on how error propagation works for non-Gaussian intervals; does that get really ugly for some of these Poisson-friendly uncertainties? For now, how about we use the |
Yes, error propagation is ugly for non-Gaussian uncertainties. At worst it can involve Monte-Carlo sampling the random variables involved to determine the PDF of the quantity you are trying to add uncertainties to. Using I vote for using sqrt(N) and 1 for N=0 because
|
I thought about this some more and realized something interesting about the Poisson log likelihood: L(n, y) = \sum_i (y_i - n_i \log y_i) If the measured spectrum ( L(an, ay) = \sum_i (a y_i - a n_i \log (a y_i)) \\
= \sum_i (a y_i - a n_i \log (a y_i)) \\
= \sum_i (a y_i - a n_i \log y_i - a n_i \log a) \\
= a \sum_i (y_i - n_i \log y_i) - constant \\
= a L(n, y) - constant \\ So we could use this to our advantage. Surprisingly this method doesn't even require that we keep the original Note that this does not seem to apply if different scaling factors are applied to each measurement, such as dividing by varying bin widths. It also doesn't apply if another measurement has been subtracted from each |
For counts
N
, we commonly usesqrt(N)
as the 1-sigma uncertainty, which is valid for Gaussian statistics (N >> 0). However, in spectra we often deal with counts that are low or zero. Specifically,sqrt(N)
gives an uncertainty of 0 in the case of 0 counts.Personally in these situations I have used a suggestion I found in this Fermilab text article, and adopted
+-0.5 + sqrt(n+0.25)
. Another solution could be to usesqrt(N)
for N > 0, but specify an uncertainty of 1 in the case of N = 0.How do others handle this?
The text was updated successfully, but these errors were encountered: