
A question on X validated about the probabilistic version of the mean value theorem brought me to the corresponding Wikipedia page with the explanation that, for measurable and differentiable functions g, when X and Y are positive random variables such X is stochastically dominated by Y and E[X] < E[Y], there exists a random variable Z such that
What proves more interesting, however, is that this random variable has density
which writes as a signed mixture of the densities proportional to Pr(Y>x) and Pr(X>x), with normalizing constants E[Y] and E[X}, and which correspond to the densities of the stationary excess variables for Y and X, respectively. (Also called residual lifetimes, which are the stationary times one need wait until the next event, when the durations between two events are distributed as Y and X, respectively.) And roughly corresponds to the extra excess time (waiting for bus Y, assuming bus X has passed in the meanwhile). A 1999 paper by Di Crescenzo provides more properties of Z, albeit not achieving a complete characterization of this random variable beyond the “stationary distribution of the difference between the current time and the last occurrence of a repair, conditional on the current state (broken or not)” in a setup with two point processes corresponding to “a repairable component that is alternately ‘up’ or ‘down’, with working and repair episodes.



![I came across this question about truncated Normal simulation on X validated, pointing out at a 1963 [AX II!] Boeing technical report by George Marsaglia! The proposal uses a translated Exponential variate with scale 2, and then takes the squared root. This is an alternative of my (1995) [and John Geweke's (1993)] proposal using a translated Exponential variate with optimised scale and I wonder which solution is better. Presumably Marsaglia's, especially since the scale of 1/2 is the optimal one! Fodder for the next Monte Carlo exam, possibly, if my students do not come across this 'Og entry.](https://i0.wp.com/xianblog.fr/wp-content/uploads/2024/09/temp-4.png?resize=450%2C340&ssl=1)