Fano factor
Posted: Wed Dec 25, 2013 8:37 am
Hello, I am trying to see if the synaptic events that are created from netstim with noise=1 have a Fano Factor http://en.wikipedia.org/wiki/Fano_factor of 1 (as should be for a Poisson distribution)
This is my code
The result that I should get from Vec1.var()/Vec1.mean() should be ~1
as We can see from the simple matlab code
But I get form Vec1.var()/Vec1.mean() = 91.550064
What am I doing wrong?
Thank You.
This is my code
Code: Select all
// Test Fano factor
objref syn, sti , con, Vec, Gra, Vec1
create soma
insert pas
Vec = new Vector()
syn = new Exp2Syn(0.5)
sti = new NetStim(0.5)
sti.interval = 100
sti.start = 10
sti.number = 500000
sti.noise = 1
con = new NetCon(sti,syn)
con.weight=1
con.record(Vec) // record all events of synaptic release
tstop = 55000
run()
Vec1 = new Vector()
for i=1,(Vec.size()-1){ // getting only the difference between each synaptic event
Vec1.append(Vec.x[i] - Vec.x[i-1])
}
Vec1.var()/Vec1.mean()
The result that I should get from Vec1.var()/Vec1.mean() should be ~1
as We can see from the simple matlab code
Code: Select all
rand_sm = poissrnd(1650,1,70);
var(rand_sm)/mean(rand_sm)
What am I doing wrong?
Thank You.