I'm trying to track down the source of some wonky data. The data are response times (RTs) collected from humans using a computer keyboard. Here's a histogram of the RTs, binned to 1ms:
Obvious is a skew in the data, which is expected/known for such data. However, also noticeable is a slight "ghosting" of the image. Zooming in we see:
There appears to be some phenomenon such that the probability of observing an RT at a given time point fluctuates across time in a cyclical manner. This is also evident in the empirical cumulative density function (suggesting that the phenomenon is about data, not the binning algorithms of the histograms):
To determine the nature of this cyclicality, I computed the 2nd derivative of the ecdf (actually, I've never taken calculus, so I simply computed diff(diff(y)) in R), yielding the following waveform (again, zoomed in to show details):
I actually encountered a similar phenomenon in the past and at that time my googling seemed to suggest that a periodogram would help me determine the Hz values at which something was happening to cause this phenomenon. I found some R code for a periodogram:
periodogram <- function(x) {
n <- length(x)
Mod(fft(x))[1:(n%/%2 + 1)]^2 / (2*pi*n)
}
plot(
x = 1:((length(rt)/2)+1)
, y = periodogram(ddy)
, type = 'l'
)
which yields:
However, I'm not sure what the x-axis is supposed to be. Hz seems reasonable, but doesn't seem to fit with my impression from the histograms that the phenomenon has a cycle of about 100Hz. Any help providing clarification on the x-axis of this plot would be greatly appreciated.
(For those with interest in this over-and-above the math, if I do find that the phenomenon has a 100Hz or thereabouts frequency, then I'm pretty sure it can be attributable to the polling rate of the USB keyboard, plus a little random error here and there in other aspects of timing)