# Generate random numbers for each time-step that are correlated

I want to generate Gaussian distributed random numbers, but i want them to be correlated, e.g $E[\epsilon(t)\epsilon(t')]=C(t-t')$ where $C$ is some function and $E[\cdot]$ denotes the expectation value.

Is it possible to do this?

• How about using BinormalDistribution? – Ruud3.1415 Jul 20 '17 at 16:18
• You need to clarify your question. E.g. from the question title and formula it seems that $\epsilon$ is a time-dependent function... – Anton Antonov Jul 20 '17 at 16:28
• Thanks for the answers! I thought that $\epsilon(t)$ could be gaussian distributed for every time t, but that $E[\epsilon(t)\epsilon(t')]$ is not zero. but u are right...i dont want it to be gaussian distributed, i just want the condition that: $E[\epsilon(t)]$ exists for any t, $E[\epsilon(t),\epsilon(t')]=C(t-t')$ and that higher moments vanish...and then i want to have a for each time t some values that fullfill these conditions – Martin Jul 20 '17 at 17:10
• You can use the fact that the Fourier transform of a stationary Gaussian process is also Gaussian but uncorrelated in frequency space: $\langle \hat{\epsilon}(\omega ) \hat{\epsilon}(\omega ') \rangle = \hat{C}(\omega ) \delta ( \omega - \omega ' )$, allowing you to generate the Fourier components $\hat{\epsilon} ( \omega )$ as independent Gaussians with variances $\hat{C} ( \omega )$. – ulvi Jul 22 '17 at 5:30