I'm having a basic statistics problem. I'm running an experiment using a photon counting detector to measure a diffraction pattern. I want to calculate the centroid of each diffraction spot and the error in the centroid.

In 1D my data can be considered to be a histogram of counts within equally spaced bins. I'm calculating the centroid and error as the intensity weighted mean and standard error of the distribution.

My problem occurs when I have a spot whose distribution is narrower than the pixel size (i.e. in 1-D all the counts fall within a single histogram bin) and I get a variance, and therefore an error, of zero in the determination of the mean.

My first thought was that since the position of each count has an error of $\pm 0.5$ pixels, I could just propagate that and add it to the standard error; however, the fact that no-one else seems to be doing that worries me somewhat.

I know that the $\text{MSE} = \text{variance} + \text{bias}^2$, but I'm equally unclear about how to calculate the bias of my data, although I'm aware that in histogram statistics the bias varies with the bin size.

I'm pretty sure I'm missing something simple; if anyone has any ideas that would be great.


I think further clarification of exactly what you want to compute or estimate ultimately will help (most of us aren't physicists, so explain-like-we're-intelligent-eight-year-olds). One possibility would be to draw a diagram of an ideal situation (what it would be like if your bins were able to be super-narrow relative to the spot-widths), clarifying what you ideally want to find, and then perhaps draw another with wider bins/narrower spots to clarify the circumstances and again explain what you want to calculate/estimate in relation to what you're observing.

If this is a per-spot problem, something you're trying to do for each individual spot, (where the spots are well separated) perhaps you could describe your problem in terms of just doing it for a single spot. (If that's not the case, additional clarification may be needed on that as well.)

It sounds like you're trying to get the uncertainty (or perhaps a variance) in the estimate of the center of the spot in the presence of your data being (unavoidably) binned.

It looks like you have two sources of variation; one is the underlying error in the intensity around a spot, and the other is the error introduced by binning, which dominates when breadth of the spot is small.

You can't just assume your values are all at the center of the histogram bin; when the spot is so wide that the distribution within a bin is nearly uniform, maybe you can approximate it that way (though that biases your variance estimates), but when it's far smaller than one bin, you don't know where it is in the bin. If the spot is really narrow its center might be very far from the middle of the bin.

You can't just ignore that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.