Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Sensing and timekeeping

How does a known drift appear when adjacent averages are compared?

A stability curve remembers how the data were made

Source research checked . Teaching calculations are ideal models.

A time series can look quieter after averaging while still changing systematically from one interval to the next. Frequency-stability analysis therefore often compares adjacent averages rather than treating all observations as unrelated draws around a fixed mean. The chosen averaging time becomes part of the question.

This lab constructs a finite record from a repeated bounded pattern plus a linear drift. For several averaging factors, it forms non-overlapping block means and calculates half the mean squared difference between adjacent blocks. The square root is the displayed Allan deviation. The corresponding drift-only curve can be derived exactly, making the growth with averaging time easy to interpret.

The periodic pattern is disclosed because it creates its own apparent sweet spots. The minimum of this finite synthetic curve is not a statistically validated optimum for a random clock. A real analysis needs a noise model, data-quality checks, uncertainty estimates and a reason to choose overlapping or non-overlapping estimators. Inspecting the supplied record construction alongside the stability curve reveals where its apparent improvements come from.

Synthetic decision model

Start with the assumptions

  • The finite 240-point record is deterministic and fully specified by the supplied pattern, repeat count and drift.
  • Non-overlapping adjacent block means are used.
  • No white-noise or population confidence claim is attached to the repeated pattern.

Block mean at factor m = mean of m consecutive frequency samples

Non-overlapping Allan variance = one half × mean of adjacent block-mean differences squared

For pure linear drift per sample r, Allan deviation = |r|m/sqrt(2)

Synthetic a stability curve remembers how the data were made plot: Allan deviation versus Averaging time, seconds.
Synthetic baseline case. Horizontal axis: Averaging time, seconds. Vertical axis: Allan deviation. Curves show Constructed record, Linear drift alone. These are computed teaching examples, not measured hardware results.

Compare the input regimes

Each case uses invented inputs. The results follow from this model and do not describe measured hardware.

Baseline regime
Complete inputs
Sampling interval, seconds
1
Drift per sample
5e-15
Bounded fluctuation scale
1e-12
Repeated bounded pattern
-0.8, 0.5, -0.3, 1, -0.6, 0.2, -1, 0.7, 0.1, -0.2, 0.6, -0.4
Pattern repeats
20
Tested averaging factors
1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30
  1. Generate 240 samples from a declared 12-point bounded pattern repeated twenty times, plus linear drift 5e-15 per sample. This is deterministic, not simulated white noise.
  2. For each averaging factor m, form non-overlapping adjacent block means. Allan variance is one half of the mean squared difference between successive block means.
  3. The smallest tested deviation is 3.13036e-14 at m = 6, or 6 seconds. Pure linear drift would contribute deviation |slope|m/sqrt(2) = 2.12132e-14.
Baseline regime · synthetic calculated results
Calculated quantitySynthetic result
Smallest deviation among tested averaging factors3.13035865344e-14
Averaging factor at that minimum6
Corresponding averaging time, seconds6
One-sample Allan deviation7.5966571458e-13
Drift-only deviation at selected factor2.12132034356e-14
Original frequency samples240
Every tested averaging factor
Averaging factorAveraging time, secondsNon-overlapping Allan deviation
117.5966571458e-13
222.33302919186e-13
331.86487962606e-13
441.43797615548e-13
551.16954937676e-13
663.13035865344e-14
887.71383385604e-14
10105.97094413917e-14
12124.24264068712e-14
15156.65492020711e-14
20207.57312833163e-14
24248.48528137424e-14
30301.0549580598e-13

The minimum depends on the synthetic periodic pattern as well as drift. It is not a confidence-calibrated estimate of an optimal averaging time for a random clock. The exercise teaches the adjacent-average calculation and shows why a finite stability curve needs a documented data-generating process and sufficient independent information.

