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.
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)
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
- 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.
- 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.
- 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.
| Calculated quantity | Synthetic result |
|---|---|
| Smallest deviation among tested averaging factors | 3.13035865344e-14 |
| Averaging factor at that minimum | 6 |
| Corresponding averaging time, seconds | 6 |
| One-sample Allan deviation | 7.5966571458e-13 |
| Drift-only deviation at selected factor | 2.12132034356e-14 |
| Original frequency samples | 240 |
| Averaging factor | Averaging time, seconds | Non-overlapping Allan deviation |
|---|---|---|
| 1 | 1 | 7.5966571458e-13 |
| 2 | 2 | 2.33302919186e-13 |
| 3 | 3 | 1.86487962606e-13 |
| 4 | 4 | 1.43797615548e-13 |
| 5 | 5 | 1.16954937676e-13 |
| 6 | 6 | 3.13035865344e-14 |
| 8 | 8 | 7.71383385604e-14 |
| 10 | 10 | 5.97094413917e-14 |
| 12 | 12 | 4.24264068712e-14 |
| 15 | 15 | 6.65492020711e-14 |
| 20 | 20 | 7.57312833163e-14 |
| 24 | 24 | 8.48528137424e-14 |
| 30 | 30 | 1.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
- 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.
- 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.
- 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.
| Calculated quantity | Synthetic result |
|---|---|
| Smallest deviation among tested averaging factors | 7.49451366286e-14 |
| Averaging factor at that minimum | 6 |
| Corresponding averaging time, seconds | 18 |
| One-sample Allan deviation | 1.3294497989e-12 |
| Drift-only deviation at selected factor | 6.36396103068e-14 |
| Original frequency samples | 240 |
| Averaging factor | Averaging time, seconds | Non-overlapping Allan deviation |
|---|---|---|
| 1 | 3 | 1.3294497989e-12 |
| 2 | 6 | 4.08699740569e-13 |
| 3 | 9 | 3.27502563308e-13 |
| 4 | 12 | 2.5388483205e-13 |
| 5 | 15 | 2.09710413301e-13 |
| 6 | 18 | 7.49451366286e-14 |
| 8 | 24 | 1.51194307038e-13 |
| 10 | 30 | 1.36301595735e-13 |
| 12 | 36 | 1.27279220614e-13 |
| 15 | 45 | 1.75213890452e-13 |
| 20 | 60 | 2.16687189442e-13 |
| 24 | 72 | 2.54558441227e-13 |
| 30 | 90 | 3.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
- 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.
- 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.
- 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.
| Calculated quantity | Synthetic result |
|---|---|
| Smallest deviation among tested averaging factors | 1.29059931086e-13 |
| Averaging factor at that minimum | 6 |
| Corresponding averaging time, seconds | 18 |
| One-sample Allan deviation | 2.01319801741e-12 |
| Drift-only deviation at selected factor | 1.14551298552e-13 |
| Original frequency samples | 240 |
| Averaging factor | Averaging time, seconds | Non-overlapping Allan deviation |
|---|---|---|
| 1 | 3 | 2.01319801741e-12 |
| 2 | 6 | 6.19270877014e-13 |
| 3 | 9 | 4.9698493965e-13 |
| 4 | 12 | 3.86589903784e-13 |
| 5 | 15 | 3.22102781931e-13 |
| 6 | 18 | 1.29059931086e-13 |
| 8 | 24 | 2.43144412952e-13 |
| 10 | 30 | 2.3130225614e-13 |
| 12 | 36 | 2.29102597104e-13 |
| 15 | 45 | 3.07929278797e-13 |
| 20 | 60 | 3.87258806901e-13 |
| 24 | 72 | 4.58205194209e-13 |
| 30 | 90 | 5.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.