Extremal point and probability Let $(X,\mathcal{F},\mathbf{P})$ be a probability space and $f \colon X \mapsto \mathbf{R}^n$ an integrable function. We assume that $f$ takes its values in a closed convex set $C$ of $\mathbf{R}^n$ and that 
$$\int_X f  \textrm{d}\mathbf{P} = x$$
is an extremal point of $C$. 
Does $f$ coincide with the constant function $x$ ? 
 A: Yes, $f=x$ almost everywhere wrt $P$. Consider the push-forward measure $\mu=f_*P$
(in probability, it is also called the distribution of $f$). It is defined as
$\mu(E)=P(f^{-1}(E))$. This $\mu$ is a probability measure on $C$. Your condition becomes
$$\int_C d\mu=x,\quad (1)$$
and this implies that $\mu$ is an atom at $x$.
EDIT. This is a special case of a theorem of Bauer 
(see, for example Phelps, Lectures on Choquet's theorem,
Proposition 1.4). Let $X$ be a non-empty compact convex set
in a locally convex space, and $x\in X$. Then $x$ is 
an extreme point if and only if the point mass at $x$ is the unique measure for which (1)
holds. Of course, you did not say that $C$ is bounded, but the reduction to this case
is easy.
A: Yes (if you mean a.e. coincidence, of course). This can be proved by induction over the dimension. The case $n=1$ is clear, and for the induction step find a closed half-space $H=\lbrace y\in\mathbb R^n: u(y)\le t\rbrace$ for a linear functional $u$ such that $C\subseteq H$ and
$u(x)=\alpha$. The one-dimensional case then implies that $u\circ f = t$ a.e., that is, $f$ takes values in the $n-1$-dimensional space $\lbrace u=t \rbrace$.
