# Сonfidence interval of histogram probability density function estimator

There is a circle of radius $R$ and a sequence of points within it. I'm going to estimate a PDF of appearing at elementary area at the distance $D$ from the centre of the circle using a realization of $N$ points $X_0$, $X_1$, $\dots$, $X_{N-1}$. So I divide interval $[0, R]$ into $n$ bins $b_i=[r_i,r_{i+1}]$ and find $N_i$ as the number of points of $D$ appearing in each bin and divide it into the area of the ring of each bin $S=\pi\left(r_{i+1}^2-r_{i}^2\right)$. (For some reason bins might have different lengths $r_{i+1}-r_{i}$.)

I'm going to find error bars for values of the histogram $N_i/S$, or better say the function given by a table of values $(r_i+r_{i+1})/2\longrightarrow N_i/S$ as a PDF estimator accurate within a factor of $N$.

They usually use something like the "standard Poisson error" as $\sigma=1/\sqrt{n}$, so am I to use $\sigma_i=(1/\sqrt{N_i})/S$ or $\sigma_i = 1/\sqrt{N_i/S}$? Or is there a more correct formula to find a confidence interval?

Also, how should I compute a confidence interval if I convert the histogram into logarithmic coordinates $\log((r_i+r_{i+1})/2)\longrightarrow \log (N_i/S)$?

• Because I haven't the time to adequately address all the issues here, I just want to mention in this comment that the assumptions imply $N_i$ have (independent) Poisson distributions, whence you can apply Poisson CI formulae. Roughly, you would estimate the variance as $N_i$, so the usual rules of manipulating variances imply the variance of $N_i/S$ equals $N_i/S^2$, given a sampling SD for the estimated intensity equal to $\sqrt{N_i}/S$. For the histogram, however, you should be using $(N_i/N)/S$ rather than $N_i/S$, so that values for different $N$ can be comparable. – whuber Aug 2 '12 at 15:50
• @whuber, thank you, I suppose $(N_i/N)/S$ would be better, yes. So, what should I use in this case as $\sigma$? $\sqrt{N_i}/N/S$, not $\sqrt{N_i/N}/S$, I suppose? – Nick Aug 2 '12 at 16:10

If you do condition on $N$, your observations are multinomial, and an appropriate CI can be derived from the binomial
If you don't condition on $N$, your observations are Poisson, and an appropriate CI can be derived from that.