1

I am experimenting with simulated arrival times drawn from a Poisson distribution. To construct the arrival times, I am randomly drawing inter-arrival times from the inverse CDF, which is exponentially distributed.

The formula for the inter-arrival times is:

X = -(1/r) * ln(1 - p), where X is the inter-arrival time, r is the Poisson rate, and p is a randomly drawn probability between [0, 1].

A series of arrival times can be constructed as follows (in python), for r = 0.1:

import random
import numpy as np

r = 0.1

num_arrival_times = 40

arrival_time_list = []

arrival_time = 0.0
print("%.20f" % arrival_time)
arrival_time_list.append(arrival_time)

for i in np.arange(0, num_arrival_times, 1):
    p = random.random()
    inter_arrival_time = -np.log(1.0 - p) / r
    arrival_time = arrival_time + inter_arrival_time
    print("%.20f" % arrival_time)
    arrival_time_list.append(arrival_time)

Here is my question: When I take these arrival times and do a periodicity analysis on them (e.g., using Lomb-Scargle), the periodogram shows significant peaks. This is surprising to me. Is there some explanation for why the inter-arrivals drawn from a exponential distribution would appear periodic/quasi-periodic?

grover
  • 927
  • 1
  • 10
  • 21
  • 3
    Great question, however, it's off topic here; try stats.stackexchange.com instead for a conceptual question like this. Bear in mind that any finite sequence is going to have a non-uniform spectrum just by chance -- the question is, what is the distribution of power at a given frequency? Try generating many sequences, calculate the periodogram, and bin the power at each frequency. Do you find those histograms have a discernable behavior as a function of frequency? Probably someone worked it out already, but my advice is try it for yourself before consulting a reference. Good luck and have fun. – Robert Dodier Sep 06 '22 at 17:24
  • 1
    40 is a very small sample size to say much of anything about the autocovariance of a covariance stationary time series. Try 10k, or 100k. On an unrelated note, why are you writing your own inversion rather than using `numpy` to generate the exponentials? – pjs Sep 06 '22 at 18:07
  • Thanks, both of your comments were very helpful. I moved this to stats.stackexchange.com with some updates based on your suggestions. Feel free to close this thread. – grover Sep 06 '22 at 19:10

0 Answers0