<p>Frequently, Fano Factor is calculated across time points: it is a measure of the variability in the spiking of a particular neuron.  For example, interneurons will frequently have lower Fano Factor than principal neurons.</p>
<p>As Bryan mentions in the comments, you may also be interested in the variance across trials, depending on the question that you are interested in.</p>
<p><em>EDIT:</em> To answer questions from your comment on my answer:<br />
No, you do not want to look at the Fano Factor of the ISI distribution.  The ISI distribution of a Poisson process is exponentially distributed, not poisson distributed.  The mean and variance of an exponential distribution are not the same (<a href="https://en.wikipedia.org/wiki/Exponential_distribution" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Exponential_distribution</a>).</p>
<p>You want to use bin sizes where you expect a small but non-zero number of spikes in each bin.</p>
<p>If a neuron is Poisson with a non-varying spike rate, then it shouldn't matter whether you look over time or over trials.  Most neurons have spike rates that vary in response to some value that the neuron is representing (inhomogeneous poisson process).  In that case, you want to isolate the time periods for which you expect the poisson process has a constant rate.  That may be a certain time period within a trial, or it may be across an entire trial.  That is where Brian's suggestion of being specific about what question you are actually asking comes into play.</p>

CC BY-SA 4.0
2022-01-16T06:07:49.830Z
Can you please provide some citations for this?
Chris Rogers
CC BY-SA 4.0
2022-01-16T16:51:08.097Z
Thank you Bryan and Honi.

I am just trying to see whether the neurons I am studying are close to Poisson spiking i.e. FF = 1.

I guess another more practical Q is do I use inter-spike interval (ISI) for my calculations or do I use spike count in time bins? If I use spike count in time bins, what kind of time bins would be appropriate?

Another question is, if a neuron is Poisson, would I expect to get FF = 1 both across trials and across time? Would this change for spontaneous firing vs response to say natural stimuli?

Thanks!
Alex
CC BY-SA 4.0
2022-01-17T16:27:52.243Z
Chris, requiring people to provide citations and hoping to increase the number of questions answered are conflicting goals.  I am trying to provide my expertise to the person who answered the question, I am not trying to spend part of my day doing literature review.
honi
CC BY-SA 4.0
2022-01-15T23:36:14.147Z
2022-01-17T16:36:15.840Z
2022-01-17T16:36:15.840Z
honi
<p>I've heard this used many times but never had to do it myself. How does one calculate Fano Factor (FF) for spike train data?</p>
<p>Let's say that you have for some neuron the spike count in a certain time bin dt and a given trail n to be y(n,t).</p>
<p>I know that FF = var/mean, but should the variance be computed across trials or across time points?</p>
<p>In other words, can I first take the mean across trials y_mean(t) = mean(y(n,t)) and then FF = var(y_mean(t))/mean(y_mean(t))?</p>
<p>OR</p>
<p>do I take the mean across time first y_mean(n) = mean(y(n,t)) and then FF = var(y_mean(n))/mean(y_mean(n))?</p>
<p>OR</p>
<p>you take a FF for each time point across trials?</p>
<p>Thanks!</p>

CC BY-SA 4.0
2022-01-15T19:05:47.383Z
You have to define what you want to calculate; both over trials or over time are reasonable. Not every type of data makes sense to consider in "trials", but some does.
Bryan Krause
<neuroscience><electrophysiology>
How to calculate Fano Factor for spike train data?
Alex
# How to calculate Fano Factor for spike train data?

(Asked by: username_0 on 2022-01-15)

I've heard this used many times but never had to do it myself. How does one calculate Fano Factor (FF) for spike train data?

Let's say that you have for some neuron the spike count in a certain time bin dt and a given trail n to be y(n,t).

I know that FF = var/mean, but should the variance be computed across trials or across time points?

In other words, can I first take the mean across trials y\_mean(t) = mean(y(n,t)) and then FF = var(y\_mean(t))/mean(y\_mean(t))?

OR

do I take the mean across time first y\_mean(n) = mean(y(n,t)) and then FF = var(y\_mean(n))/mean(y\_mean(n))?

OR

you take a FF for each time point across trials?

Thanks!

**Tags:** neuroscience, electrophysiology

> **Comments:**
> **username_1**: You have to define what you want to calculate; both over trials or over time are reasonable. Not every type of data makes sense to consider in "trials", but some does.  

---

## 1 answers

### Answer by username_2 on 2022-01-15. Score: 2

Frequently, Fano Factor is calculated across time points: it is a measure of the variability in the spiking of a particular neuron. For example, interneurons will frequently have lower Fano Factor than principal neurons.

As Bryan mentions in the comments, you may also be interested in the variance across trials, depending on the question that you are interested in.

*EDIT:* To answer questions from your comment on my answer:  
No, you do not want to look at the Fano Factor of the ISI distribution. The ISI distribution of a Poisson process is exponentially distributed, not poisson distributed. The mean and variance of an exponential distribution are not the same (<https://en.wikipedia.org/wiki/Exponential_distribution>).

You want to use bin sizes where you expect a small but non-zero number of spikes in each bin.

If a neuron is Poisson with a non-varying spike rate, then it shouldn't matter whether you look over time or over trials. Most neurons have spike rates that vary in response to some value that the neuron is representing (inhomogeneous poisson process). In that case, you want to isolate the time periods for which you expect the poisson process has a constant rate. That may be a certain time period within a trial, or it may be across an entire trial. That is where Brian's suggestion of being specific about what question you are actually asking comes into play.

> **Comments:**
> **username_3**: Can you please provide some citations for this?  
> **username_0**: Thank you Bryan and Honi.  I am just trying to see whether the neurons I am studying are close to Poisson spiking i.e. FF = 1.  I guess another more practical Q is do I use inter-spike interval (ISI) for my calculations or do I use spike count in time bins? If I use spike count in time bins, what kind of time bins would be appropriate?  Another question is, if a neuron is Poisson, would I expect to get FF = 1 both across trials and across time? Would this change for spontaneous firing vs response to say natural stimuli?  Thanks!  
> **username_2**: Chris, requiring people to provide citations and hoping to increase the number of questions answered are conflicting goals.  I am trying to provide my expertise to the person who answered the question, I am not trying to spend part of my day doing literature review.  

---

