How this calculation works
Compute finite-time count probabilities and moments for an ordinary renewal process with a finite positive-integer interarrival distribution.
P[N(t)=k]=P[S_k≤t]−P[S_{k+1}≤t]; E[N(t)]=Σ_{k≥1}P[S_k≤t].A worked example
With gap 1 probability 0.4 and gap 2 probability 0.6, the default horizon 5 gives mean renewal count 2.97344 and variance 0.4252145664.
Good to know
Distinct integer interarrival gaps 1–50 with positive normalized PMF; integer horizon 0–200. Independent identically distributed gaps, ordinary start at zero not counted, finite convolution in floating arithmetic. No zero waits, dependent intervals, stationary residual-life start or infinite-support truncation.
Reference: Siegrist: renewal arrival, count and expectation identities (opens in a new tab) ↗
Counts depend on more than an average gap
A renewal process restarts after each independent waiting time. Its finite-time count distribution depends on the full waiting-time distribution, not only on the reciprocal of its mean. Replacing random gaps by a constant average can miss both variability and the boundary effect created by the observation horizon.
This page accepts a finite probability mass function on positive integer gaps. It describes an ordinary renewal process that starts a fresh waiting time at zero. That convention differs from observing a process already in equilibrium, where the initial residual waiting time can have a different distribution from the later complete gaps.
Compare this with the Weibull age replacement expected cost rate calculator. Compute finite-time renewal-count probabilities and the renewal function for arbitrary positive integer interarrival times; the age-replacement page minimizes a long-run replacement cost rate under one continuous lifetime model.
Specify probabilities on positive integer times
Each distribution row contains one gap value and its probability. Gap values must be distinct integers between one and fifty, and positive probabilities must sum to one within the stated tolerance. Duplicate support rows are rejected so that the entered probability law has one clear mass for each waiting time.
The horizon is also an integer and uses the same time unit. Requiring positive gaps ensures that only finitely many renewals can occur by a finite horizon. Allowing zero waiting times would need extra reasoning about simultaneous renewals and potentially unbounded counts, so it is outside this implementation rather than silently rounded upward.
Convolve arrival-time distributions
Let S_k be the sum of the first k gaps, with S_0 equal to zero. Repeated convolution constructs the probabilities of S_k on the integer grid up to the chosen horizon. Mass beyond that horizon can be discarded safely for subsequent positive-gap arrivals because it can never return to an earlier time.
The event N(t) at least k is equivalent to S_k at most t. Taking the difference between successive arrival-time cumulative probabilities gives the probability of exactly k renewals. This route computes the full finite-time count distribution rather than relying on a long-run approximation such as time divided by the mean waiting interval.
Use count and renewal identities as checks
The count probabilities must be nonnegative and sum to one, subject to floating rounding. Their weighted sum supplies the expected count, and a centered second-moment calculation supplies variance. The renewal-mass table separately sums arrival probabilities by time, showing when one or more renewal orders can contribute to the same integer instant.
Expected count is checked a second way by summing the tail probabilities P(N(t) at least k). Agreement links the arrival-time convolutions to the reported count distribution. These deterministic probability identities are stronger checks than comparing the answer with a short random simulation whose sampling fluctuations may hide an implementation error.
Trace the five-unit worked example
The default gap law assigns probability 0.4 to one time unit and 0.6 to two units. At time five, the possible counts are two through five. For example, five renewals require five successive unit gaps, so that probability is 0.4 raised to the fifth power, or 0.01024.
The complete distribution gives probabilities 0.216, 0.6048, 0.16896 and 0.01024 for counts two, three, four and five. Multiplying by their counts and adding produces 2.97344. The returned variance is approximately 0.4252145664, demonstrating the uncertainty lost by replacing this law with a fixed mean gap.
Time-zero and endpoint conventions matter
The start at time zero is not itself counted as a renewal. A renewal occurring exactly at the supplied horizon is included, because the condition is S_k less than or equal to t. For horizon zero, positive waiting times make the count deterministically zero under these conventions.
A deterministic gap is another useful boundary case: the count equals the integer floor of horizon divided by that gap and its variance is zero. This example distinguishes an ordinary renewal process from a counting convention that includes the initial event, which would shift every count by one and change the reported mean.
Limit the result to the supplied law
The calculator does not estimate a gap distribution from timestamps, model dependence between gaps or approximate an infinite support by deleting its tail. An entered finite law is taken literally. If a continuous-time or censored waiting-time model is needed, converting observations into integer bins changes the question and requires an explicit modeling decision.
The bounded horizon makes the dynamic program finite even when the count support reaches two hundred. The displayed values are probability arithmetic in floating precision, not empirical frequencies or a confidence interval. Use the complete law and time convention when comparing with another implementation, especially near deterministic or endpoint cases.
A few questions, answered
Is the initial event at time zero counted?
No. This is an ordinary renewal count after time zero; the initial starting point is excluded.
Are events exactly at the horizon included?
Yes. N(t) counts renewals whose arrival time is less than or equal to t.
Can zero waiting times be used?
No. Positive integer gaps ensure a finite count support without a separate simultaneous-renewal model.
Why not divide time by the mean gap?
That is only a long-run guide and does not give the exact finite-time count distribution or its variance.