# Are arrivals uniformly distributed over a time interval when inter-arrival times are poisson distributed

Assume a fixed time horizon $$T$$ and suppose that inter-arrivals times at a queue (during the time horizon $$T$$) are poisson distributed with arrival rate $$\lambda$$. Will the arrivals be uniformly distributed over $$T$$?

• Are you asking whether a variable can simultaneously have a poisson and a uniform distribution? – rolando2 Apr 23 '20 at 12:31

Will the arrivals be uniformly distributed over $$T$$?

No -- and yes.

In any one realization of this process the arrival times will be random. They usually will not be uniformly spread throughout the time interval. Here is an example: Times are shown as a fraction of the threshold $$T$$. The arrival times in this realization were approximately at $$0.33,$$ $$0.38,$$ $$0.40,$$ and $$0.81$$ times $$T$$, as shown by the horizontal locations of the dots (and the corresponding vertical lines through them, just for emphasis). This obviously is a non-uniform distribution of times.

But when we allow this process to repeat, independently, over the same interval of time, we may track the arrival times during each of these "trials." For instance, here are the first of many trials: As before, the horizontal positions of the dots indicate arrival times. The colors differentiate the trials. The vertical lines now accumulate visually to show all the arrival times at once. They still are not uniformly distributed, but they come closer to filling the time interval. (Of note is trial 7 in which no arrivals occurred in the interval from $$0$$ to $$T.$$)

The nature of the underlying process is revealed by examining a great many such trials. Once again, the colors differentiate the trials. Now the accumulated arrival times (of which $$5\times 1000$$ are expected and $$5094$$ were realized due to the randomness) display a much more uniform distribution.

There are various equivalent ways to simulate these trials. I did it by generating sequences of inter-arrival times according to an exponential distribution as explained (starting from first principles) at https://stats.stackexchange.com/a/215253/919. In this sense any given trial gives a non-uniform distribution of arrival times because the spacings between them clearly vary erratically (albeit randomly) according to the highly skewed exponential distribution.

The simulation could also be done by creating a huge number of values between $$0$$ and $$T$$ that are equally spaced out -- that is, perfectly uniform -- and sampling them randomly. The quantity $$N$$ to sample must itself be a random number given by a Poisson distribution. This is an explicitly uniform distribution because it consists of $$N$$ realizations of a uniform random variable.

I hope this example helps illuminate the distinction between a single realization of a random process and its underlying "ensemble average." The latter is what the third figure approximates. It's a theoretical construct used to understand and analyze individual realizations of the process.

For those interested in the details, or who wish to generate more realizations of Poisson processes, here is R code to generate more figures.

#
# Specify the size and parameters of the simulation.
#
n.trials <- 1000
lambda <- 5
threshold <- 1
#
# Perform the simulation.
#
m <- ceiling(lambda + 3*sqrt(lambda))
X.list <- lapply(1:n.trials, function(i) {
#
# Sample inter-arrival times until exceeding threshold.
#
y <- c()
repeat {
y <- c(y, rexp(m, lambda))
x <- cumsum(y)
if(x[length(x)] >= threshold) break
}
#
# Return only the times up to threshold.
#
j <- x <= threshold
data.frame(time=x[j], trial=rep(i, sum(j)))
})
X <- do.call(rbind, X.list)
#
# Prepare for plotting.
#
library(ggplot2)
X$$Trial <- factor(X$$trial) # Automatically results in nice colors
ordinals <- c("One", "Two", "Three", "Four", "Five",
"Six", "Seven", "Eight", "Nine", "Ten") # For the title
#
# Plot selected subsets of the trials.
# (Plots of more than a few hundred may require a wait on some systems.)
#
for (N in c(1, 7, 100)) {
n <- min(N, n.trials)
G <- ggplot(subset(X, trial <= n), aes(time, trial)) +
coord_cartesian(xlim=0:1, ylim=c(1,n) + 0.25*c(-1,1), expand=FALSE) +
geom_hline(yintercept=1:n.trials, col="white") +
geom_vline(aes(xintercept=time, color=Trial), alpha=1/2, show.legend=FALSE) +
geom_point(aes(fill=Trial), shape=21, show.legend=FALSE) +
theme(panel.grid.minor.y = element_blank(),
panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_blank()) +
ggtitle(paste0(ifelse(n<=length(ordinals), ordinals[n], as.character(n)),
ifelse(n==1, "", " Independent"),
" Realization", ifelse(n==1, "", "s"),
" of a Poisson(", lambda, ") Process"))
print(G)
}


If there are $$N_t \sim \mathsf{Pois}(\lambda t)$$ events in interval $$(0, t),$$ with $$t > 0,$$ then their interarrival times will be $$X \sim \mathsf{Exp}(\lambda).$$ Consider the event "no arrivals" in small time interval $$(0,t).$$ Then that can be written as $$P(N_t = 0) = \lambda t e^{-\lambda t}/0! = \lambda t e^{-\lambda t}.$$

Alternatively, the even can be written as $$P(X > t) = e^{-\lambda t}$$ or $$F_X(t) = P(X \le t) = 1 - e^{-\lambda t},$$ so that $$f_x(t) = \lambda e^{-\lambda t}.$$

For more on relationships among uniform, Poisson, and exponential distributions, look here and here.

In view of the first link, consider the following simulation, in which distances between sorted uniformly distributed points in $$(0,1)$$ are exponentially distributed. (The simulation cheats slightly because there are exactly 1000 points.)

set.seed(2020)
u = runif(1000)
x = diff(sort(u))
hist(x, prob=T, ylim=c(0,1000), col="skyblue2") 