# Generating Poisson Spike train

For designing a spike generator within a computer program, we can use the fact that the probability of firing a spike within a short interval is P(one spike)=r.dt.

Now imagine that our rate, r, is composed of two other rates, i.e., r1 and r2. assuming that r1 and r2 are independent therefore we have P(one spike)=r1.r2.dt.

However, I can't explain to myself why we can't say, the probability of a pike to happen for rate r1 is r1.dt and for r2 is r2.dt and since r1 and r2 are independent then P(one spike)=r1.dt.r2.dt.

If I want to put into works then what does r1.dt.r2.dt tell me?

I don't mean that there are two Poisson processes. Let me give you an example: Firing rate of a neuron as a function of the rat's space is r1 and firing rate of a neuron as a function of the rat's speed is r2. if I only had r1 then the probability of having one spike in a very small dt would be r1.dt. And if I only had r2 then the probability of having one spike in a very small dt would be r2.dt. My question is what is the probability of having one spike in a very small dt if we we are considering both speed and space, i.e., having both r1 and r2. Given that r1 and r2 are independent. Even though it sounds like it should be r1.r2.dt, I can't understand why we can't say, r1.dt.r2.dt.

It's not clear what you mean by "composed of two other rates". If you're saying that you have two poisson processes with rates $r_1,r_2$ and are interested in events of either one firing, then the probability is $r_1dt+r_2dt$ since the sum of two poisson processes is again Poisson with rate equal to the sum of the individual rates. To see this in detail, the chance of seeing a fire from either is equal to 1 minus the chance of neither firing:
$$1-(1-r_1dt)(1-r_2dt)=(r_1+r_2)dt-r_1r_2dt^2=(r_1+r_2)dt,$$