Conditional expectation conditioned on an Indicator variable Suppose I have a random variable $u$ that is standard uniformly distributed.
And I have an indicator variable $S_{i}=1\left(V_{i}>0.5\right)$.
Now I am interested in the following conditional expectation.
$\mathbb{E}\left[u\mid S_{i}=1\right]$.
Now $u$ is continuous whereas $S_i$ is discrete.
I do know that when X and Y are both continoious $E[X \mid Y=y]=\int_{-\infty}^{\infty} x f_{X \mid Y}(x \mid y) d x$. And if X and Y are both discrete $E[X \mid Y=y]=\sum_{x} x f_{X \mid Y}(x \mid y)$
However, I am not sure how to write $\mathbb{E}\left[u\mid S_{i}=1\right]$ as either a summation or integral.
I am trying to find
$\mathrm{ATET}=-\delta_0\cdot \mathbb{E}\left[u^2\mid S_{i}=1\right]+\delta_1\cdot \mathbb{E}\left[u\mid S_{i}=1\right]+\delta_2$
Where I know the joint distribution
\begin{equation}
F_{U, V}(u, v)=u v+\theta u(1-u) v(1-v)
\end{equation}
And u and v are uniformly distributed on [0,1]
When I follow your proposition I obtain
$\frac{1}{2}\int_0^1u*1du=\frac{1}{4}$
However this does not seem to be a right solution to me

"$S_i=1$" is exactly the event $E = \{V_i>0.5\}$ so the conditional expectation is given by
$$\mathbb{E}\left[u\mid S_{i}=1\right] = \frac{1}{\mathbb P(E)}\int_E xf(x)dx $$
Where $f$ is the pdf of $u$.
