I have been given the mean and variance. I need to produce a deterministic random walk from the given variables. These are the expected properties for the time series data:
- Mean: 27.57020098
- Median: 27.815
- Std Dev.:5.106888439
- Variance:26.08030952
- Maximum: 43.92
- Minimum: 0
- Range: 43.92
I've tried the following,
steps = np.random.normal(loc=0, scale=5.034, size=1000) #std =5.304
steps[0]=0
P = 27.50 + np.cumsum(steps) #mean =27.5
plt.plot(P)
plt.title("Simulated Random Walk")
plt.show()
Which produces,