In this paper we adopt the probabilistic mean value theorem in order to study differences of the variances of transformed and stochastically ordered random variables, based on a suitable extension of the equilibrium operator. We also develop a rigorous approach aimed at expressing the variance of transformed random variables. This is based on a joint distribution which, in turn, involves the variance of the original random variable, as well as its mean residual lifetime and mean inactivity time. Then we provide applications to the additive hazards model and to some well-known random variables of interest in actuarial science. These deal with a new notion, called the ‘centred mean residual lifetime’, and a suitably related stochastic order. Finally, we also address the analysis of the differences of the variances of transformed discrete random variables thanks to the use of a discrete version of the equilibrium operator.