Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have an experiment which is executed on hundreds of computers distributed all over the world that measures the occurences of certain events. The events each depend on one another so I can order them in increasing order and then calculate the time difference.

The events should be exponentially distributed but when plotting a histogram this is what I get:

Histogram of events

The imprecision of the clocks at the computers causes some of the events to be assigned a timestamp earlier than that of the event they depend on.

I'm wondering whether the clock synchronization can be blamed for the fact that the peak of the PDF is not at 0 (that they shifted the whole thing to the right)?

If the clocks differences are normally distributed, can I just assume that the effects will compensate for one another and thus just use the calculated time diff?

share|improve this question

1 Answer

up vote 12 down vote accepted

Clock synchronization issues could indeed cause the peak to be shifted to the right. The following simulation in R shows this phenomenon. I used exponential times and normal clock differences to get a shape that roughly resembles your picture:

Clocks

The distribution to the left (the actual differences, measured without error) has its peak at 0, whereas the distribution to the right (differences measured with error) has its peak around 100.

R-code:

set.seed(20120904)

# Generate exponential time differences:
x<-rexp(100000,1/900)

# Generate normal clock differences:
y<-rnorm(100000,0,50)

# Resulting observations:
xy<-x+y

# Truncate at 500:
xy<-xy[xy<=500]

# Plot histograms:
par(mfrow=c(1,2))
hist(x[x<=500],breaks=100,col="blue",main="Actual differences")
hist(xy,breaks=100,col="blue",main="Observed differences")
lines(c(0,0),c(0,550),col="red")

If the clock differences are normal with mean 0 the differences should cancel out in the sense that the mean of the observed differences should equal that of the actual differences. Whether this is the case depends on whether there is a systematic difference between the computers where the first event occurs and the computers where the second event occurs.

share|improve this answer
3  
+1 Nicely illustrated. Mathematically, the data are drawn from the sum of the error distribution and the (presumed) exponential distribution. It is tempting to estimate the error distribution and deconvolve the data to estimate the true distribution. – whuber Sep 4 '12 at 14:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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