You first simulate plenty of exponential r.v. $X_1,X_2,...$ and then find the partial sums numerically: $T_1=X_1,T_2=X_1+X_2,...$. If the X's are Light bulb lifetimes for example then the times $T_1,T_2,...$ are the time of a bulb burnout and replacement. (We install a new bulb at time $0$.) The connection with the Poisson distribution: The number of bulb burn outs by time $1$ is a Poisson variable. Call it $N$. Then, for $n=0,1,..$
$$ P(N=n)=\frac{{e^{-\mu}}\mu^n}{n!} $$
We can simulate an observation from that distribution by just counting how many simulated burn outs were before time 1. So if $T_3\le1$ but $T_4\gt1$ then we have observed $N=3$ which is the max index $i$ of $T_i$ that occurred by time $1: max(i:T_i\le 1).$
More generally, we can look at any time $t$, not just $t=1$, and count the number of burn outs by time $t$. Call it $N(t)$. This a Poisson process for $t\ge 0 $. It has a Poisson distribution for each $t$ but with different parameters. Then $$ P(N(t)=n)=\frac{{e^{-\mu t}}{(\mu t})^n}{n!} $$
and $E(N(t))=\mu t.$
You could have, instead simulated exponentials with a specified mean, say $\beta$ instead of a rate $\mu$. These are reciprocals. Then you would have a light bulb lifetime given by $$ f(t)=\frac1\beta e^{-t/\beta}$$ These are simulated by $-\beta ln(U)$ The number of burn outs by time $t$ is then
$$ P(N(t)=n)=\frac{{e^{-t/\beta}}{(t/\beta})^n}{n!} $$
and $E(N(t))=t/\beta.$ And now suppose we count the new bulb at $t=0$, then the expected number of bulbs $installed$ in time $[0,t]$ is $E(1+N(t))=1+t/\beta.$ If a bulb costs $c$ units then the expected cost paid over $t$ hours is
$$ \frac{cE(1+N(t))} {t} $$
This converges to $\frac c \beta$ as $t \to \infty$. This is the expected cost per hour and can be used to compare different brands of bulb.
You first simulate plenty of exponential r.v. $X_1,X_2,...$ and then find the partial sums numerically: $T_1=X_1,T_2=X_1+X_2,...$. If the X's are Light bulb lifetimes for example then the times $T_1,T_2,...$ are the time of a bulb burnout and replacement. (We install a new bulb at time $0$.) The connection with the Poisson distribution: The number of bulb burn outs by time $1$ is a Poisson variable. Call it $N$. Then, for $n=0,1,..$ $$ P(N=n)=\frac{{e^{-\mu}}\mu^n}{n!} $$ We can simulate an observation from that distribution by just counting how many simulated burn outs were before time 1. So if $T_3\le1$ but $T_4\gt1$ then we have observed $N=3$ which is the max index $i$ of $T_i$ that occurred by time $1: max(i:T_i\le 1).$ More generally, we can look at any time $t$, not just $t=1$, and count the number of burn outs by time $t$. Call it $N(t)$. This a Poisson process for $t\ge 0 $. It has a Poisson distribution for each $t$ but with different parameters. Then $$ P(N(t)=n)=\frac{{e^{-\mu t}}{(\mu t})^n}{n!} $$ and $E(N(t))=\mu t.$ You could have, instead simulated exponentials with a specified mean, say $\beta$ instead of a rate $\mu$. These are reciprocals. Then you would have a light bulb lifetime given by $$ f(t)=\frac1\beta e^{-t/\beta}$$ These are simulated by $-\beta ln(U)$ The number of burn outs by time $t$ is then $$ P(N(t)=n)=\frac{{e^{-t/\beta}}{(t/\beta})^n}{n!} $$ and $E(N(t))=t/\beta.$ And now suppose we count the new bulb at $t=0$, then the expected number of bulbs $installed$ in time $[0,t]$ is $E(1+N(t))=1+t/\beta.$ If a bulb costs $c$ units then the expected cost paid over $t$ hours is $$ \frac{cE(1+N(t))} {t} $$ This converges to $\frac c \beta$ as $t \to \infty$. This is the expected cost per hour and can be used to compare different brands of bulb.