import numpy as np 
import scipy.stats as st 
import matplotlib.pyplot as plt 

np.random.seed(42)

#defines some parameters
t1 = 1.
t2 = 10.
dt = t2 - t1
n1 = 2
n2 = 10
#starts the simulation
n = n2 - n1
J = np.sort(dt * st.uniform.rvs(size = (n,)))
t = t1 + np.hstack([0., J])
t = np.hstack([t, t2])
N = n1 + np.array(range(n+1))
N = np.hstack([N,n2])
# Plots
plt.step(t, N)
plt.xlabel('t')
plt.ylabel(r'$N_t$')
plt.show()


