I am simulating Continuous time random walk in order to simulate anomalous diffusion. (python code)
x= np.zeros((time))
y= np.zeros((time))
xs = 0
ys = 0
ts = 0
alpha=0.5
for t in range(time):
while ts < t:
alpha = 0.5
#Here I simulate the waiting time according to 1/t**(1+alpha)
dt=0.01*np.power(1-np.random.rand(),-1/alpha)
theta=np.random.rand()*2*np.pi
ts += dt
xs += np.cos(theta)
ys += np.sin(theta)
x[t] = xs
y[t] = ys
coord = np.array([x,y]).T
return scale*coord
from "The Random Walk Guide to Anomalous Diffusion A Fractional Dynamics Approach" the Mean square displacement is must follow $$ <x(t)x(t+dt)> = a \times dt^{\alpha} $$ However no matter what value I take for alpha, the mean square displacement is proportionnal to t and not to $t^{\alpha}$
I don't understand where is the error
Here is a simulated trajectory: x coordinate
and the corresponding MSD in log scale with the power law of 0.5 and of 1. Mean square displacement