# Is there any reason that cross correlation would perform well or poorly on sparse binary arrays?

I am using matlab xcorr to correlate simulated photon count data that has some Gaussian random noise set on top of it and it is working fine when the average value in the arrays is greater than one but when I split the arrays into enough bins such that most elements are zero (conserving the total photon count) and the average is much less than one photon per bin, suddenly the lags from xcorr get much larger (relative to the total length even). For example, at one resolution the lag may be 10 while if I increase resolution ten times, the lags become ~500, much more than ten times the previous value. When I do this without any noise added it works very well, and I am thinking maybe because when the values are mostly zeros and ones and the rare two, any differences such as the xth bin being a one rather than a zero is a large percentage difference in the value and this leads to a large difference in the sums (~integrals) that xcorr calculates. Does anyone have any more knowledge or thoughts on whether this is correct or not?