Tom Pollard wrote:
> On Oct 31, 2006, at 1:05 AM, Tom Pollard wrote:
>
> Out of curiosity, I tried translating Cameron's method into my code.
> (This mainly involved working in units of minutes, rather than
> seconds).   I found it produces the following distribution,
>
> Cameron's method
> * Choose offset uniformly from the set [-5..1], , but don't change
> the reported time if the chosen offset would cause it to retrogress.
> -5   -4   -3   -2   -1    0    1    2    3    4    5
> 0.0  1.2  7.2 18.1 28.4 28.3 16.7  0.0  0.0  0.0  0.0

That part of my code is kind of obsfuscated, but what it actually does
is choose an offset uniformly from the set [-20..5], but don't change
the reported time if the chosen offset would cause it to retrogress.
This would be roughly equivalent to saying: do not choose a new offset
60% of the time. Otherwise, choose from the set [-5..+5] but don't
retrogress below the low-water-mark.

> The results are reasonably balanced, centered more-or-less
> symmetrically around minus a half-minute.
> Also, in this scheme, the reported time can /never/ be more than one
> minute ahead of the actual time.

I got the following if I keep track of the difference between fuzzy
time and actual time:

-5 -> 2.122
-4 -> 5.981
-3 -> 9.366
-2 -> 11.655
-1 -> 12.912
0 -> 12.757
1 -> 11.935
2 -> 10.175
3 -> 7.987
4 -> 5.873
5 -> 9.237

> > Method 3
> > * Changes offset randomly by +/- one minute on each update, but
> > don't change the reported time if the chosen offset would cause it
> > to retrogress.
> >
> > -5   -4   -3   -2   -1    0    1    2    3    4    5
> > 9.2  9.4  9.6  9.3  9.1  8.8  9.1  9.0  8.8  8.8  9.0

I like that. Simple, with good results.

Cheers!
-Cameron