Mean value of a map into Banach space

Let $(X,\mu)$ be a measure space with $\mu(X)<\infty$. Let $(Y,\|\cdot\|)$ be a Banach space. Given a Bochner integrable map $f:X\to Y$ with $\|f\| \in L^2(X,\mu)$. The mean value of $f$ over $X$, denoted by $f_X$, is defined by $$\frac{1}{\mu(X)}\int_{X}fd\mu.$$

Question: Is it true that $f_X$ is a minimum of the function $$Y\ni y \mapsto \int_X \|f(x)-y\|^2 d\mu(x) ?$$

• I don't see a reason to expect this if $Y$ is not a Hilbert space. I would try $Y=\mathbb R^2$ with $\|(y_1,y_2)\|=\max \lbrace |y_1|,|y_2|\rbrace$. – Jochen Wengenroth Apr 3 '17 at 7:05
• @JochenWengenroth Thanks for the comment. If $Y$ is a Hilbert space, then the question is true ? – user84068 Apr 3 '17 at 8:53
• if $Y$ is a Hilbert space so is $L^2(X,\mu, Y)$; you are minimizing the Hilbert distance from $f$ to the linear subspace of the constant functions, whose orthogonal projector $P$ maps any $f$ to the mean $Pf$ you wrote, and the unique minimum $y$ is $Pf$. – Pietro Majer Apr 3 '17 at 20:18
• @PietroMajer Understood. Many Thanks! – user84068 Apr 4 '17 at 6:38