TITLE: Dividing by an almost-surely positive random variable
QUESTION [5 upvotes]: I am reading Shreve's "Stochastic Calculus for Finance II".  In it, he states (Theorem 1.6.1) that if $Z$ is an almost-surely strictly positive random variable on a probability space $(\Omega, \mathcal F, P)$ with $E(Z) = 1$, then the probability measure defined as $\widetilde P(A) := \int_A Z d P$ satisfies
$$
E(Y) = \widetilde E(Y/Z)
$$
for any random variable Y (here E and $\widetilde E$ are the expected values in the respective measures).  I don't understand the meaning of this expression; $Y/Z$ is not a random variable since there may be $\omega \in \Omega$ upon which $Z$ vanishes.
Is $Y/Z$ a valid expression, or is it shorthand for something more rigorous?

REPLY [6 votes]: EDIT: Replacing $\tilde \cdot$ (tilde) by $\widetilde \cdot$ (wide tilde); for some reason still does not appear like a (wide) tilde.
To complete Nate's answer, it is important to consider here $Y/Z$ and $\tilde E(Y/Z):=\int_\Omega  {(Y/Z)d\tilde P} $ with respect to the probability measure $\tilde P$. As Nate noted, there is no problem with $Y/Z$ with respect to the probability measure $P$ (since $P(Z=0)=0$). Let's see that there is also no problem with respect to $\tilde P$, which amounts to showing that $\tilde P(Z=0)=0$. Indeed, let $A$ denote the event $\{Z=0\}:=\{ \omega \in \Omega : Z(\omega) = 0\}$. Then,
$$
\tilde P(Z=0) = \tilde P(A) := \int_A {ZdP} = \int_A {Z(\omega )dP(\omega )}.
$$
So, there is no problem here for two (independent) reasons. First, by definition, $Z(\omega) = 0$ for $\omega \in A$, hence 
$$
\int_A {Z(\omega )dP(\omega )} = \int_A {0dP(\omega )} = 0.
$$
Second, by assumption, $P(Z=0)=0$, that is $P(A)=0$; hence, $\int_A {ZdP} = 0$ (recall from measure theory that $
\int_E {fd\mu }  = 0$ if $\mu(E)=0$).