GenerateRandomSearch

Autocorrelated Series Generator

Most standard errors assume your observations are independent. Time series routinely are not: today's value carries yesterday's, and that persistence makes a series look far more informative than it is. This builds a first-order autoregressive series with the persistence you choose, then reports the correlation actually measured in the sample — which is a different number, and the gap between the two is worth seeing.

What this generator does

Builds a first-order autoregressive series: each value is the previous one multiplied by the persistence, plus fresh normal noise. The series starts at the stationary variance so it does not need to burn in. It then measures the lag-1 correlation in the finished sample, and measures it again on the first differences for contrast.

How to use this tool

  1. Choose a length and a persistence value between 0 and 95%.
  2. Generate and look at the shape: high persistence wanders, low persistence jitters.
  3. Compare the measured lag-1 correlation with the value it was built from.
  4. Read the differenced figure — differencing removes persistence, and overshoots when there was little.

Understanding the controls

How many rows
Between 20 and 400. Short series measure persistence very imprecisely, which is itself worth demonstrating.
Persistence phi
Between 0 and 95%. Zero is white noise; high values wander for long stretches without returning.
Seed
Any word reproduces the same series and the same measured correlation.

Common use cases

  • Teaching why independence matters for a standard error
  • Generating realistic-looking series for a forecasting exercise
  • Showing the difference between a wandering series and pure noise
  • Test data for an autocorrelation or differencing implementation
  • Setting the same series twice from a seed

How this generator works

The recursion is the standard AR(1) form, driven by Box–Muller normals so a seed reproduces the series exactly. The first value is drawn from the stationary distribution rather than from zero, which avoids the artificial trend a burn-in period would otherwise leave at the start. The measured correlation is the Pearson correlation between the series and itself shifted by one, recomputed from the finished values rather than carried through from the construction.

Randomness and fairness

The noise is random; the persistence is a parameter and the measured correlation is computed from the result. A seed reproduces the series exactly and is therefore explicitly not cryptographically secure. Without a seed the browser's cryptographically secure generator is used.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • First-order only — AR(2) and moving-average terms produce different shapes.
  • The measured correlation will not equal the process value, and at short lengths can be far from it.
  • Phi is capped below 1: at exactly 1 the series is a random walk and never settles.
  • No seasonality here; the seasonal series generator covers that separately.
  • A generated series is gone on reload; the seed is what reproduces it.

Privacy and your data

The series is generated and measured entirely in your browser. Nothing about the data or your seed is transmitted or kept.