Comparison regime
Complete inputs
Sampling interval, seconds
3
Drift per sample
1.5e-14
Bounded fluctuation scale
1.75e-12
Repeated bounded pattern
-0.8, 0.5, -0.3, 1, -0.6, 0.2, -1, 0.7, 0.1, -0.2, 0.6, -0.4
Pattern repeats
20
Tested averaging factors
1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30
  1. Generate 240 samples from a declared 12-point bounded pattern repeated twenty times, plus linear drift 1.5e-14 per sample. This is deterministic, not simulated white noise.
  2. For each averaging factor m, form non-overlapping adjacent block means. Allan variance is one half of the mean squared difference between successive block means.
  3. The smallest tested deviation is 7.49451e-14 at m = 6, or 18 seconds. Pure linear drift would contribute deviation |slope|m/sqrt(2) = 6.36396e-14.
Comparison regime · synthetic calculated results
Calculated quantitySynthetic result
Smallest deviation among tested averaging factors7.49451366286e-14
Averaging factor at that minimum6
Corresponding averaging time, seconds18
One-sample Allan deviation1.3294497989e-12
Drift-only deviation at selected factor6.36396103068e-14
Original frequency samples240
Every tested averaging factor
Averaging factorAveraging time, secondsNon-overlapping Allan deviation
131.3294497989e-12
264.08699740569e-13
393.27502563308e-13
4122.5388483205e-13
5152.09710413301e-13
6187.49451366286e-14
8241.51194307038e-13
10301.36301595735e-13
12361.27279220614e-13
15451.75213890452e-13
20602.16687189442e-13
24722.54558441227e-13
30903.17124668791e-13

The minimum depends on the synthetic periodic pattern as well as drift. It is not a confidence-calibrated estimate of an optimal averaging time for a random clock. The exercise teaches the adjacent-average calculation and shows why a finite stability curve needs a documented data-generating process and sufficient independent information.

Extended regime
Complete inputs
Sampling interval, seconds
3
Drift per sample
2.7e-14
Bounded fluctuation scale
2.65e-12
Repeated bounded pattern
-0.8, 0.5, -0.3, 1, -0.6, 0.2, -1, 0.7, 0.1, -0.2, 0.6, -0.4
Pattern repeats
20
Tested averaging factors
1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30
  1. Generate 240 samples from a declared 12-point bounded pattern repeated twenty times, plus linear drift 2.7e-14 per sample. This is deterministic, not simulated white noise.
  2. For each averaging factor m, form non-overlapping adjacent block means. Allan variance is one half of the mean squared difference between successive block means.
  3. The smallest tested deviation is 1.2906e-13 at m = 6, or 18 seconds. Pure linear drift would contribute deviation |slope|m/sqrt(2) = 1.14551e-13.
Extended regime · synthetic calculated results
Calculated quantitySynthetic result
Smallest deviation among tested averaging factors1.29059931086e-13
Averaging factor at that minimum6
Corresponding averaging time, seconds18
One-sample Allan deviation2.01319801741e-12
Drift-only deviation at selected factor1.14551298552e-13
Original frequency samples240
Every tested averaging factor
Averaging factorAveraging time, secondsNon-overlapping Allan deviation
132.01319801741e-12
266.19270877014e-13
394.9698493965e-13
4123.86589903784e-13
5153.22102781931e-13
6181.29059931086e-13
8242.43144412952e-13
10302.3130225614e-13
12362.29102597104e-13
15453.07929278797e-13
20603.87258806901e-13
24724.58205194209e-13
30905.71105743135e-13

The minimum depends on the synthetic periodic pattern as well as drift. It is not a confidence-calibrated estimate of an optimal averaging time for a random clock. The exercise teaches the adjacent-average calculation and shows why a finite stability curve needs a documented data-generating process and sufficient independent information.

Try the reasoning: Which averaging factors align with the constructed twelve-sample pattern? Why does the resulting minimum not estimate a random-clock confidence bound?

Sources and model boundaries

  • Handbook of Frequency Stability Analysis, NIST SP 1065 ↗

    Frequency stability can be characterized through differences between averages at stated averaging times; estimator choice and noise processes matter. The supplied sequence is deterministic and periodic with an added drift. Its calculated minimum is not a population confidence result.

Back to this lab in the catalog