Expected value of sample median given the sample mean Let $Y$ denote the median and let $\bar{X}$ denote the mean, of a random sample of size $n=2k+1$ from a distribution that is $N(\mu,\sigma^2)$. How can I compute $E(Y|\bar{X}=\bar{x})$?
Intuitively, because of the normality assumption, it makes sense to claim that $E(Y|\bar{X}=\bar{x})=\bar{x}$ and indeed that is the correct answer. Can that be shown rigorously though?
My initial thought was to approach this problem using the conditional normal distribution which is generally a known result. The problem there is that since I do not know the expected value and consequently the variance of the median, I would have to compute those using the $k+1$st order statistic. But that is very complicated and I would rather not go there unless I absolutely have to.  
 A: The sample median is an order statistic and has a non-normal distribution, so the joint finite-sample distribution of sample median and sample mean (which has a normal distribution) would not be bivariate normal. Resorting to approximations, asymptotically the following holds (see my answer here):
$$\sqrt n\Big [\left (\begin{matrix} \bar X_n \\ Y_n \end{matrix}\right) - \left (\begin{matrix} \mu \\ \mathbb v \end{matrix}\right)\Big ] \rightarrow_{\mathbf L}\; N\Big [\left (\begin{matrix} 0 \\ 0 \end{matrix}\right) , \Sigma \Big]$$
with 
$$\Sigma = \left (\begin{matrix} \sigma^2 & E\left( |X-\mathbb v|\right)\left[2f(\mathbb v)\right]^{-1} \\ E\left(|X-\mathbb v|\right)\left[2f(\mathbb v)\right]^{-1} & \left[2f(\mathbb v)\right]^{-2} \end{matrix}\right)$$
where $\bar X_n$ is the sample mean and $\mu$ the population mean, $Y_n$ is the sample median and $\mathbb v$ the population median, $f()$ is the probability density of the random variables involved and $\sigma^2$ is the variance.  
So approximately for large samples, their joint distribution is bivariate normal, so we have that
$$E(Y_n \mid \bar X_n=\bar x) = \mathbb v + \rho\frac {\sigma_{\mathbb v}}{\sigma_{\bar X}}(\bar x -\mu)$$
where $\rho$ is the correlation coefficient.
Manipulating the asymptotic distribution to become the approximate large-sample joint distribution of sample mean and sample median (and not of the standardized quantities), we have
$$\rho = \frac {\frac 1nE\left(|X-\mathbb v|\right)\left[2f(\mathbb v)\right]^{-1}}{\frac 1n \sigma \left[2f(\mathbb v)\right]^{-1}} =  \frac {E\left(|X-\mathbb v|\right)}{\sigma }$$
So
$$E(Y_n \mid \bar X_n=\bar x) = \mathbb v + \frac {E\left(|X-\mathbb v|\right)}{\sigma }\frac {\left[2f(\mathbb v)\right]^{-1}}{\sigma}(\bar x -\mu)$$
We have that $2f(\mathbb v) = 2/\sigma\sqrt{2\pi}$ due to the symmetry of the normal density so we arrive at 
$$E(Y_n \mid \bar X_n=\bar x) = \mathbb v + \sqrt{\frac {\pi}{2}}E\left(\left|\frac {X-\mu}{\sigma}\right|\right)(\bar x -\mu)$$
where we have used $\mathbb v = \mu$. Now the standardized variable is a standard normal, so its absolute value is a half-normal distribution with expected value equal to $\sqrt{2/\pi}$ (since the underlying variance is unity). So
$$E(Y_n \mid \bar X_n=\bar x) = \mathbb v + \sqrt{\frac {\pi}{2}}\sqrt{\frac {2}{\pi}}(\bar x -\mu) = \mathbb v + \bar x -\mu = \bar x$$
A: Let $X$ denote the original sample and $Z$ the random vector with entries $Z_k=X_k-\bar X$. Then $Z$ is normal centered (but its entries are not independent, as can be seen from the fact that their sum is zero with full probability).  As a linear functional of $X$, the vector $(Z,\bar X)$ is normal hence the computation of its covariance matrix suffices to show that $Z$ is independent of $\bar X$. 
Turning to $Y$, one sees that $Y=\bar X+T$ where $T$ is the median of $Z$. In particular, $T$ depends on $Z$ only hence $T$ is independent of $\bar X$, and the distribution of $Z$ is symmetric hence $T$ is centered. 
Finally, $$E(Y\mid\bar X)=\bar X+E(T\mid\bar X)=\bar X+E(T)=\bar X.$$
A: The answer is $\bar{x}$.
Let $x = (x_1, x_2, \ldots, x_n)$ have a multivariate distribution $F$ for which all the marginals are symmetric about a common value $\mu$.  (It does not matter whether they are independent or even are identically distributed.)  Define $\bar{x}$ to be the arithmetic mean of the $x_i,$ $\bar{x} = (x_1+x_2+\cdots+x_n)/n$ and write $x-\bar{x} = (x_1-\bar{x}, x_2-\bar{x}, \ldots, x_n-\bar{x})$ for the vector of residuals.  The symmetry assumption on $F$ implies the distribution of $x - \bar{x}$ is symmetric about $0$; that is, when $E\subset\mathbb{R}^n$ is any event,
$${\Pr}_F(x - \bar{x}\in E) = {\Pr}_F(x - \bar{x}\in -E).$$
Applying the generalized result at https://stats.stackexchange.com/a/83887 shows that the median of $x-\bar{x}$ has a symmetric distribution about $0$.  Assuming its expectation exists (which is certainly the case when the marginal distributions of the $x_i$ are Normal), that expectation has to be $0$ (because the symmetry implies it equals its own negative).
Now since subtracting the same value $\bar{x}$ from each of a set of values does not change their order, $Y$ (the median of the $x_i$) equals $\bar{x}$ plus the median of $x-\bar{x}$.  Consequently its expectation conditional on $\bar{x}$ equals the expectation of $x-\bar{x}$ conditional on $\bar{x}$, plus $E(\bar{x}\ |\ \bar{x})$.  The latter obviously is $\bar{x}$ whereas the former is $0$ because the unconditional expectation is $0$.  Their sum is $\bar{x},$ QED.
A: This is simpler than the above answers make it.  The sample mean is a complete and sufficient statistic (when the variance is known, but our results do not depend on the variance, hence will be valid also in the situation when the variance is unknown).  Then the Rao-Blackwell together with the Lehmann-Scheffe theorems (see wikipedia ...) will imply that the conditional expectation of the median,  given the arithmetic mean, is the unique minimum variance unbiased estimator of the expectation $\mu$.  But we know that is the arithmetic mean, hence the result follows.  
We did also use that the median is an unbiased estimator, which follows from symmetry.
