# A question on the spike-train autocorrelation function: Do we ignore the integration where the integrand is not defined?

In Dayan and Abbott's Theoretical Neuroscience book, they defined the spike-train autocorrelation function in section 1.4 as $$Q_{\rho\rho}(\tau)=\frac 1T \int_{0}^{T} \langle(\rho(t)-\langle r\rangle)(\rho(t+\tau)-\langle r\rangle)\rangle dt .$$ But to be rigorous, $$\rho$$ is defined only on $$[0,T]$$. So the integrand is only defined on, say, $$[0,T-\tau]$$ for $$\tau>0$$. When we compute the spike-train autocorrelation function, do we extend $$\rho$$ periodically, or do we simply ignore the integration on the intervals where the integrand is not defined?

By the way, Dayan and Abbott said in the book that a spike lasts about $$1\text{ms}$$. But it seems that the book did not mention the order of magnitude of the duration of a trial (Some figures implicitly indicates how long an experiment lasts. But the duration varies from $$80\text{ms}$$ to $$300\text{ms}$$). It also seems that the book did not mention the order of magnitude of the number of spikes of a trial (But this may be related to the duration of a trial. And hence it is equivalent to asking the average firing rate $$\langle r\rangle$$). I also want to know the domains of $$\tau$$ where we care about the value of $$Q_{\rho\rho}(\tau)$$. If we do ignore the integration on the domain where the integrand of $$Q_{\rho\rho}(\tau)$$ is undefined, is $$\tau$$ values subject to we are interested in the value of $$Q_{\rho\rho}(\tau)$$ sufficiently small (relative to the trial duration $$T$$), such that the above amount can be ignored?

• Might this not be more suited to our Psychology & Neuroscience site than here? Commented Jul 16 at 9:17
• I searched the keyword "Dayan Abbott" and found on both sites there are questions on details of this book. The Psychology& Neuroscience SE has more questions on this book, but it seems less active than the Biology SE. Commented Jul 16 at 11:45

I'd not extend p but rather divide by a "trapezoid" rather than "rectangle" 1/T that would be equivalent to integrating over all the possible event times.

You're right this only matters much if the duration is relatively short.

Also for this integral you should consider spike times as discrete.

Bair, W., Zohary, E., & Newsome, W. T. (2001). Correlated firing in macaque visual area MT: time scales and relationship to behavior. Journal of Neuroscience, 21(5), 1676-1697. is also a useful read regarding normalization of cross-correlation functions.

• Thanks. May I ask two more questions? By "dividing by a trapezoid", does it mean for example, dividing $T-\tau$ for $\tau>0$? And "This only matters much if the duration is relatively short.", does "this" refer to $Q_{\rho\rho}(\tau)$, i.e. we are only interested in the value of $Q_{\rho\rho}(\tau)$ when $\tau$ is small? Commented Jul 16 at 15:50
• @Asigan Stop and go back and think about what we're representing by an autocorrelation function. Like your previous question about this book, Dayan and Abbott will tend to give you equations in place of or alongside paragraph descriptions, assuming that these are clear to understand for someone used to reading equations, but in the real world we're never going to do these things with real data using symbolic representations of integrals, we're going to count with a computer. Commented Jul 16 at 16:00
• By "this" I mean accounting for spikes occurring in the the edges [0 tau) and (T-tau T] of the window not having full observation time. If tau<<T these edges are too small to matter. If tau is comparable to T, the edges are important. Biologically, autocorrelations at very long tau are not going to be that meaningful (for a rough order of magnitude, let's say autocorrelations are most likely to be meaningful <200 ms, but please don't hold me to that as a strict boundary.) Commented Jul 16 at 16:02
• Sorry for this late reply. I have been thinking this problem for days. Can I interpret it as (1) In the experiment in reality, $Q_{\rho\rho}(\tau)$ is actually measured in the manner which is explained in the next paragraph of Dayan & Abbott's book: "The spike-train autocorrelation function is constructed from data in the form of a histogram by dividing time into bins... "? (By the way I am not sure how this paragraph works. I wrote how I understood it as follows. Would you mind justifying if I understood correctly?) Commented Jul 18 at 16:41
• Given a $\tau$, take a sufficiently small $\Delta t$. Exists an integer $m$ such that $(m-\frac12)\Delta t<\tau<(m+\frac12)\Delta t$. Consider all spike pairs $(A, B)$ such that the time of $A$ minus the time of $B$ lies in the interval $[(m-\frac12)\Delta t, (m+\frac12)\Delta t]$. Let the number of such pairs be denoted as $N_m$. Consider $$\frac{N_m}{T\Delta t}-\frac{n^2}{T^2}$$ which equals $\frac{H_m}{\Delta t}$ on Dayan and Abbott's book. When $\Delta t$ is taken to be very small, experiments can observe that the above expression tends to a value. This value is $Q_{\rho\rho}(\tau)$. Commented Jul 18 at 16:41