Simulating an Exponential Variable Conditional on a Finite Interval
Summary
The document derives a way to sample from an exponential distribution conditional on the value falling between zero and a finite upper bound. It first writes the conditional cumulative distribution as the probability of an exponential draw being below a candidate value, divided by the probability that the draw is below the upper bound. Applying the inverse transform to a uniform random variable then gives a sample from this truncated distribution.
The method depends on the exponential rate parameter and the interval limit, and the stated formula is intended for a positive finite bound. It is useful when simulations need exponential waiting times or other exponential quantities restricted to a known range. The answer provides the derivation through the conditional distribution and inverse transform, but no numerical example, implementation guidance, or discussion of numerical precision for extreme parameter values. The result is a conditional exponential sample, not an ordinary untruncated exponential draw.
Key ideas
- Conditioning an exponential variable to lie below a bound requires dividing its cumulative probability by the probability of lying below that bound.
- The conditional distribution can be sampled by applying its inverse cumulative distribution to a uniform draw.
- The rate parameter and upper bound determine the resulting truncated sample distribution.
- The procedure generates conditional values and does not produce samples from the unbounded exponential law.
Tags
Full text
# How to simulate the exponential law over an interval of the form [0,T]?
# How to simulate the exponential law over an interval of the form [0,T]?
How do you simulate an exponential random variable over an interval $[0, T]$ with $T > 0$?
## Answer by M. Jeunesse (score 4)
https://quant.stackexchange.com/a/31560
You should post on mathematics.stackexchange
I answer but I should not.
Let $X $ be an exponential r.v. of parameter $\lambda $ $$P (X<u|X <T)=\frac {P (X<min (u,T))}{P (X <T )} $$ So for $0\leq u\leq T$ $$P (X<u|X <T)=\frac {1-\exp (-\lambda u)}{1-\exp (-\lambda T)} $$
So if $U $ is an uniform on $ [0,1]$ then $$Y= -\frac {1}{\lambda }\ln\left (1-U (1-\exp(-\lambda T))\right) $$ is an exponential r.v. of parameter $\lambda $ conditionned to be on $[0,T] $Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.