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.