Hello,
I don't have a strong formal background in mathematics here, but I want to describe some of the mechanisms used in NEURON. Specifically, I am not sure if I have the correct mathematical notation for describing how fractional randomness is implemented in NEURON's NetStim function. So far, I have deduced the following from a previous discussion on the forum (see viewtopic.php?f=8&t=1839):
Any corrections or relevant references to this would be most helpful.
Alex GM
NetStim Fractional Randomness: Mathematical Notation?

 Site Admin
 Posts: 5683
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: NetStim Fractional Randomness: Mathematical Notation?
Everything depends on the meaning of words and notation. In plain english, what does your notation mean?
Re: NetStim Fractional Randomness: Mathematical Notation?
Right, so my understanding of how fractional randomness is implemented is that for each interspike interval, the interval is dependent on the values set for s.interval and s.noise (assuming s = new NetStim(x)). Specifically, the magnitude of the value of s.noise (from 0 to 1) will control the proportion by which the interval is dependent on s.interval vs random values sampled from a negative exponential distribution. For example if s.noise = 0.2, the actual interval will be 0.8*s.interval + a random duration sampled from a negative exponential distribution with a mean duration of 0.2*s.interval. I am mostly unsure about how this negative exponential distribution (i.e. X) is represented mathematically. Honestly, from my limited understanding I would've written it as follows:
If given a PDF negative exponential distribution according to the following: lambda*exp(lambda*x), and 1/lambda = the mean of the distribution, then lambda would be equal to (1/s.interval*s.noise). This would give the following:
X ~ lambda*exp(lambda*x)
X ~ (1/s.interval*noise) * exp( x / (s.interval*s.noise) )
In this case, x would represent the range of durations that the exponential distribution covers, which can incorporate the proportion of the interval (i.e. (1s.noise)*s.interval) according to the following:
X ~ (1/s.interval*noise) * exp( (t  (1s.noise)*s.interval)) / (s.interval*s.noise) )
Which ensures that x (i.e. t  (1s.noise)*s.interval) ) must be larger than 0 in order to get event probabilities greater than zero (i.e. negative duration probabilities would be impossible), such that the total time elapsed, t, before a new event occurs is greater than (1s.noise)*s.interval). Actually, going through this, again, I am thinking that the notation I had posted previously would be incorrect, because the PDF and the equation preceding it sort of incorporate the (1s.noise)*s.interval twice, which I think could force the actual interval to be up to twice its set value. My corrected notation would be one of the following:
... or this (which I think would mean the same thing (?)):
Thank you for your time,
Alex GM
If given a PDF negative exponential distribution according to the following: lambda*exp(lambda*x), and 1/lambda = the mean of the distribution, then lambda would be equal to (1/s.interval*s.noise). This would give the following:
X ~ lambda*exp(lambda*x)
X ~ (1/s.interval*noise) * exp( x / (s.interval*s.noise) )
In this case, x would represent the range of durations that the exponential distribution covers, which can incorporate the proportion of the interval (i.e. (1s.noise)*s.interval) according to the following:
X ~ (1/s.interval*noise) * exp( (t  (1s.noise)*s.interval)) / (s.interval*s.noise) )
Which ensures that x (i.e. t  (1s.noise)*s.interval) ) must be larger than 0 in order to get event probabilities greater than zero (i.e. negative duration probabilities would be impossible), such that the total time elapsed, t, before a new event occurs is greater than (1s.noise)*s.interval). Actually, going through this, again, I am thinking that the notation I had posted previously would be incorrect, because the PDF and the equation preceding it sort of incorporate the (1s.noise)*s.interval twice, which I think could force the actual interval to be up to twice its set value. My corrected notation would be one of the following:
... or this (which I think would mean the same thing (?)):
Thank you for your time,
Alex GM

 Site Admin
 Posts: 5683
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: NetStim Fractional Randomness: Mathematical Notation?
Simple summary that correctly expresses the effect of NetStim's noise parameter:
If noise == 0, the interspike interval (ISI) is constant and equals s.interval .
If 0<noise<=1 then
mean ISI is s.interval
minimum ISI is (1noise)*s.interval
maximum ISI is infinite
and the value of any particular ISI is calculated as the sum of two terms
a + b
where a = (1noise)*s.interval, i.e. the minimum ISI,
and b = a value drawn from the negative exponential distribution that has a mean of noise*s.interval .
This last "sum of two terms" bit ensures that the expected (i.e. mean) ISI equals
(1noise)*s.interval + noise*s.interval = s.interval
WRT mathematical notation: f is generally used to signify a probability density function, and X is used to signify a random variable. Your notes use X as if it were the pdf; maybe that's where the confusion is coming from.
If noise == 0, the interspike interval (ISI) is constant and equals s.interval .
If 0<noise<=1 then
mean ISI is s.interval
minimum ISI is (1noise)*s.interval
maximum ISI is infinite
and the value of any particular ISI is calculated as the sum of two terms
a + b
where a = (1noise)*s.interval, i.e. the minimum ISI,
and b = a value drawn from the negative exponential distribution that has a mean of noise*s.interval .
This last "sum of two terms" bit ensures that the expected (i.e. mean) ISI equals
(1noise)*s.interval + noise*s.interval = s.interval
WRT mathematical notation: f is generally used to signify a probability density function, and X is used to signify a random variable. Your notes use X as if it were the pdf; maybe that's where the confusion is coming from.