Why is it, that if $w \sim Exp(\lambda)$ and $X$ is a random variable, then
$$ P(w<X)=E(1-e^{-\lambda X})\text{ ?} $$
I know that if $t$ is a fixed value, then $$ P(w<t) = \int _0^t \lambda e^{-\lambda s}ds = 1-e^{-\lambda t} \text{.}$$
Why is the probability of $w<X$, where $X$ is a variable, the expected value of the probability of $w<X$, where $X$ is a constant?
Certainly false without independence of $X$ and $w$. Take $X=w$ for a counterexample.
Under independence this follows by Fubini's Theorem . You are just computing the intergral of $I_{w <X}$ w.r.t. the joint distribution of $w$ and $X$ ( which is a product measure) and integrating w.r.t. $F_w$ and then w.r.t. $F_X$ gives this result.