2

Say I collect data that follows a Normal distribution $f(z)$ in a histogram with bins of width $w$. I want to calculate the probability that the number of hits $N_i > N_j$.

My naive approach would be to first calculate the probability of finding a hit in bin $i$ by integrating $f(z)$ over the bin: $$ p_i = \int_{z_i-w/2}^{z_i+w/2}f(z)dz $$

The number of hits in a bin then follows a binomial distribution such that $$ P(N_i = x) = p_i^x\:(1-p_i)^{N-x}\cdot \left(\begin{matrix}N\\x\end{matrix}\right) $$ where $N=\sum_i{N_i}$ is the total number of hits collected.

To find $P(N_i>N_j)$, I would then sum over all combinations for which this condition holds: $$ P(N_i>N_j) = \sum_{x=1}^{N/2} \sum_{y=0}^{x-1}P(N_i=x)\cdot P(N_j=y) $$

I was hoping for there is a more elegant, perhaps analytically solvable method of finding these probabilities.

JorenHeit
  • 123

1 Answers1

1

I don't think there's an elegant solution but there is a correct solution. Note that $(N_i,N_j,N-N_i-N_j)$ follows a multinomial distribution with parameters $(N,p_i,p_j,1-p_i-p_j)$. Therefore the probability that $N_i > N_j$ is

$$P(N_i > N_j) = {\sum_{k=1}^N {\sum_{h=0}^{k-1}{ N! \over {k! h! (N-k-h)!}} p_i^{k} p_j^{h} (1-p_i-p_j)^{N-k-h}}}$$

JimB
  • 1,861