# Estimation of mean, variance and mean squared error of a histogram that poorly models real distribution

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.