# Formalizing conditional expectation

I need help to translate into a conditional exepectation the following problem:

We have an interval of $$\mathbb{R}$$ of size M (say $$\mathcal{M} = [0, M]$$). For each element $$x \in \mathcal{M}$$ I define $$\theta(x)$$ which is the score of each element of my interval. I want these scores to follow a given distribution with cdf $$F$$. For each subset $$\mu$$ of $$\mathcal{M}$$, I would like to define the average value of $$\theta$$ over this subset.

$$\mathbb{E}\left[\theta(x) \left|x \in \mu \right. \right]$$

How can I calculate this? My first intuition is to do

$$\int_{x \in \mu(x)}{\theta(x) dF(x)}$$

But it just seems like I am mixing different measures. I would really appreciate some help to formalize this and relate this to the theory of probability.

• The average value of the function $\theta:x\mapsto\theta(x)$ over the set $\mu\subseteq\mathcal M$ of positive measure $|\mu|$ is by definition $$\frac1{|\mu|}\int_\mu\theta(x)\,dx$$ Nothing probabilistic in there. – Did Dec 7 '18 at 19:22
• $\theta$ is a random variable. – Tochoka Dec 7 '18 at 20:57