Formula for continuous poisson process model

61 Views Asked by At

I have a stochastic model that looks like this:

enter image description here

Now if this model were discrete-time, I would just sample bernoulli trials, and I could write a difference equation that looks like this:

$$ x_{t+1} = x_t + b $$

with $b \sim Bernoulli(p)$, so b taking on the values $1$ with probability $p$ and $0$ with $1-p$.

Or alternatively

$$ \Delta x = b $$

(Code showing what I mean:

x = np.zeros(1000)

for t in range(1000-1):
    x[t+1] = x[t] + np.random.binomial(n=1, p=0.02, size=1)

plt.plot(x)
plt.show()

produces enter image description here )

Question

What would be the continuous-time counterpart of this model? I am unsure how I could define this model with poisson / exponential distributions, and using $dx$ instead of $\Delta x$.

And secondly, once I have this continuous-time counterpart, how can I discretise it for simulation? Or would the discretised part be the same as described above?

1

There are 1 best solutions below

3
On BEST ANSWER

You can simulate a sequence of random arrival times $(\tau_n)_{n\in \mathbb{N}}$ and sum up the indicators up to $t$. That is $Y_t=\sum_{n \in \mathbb{N}}\mathbf{1}_{[0,t]}(\tau_n)$. For example, you can use the exponential distribution to simulate $\tau_k-\tau_{k-1}\sim \textrm{Exp}(\lambda)$ IID, thus obtaining the sequence of arrival times on the nonnegative real line. Here is a coded example.

import numpy
import scipy.stats
import matplotlib.pyplot as mp 

def Yt_process(t,arrival_times):
    return numpy.sum(numpy.where(arrival_times<=t,1,0))

N = 100
intensity_lambda = 10
diff_arrival_times = scipy.stats.expon.rvs(size=N,scale=1/intensity_lambda)
arrival_times = numpy.cumsum(diff_arrival_times)

# plot of the process on a fine discretized time grid

grid_length = int(1e+05)
t = numpy.linspace(0,1,grid_length) # in [0,1]
Yt = numpy.zeros(grid_length)
for j in range(0,grid_length):
    Yt[j] = Yt_process(t[j],arrival_times)
    
mp.plot(t,Yt)
mp.xlim((0,1))
mp.show()