Normalisation with with respect to number is slightly wrong
For some observables, like cos(theta), normalising with respect to the number of the given compound yields wrong results. This is no problem in a bulk like phase where the mean number of particles doesn't fluctuate much, but is severe at the interface, where there are only few molecules.
We should alway tally up and divide by the total number of particles, not per frame.