0
$\begingroup$

There are one or two questions here that ask how to assess data correlation. The data tends to be empirical.

Is there some tool or standardised technique for generating correlated data from scratch? Some way of generating a sequence with an exact amount of known correlation or autocorrelation? It would allow quantitative testing, training and assessment of correlation measurement tools. Or do people just wing it and knock something up Pythonic?

$\endgroup$
1
$\begingroup$

Remember that the power spectral density (PSD) of anything is the Fourier transform of the autocorrelation function of that process.

Hence, if you want a defined autocorrelation function (ACF), do its inverse Fourier transform, and you'll get a PSD that would represent a signal of given ACF.

Now, you can use all the beautiful methods of filter design to come up with a filter that, when applied to a white process (e.g. random numbers from a random number generator) will shape that process's PSD as desired!

So, that's kind of the general look at things: If you just want something like

"Each sample should be correlated much with the previous one, but only slightly with the one before"

then maybe understanding it as roughly

$$y[n] = 0.9x[n] - 0.1x[n-1]$$

would get you there quicker: $(0.9, 0.1)$ is actually the coefficient vector of a FIR filter that you can apply to your uncorrelated input vector $x$ and be done with it.

$\endgroup$
  • $\begingroup$ So you wing it then? Nothing pre-made in the SP world? $\endgroup$ – Paul Uszak Nov 17 '18 at 0:30
  • $\begingroup$ Not quite sure what you mean with "wing it". I think the first described procedure is pretty clear and well-structured. Are you expecting something different? $\endgroup$ – Marcus Müller Nov 17 '18 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.