Textbook example: Losses on an insurance policy are uniformly distributed on [0, 10000]. A policy covering these losses has a 1000 deductible. Calculate the average payment made by this policy for each loss.
Textbook solution: Let $X$ be the loss, $Y = \text{max}\{0, X - 1000\}$ be the payment. Condition on the loss being above or below 1000. Then
$$E[Y] = P[X \leq 1000]E[Y| X \leq 1000] + P[X \geq 1000]E[Y|X \geq 1000].$$
If the loss is below 1000, then the payment is 0, so the mean payment is 0. If the loss is greater than 1000, then the payment is uniform on [0, 9000], so the mean payment is 4500.
$$E[Y] = P[X \leq 1000](0) + P[X \geq 1000](4500)$$
The probability that $X$ is greater than 1000 is $1 - F(1000) = 1 - 1000/10000 = 0.9$. Therefore
$$E[Y] = (0.9)(4500) = 4050.$$
My solution: Now if I was doing this on my own I would have proceeded as follows:
$X$ follows a uniform distribution on [0, 10000] so that the pmf of $X$ is 1/10000. The payment amount $Y$ is a piecewise function defined in terms of $X$. It is $0$ if $X \leq 1000$ and it is $X - 1000$ if $X > 1000$.
Using double expectation we have that
$$E[Y] = E_X[E[Y|X]] = P[X \leq 1000]E[Y| X \leq 1000] + P[X > 1000]E[Y|X > 1000].$$
The probabilities $P[X \leq 1000]$ and $P[X > 1000]$ are gotten by integrating 1/10000 over the intervals $[0,1000]$ and $[1000, 10000]$, respectively, to get $1/10$ and $9/10$.
Question: But now I'm confused about how to formally find the remaining conditional expectations. By my definition of conditional expectation in the continuous case, which is new to me and have never used for inequalities, I would have that
$$E[Y| X \leq 1000] = \int_0^{9000} y \cdot f_{Y|X}(Y|X \leq 1000)\, dy.$$
And for $f_{Y|X}(Y|X \leq 1000)$ I have by my definition of conditional distribution that
$$f_{Y|X}(Y|X \leq 1000) = \frac{f(y,x)}{f_X(x \leq 1000)}.$$
If this is correct then how would I find the numerator? The denominator is just $\int_0^{1000} 1/10000 \, dx = 1/10$.