I found this exercise on a book on probability theory, and I find it problematic.
Let $(X, \Sigma, p)$ be a probability space, $\mathcal{A} \subseteq \Sigma$ a finite partition of $X$; and $\phi \in \mathbb{R}^{\mathcal{A}}$. Let $z$ be a random variable on $(X, \Sigma, p)$ such that $z(\omega) := \phi (A)$ if $ \omega \in A$ (That is, $z = \sum_{A \in \mathcal{A}} \phi (A) \mathbb{1}_A$.) Show that
$$ \mathbb{E} (z) := \sum_{A \in \mathcal{A}} \phi (A)p(A) .$$
The point is that I am not sure if I am missing something or there is something that is not explicit and should actually be explicit.
My problem is with the $\phi$ and the fact that there is no constraints on the $A \in \mathcal{A}$, i.e. I think there should be a "constraint" such that every $\phi^{-1} (a) = A \in \mathcal{A}$ for all $a \in \mathbb{R}$ in the range of $z$.
Am I right? Is the exercise not completely precise?
If not, what am I missing?
As always, any feedback is most welcome.
I am looking forward to your answers.
Thank you for your time
PS: A bit of context: the exercise comes with simple random variables.
Essential is that $z$ is measurable and integrable.
For a subset $B\subseteq\mathbb{R}$ let $\mathcal{A}_{B}:=\left\{ A\in\mathcal{A}\mid\phi\left(A\right)\in B\right\} \subseteq\mathcal{A}\subset\Sigma$.
Then $\mathcal{A}_{B}$ is a finite collection of elements in $\Sigma$ so that $\bigcup\mathcal{A}_{B}\in\Sigma$.
Now realize that $z^{-1}\left(B\right)=\bigcup\mathcal{A}_{B}\in\Sigma$.
So $z$ is a measurable function, no matter with what $\sigma$-algebra $\mathbb{R}$ is equipped.
No constraint on $\phi$ is needed here.
The expectation can be found by applying the linearity of expectation.
This especially because $\mathcal A$ is finite.
$$\mathbb{E}z=\mathbb{E}\sum_{A\in\mathcal{A}}\phi\left(A\right)1_{A}=\sum_{A\in\mathcal{A}}\phi\left(A\right)\mathbb{E}1_{A}=\sum_{A\in\mathcal{A}}\phi\left(A\right)p\left(A\right)$$
Function $z$ is labeled as simple because it only takes a finite number of values and is measurable.
When it concerns a probability space ($P(\Omega)=1$) then such a function is also integrable.