  Let $T\$ be a stopping time associated with a sequence of independent random
variables $Z_{1},Z_{2},...$ . By applying a suitable change in the probability
measure we present relations between the moment or probability generating
functions of the stopping time $T$ and the stopped sum
$%S_{T}=Z_{1}+Z_{2}+...+Z_{T}$. These relations imply that, when the
distribution of $S_{T}$\ is known, then the distribution of $T$\ is also known
and vice versa. Applications are offered in order to illustrate the
applicability of the main results, which also have independent interest. In the
first one we consider a random walk with exponentially distributed up and down
steps and derive the distribution of its first exit time from an interval
$(-a,b).$ In the second application we consider a series of samples from a
manufacturing process and we let $Z_{i},i\geq 1$, denoting the number of
non-conforming products in the $i$-th sample. We derive the joint distribution
of the random vector $(T,S_{T})$, where $T$ is the waiting time until the
sampling level of the inspection changes based on a $k$-run switching rule.
Finally, we demonstrate how the joint distribution of $%(T,S_{T})$ can be used
for the estimation of the probability $p$ of an item being defective, by
employing an EM algorithm.
