elephant.statistics.fanofactor

elephant.statistics.fanofactor(spiketrains)[source]

Evaluates the empirical Fano factor F of the spike counts of a list of neo.SpikeTrain objects.

Given the vector v containing the observed spike counts (one per spike train) in the time window [t0, t1], F is defined as:

F := \frac{var(v)}{mean(v)}

The Fano factor is typically computed for spike trains representing the activity of the same neuron over different trials. The higher F, the larger the cross-trial non-stationarity. In theory for a time-stationary Poisson process, F=1.

Parameters:
spiketrainslist

List of neo.SpikeTrain or pq.Quantity or np.ndarray or list of spike times for which to compute the Fano factor of spike counts.

Returns:
fanofloat

The Fano factor of the spike counts of the input spike trains. Returns np.NaN if an empty list is specified, or if all spike trains are empty.