Where the formulas come from
How an exponential time is generated
The computer only knows how to generate numbers U that are uniform between 0 and 1. To turn them into exponential times, the inverse transform method is used: set U equal to the exponential distribution function, \(F(t) = 1 - e^{-\lambda t}\), and solve for the time.
\[ U = 1 - e^{-\lambda W} \quad\Longrightarrow\quad W = -\frac{\ln(1-U)}{\lambda}. \]
Since 1 − U is also uniform between 0 and 1, \(W = -\ln(U)/\lambda\) can be used directly. The check is immediate:
\[ \begin{aligned} P(W > t) &= P\big(-\ln U > \lambda t\big) \\ &= P\big(U < e^{-\lambda t}\big) = e^{-\lambda t}. \end{aligned} \]
From the binomial to the Poisson
Split the interval [0, t] into m very small pieces, of length t/m. In each piece there is an event with probability \(\lambda t/m\), independently of the others, and never more than one. The number of events is then binomial:
\[ P(N = k) = \binom{m}{k}\left(\frac{\lambda t}{m}\right)^{k}\left(1 - \frac{\lambda t}{m}\right)^{m-k}. \]
Rearranging the factors to see what happens as m grows:
\[ \begin{aligned} P(N = k) = {} & \frac{(\lambda t)^k}{k!} \\ & \cdot \underbrace{\frac{m(m-1)\cdots(m-k+1)}{m^k}}_{\to\,1} \\ & \cdot \underbrace{\left(1 - \frac{\lambda t}{m}\right)^{m}}_{\to\,e^{-\lambda t}} \cdot \underbrace{\left(1 - \frac{\lambda t}{m}\right)^{-k}}_{\to\,1}. \end{aligned} \]
In the limit you get the Poisson distribution:
\[ P(N(t) = k) = \frac{e^{-\lambda t}(\lambda t)^k}{k!}. \]
The mean and variance come from the same limit: the binomial has mean \(m \cdot \lambda t/m = \lambda t\) and variance \(\lambda t\,(1 - \lambda t/m) \to \lambda t\). That is why, on the "Distribution of N(T)" tab, the empirical mean and variance are close to each other.
From the Poisson to the exponential, and back
The first event taking longer than t is the same as there being no event up to t:
\[ P(T_1 > t) = P(N(t) = 0) = e^{-\lambda t}, \]
which is the exponential distribution. In general, the k-th event happens before t exactly when there have been at least k events up to t, \(P(S_k \le t) = P(N(t) \ge k)\). The time \(S_k\) is the sum of k independent exponential waits and follows a gamma (or Erlang) distribution with mean \(k/\lambda\). The two descriptions, counting events or measuring waits, are equivalent; the simulator generates the process with the second and checks the first.
Memorylessness, worked out
If you have already waited a time s with nothing happening, the probability of having to wait at least t more is
\[ \begin{aligned} P(T > s + t \mid T > s) &= \frac{P(T > s+t)}{P(T > s)} \\ &= \frac{e^{-\lambda(s+t)}}{e^{-\lambda s}} = e^{-\lambda t}, \end{aligned} \]
the same as at the start. With λ = 3 events per hour, the mean wait is 20 minutes; if 20 minutes have already gone by with no event, the mean remaining wait is still 20 minutes.
The waiting-time paradox
A surprising consequence: if you arrive at an arbitrary time, the interval between events you land in lasts 2/λ on average, twice the usual length. There is no contradiction: it is easier to land in a long interval than in a short one, precisely because it takes up more time.
This affects how times are measured on the third tab. The interval in progress when T is reached is one of those "long" intervals. If it were discarded for being incomplete, the sample would be biased towards short times (with λ = 3 and T = 5, the mean would come out 7% below 1/λ, and no time could exceed T). That is why the simulator includes it in full: with all the intervals that start before T, the mean and the histogram match those of the exponential.