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?
Thanks.
 A: Here's two suggestions (one easy, one hard)
Easy, but rigorous: For a normal distribution the sample mean is an unbiased estimator for the mean,i.e., $E(\bar X) = \mu$. However, since a normal distribution is symmetric, any estimator for the mean is also an estimator for the median. Therefore, $E(\bar X)=\mu=p_{0.5}$. However, the sample median (Y per your notation) is also an unbiased estimator of the sample mean and median under a normal distribution, therefore $E(Y)=\mu=p_{0.5}$. Now, lets say that the sample mean equals $\mu$. Where will the samples be located? They will be arranged so that their sum is equal to $N\mu$. However, for every set of values with a mean of $\mu$, it is equally likely to see the reflection of your sample values about the sample mean, hence for every median $<\mu$ you have another median the same distance above $\mu$. This argument only works for when the sample mean is exactly $\mu$. For sample means above $\mu$, it will be more likely that the median will be below the sample mean, while it will be the opposite for when the sample mean is below the true mean. 
However, the sample mean is equally likely to be above the true mean by some error "e" as below the mean by the same error "e", so $P(\bar X \leq \mu-e)=(\bar X > \mu+e)$ by symmetry of the normal distribution. Hence, the bias of the sample median relative to the sample mean averages out to 0. Therefore, when you average across all scenarios that prodcue a particular mean value, you end up with the conditional expected value of the sample median given the sample mean being equal to the sample mean.
Hard way: You need to derive the distribution of the median using this formula then calclulate the expected value of the median given a sample of size N. You should get that the expected value of the median given a sample of size N is the sample mean. Therefore, conditioning on the sample mean should not affect the expected value.
A: I think this can be seen easiest using the symmetry of the normal distribution about the mean: Let $X$ be a random vector of size $n$ where all its entries are i.i.d. with distribution $N(\mu,\sigma^2)$. Now first observe that conditional on $\operatorname{mean}(X)=\mu_0$ the distribution of $\operatorname{med}(X-\mu_0)$ is symmetric about zero:
\begin{align}
-\operatorname{med}(X-\mu_0)&=-\operatorname{med}((X-\mu)-\operatorname{mean}(X-\mu))\\
&=\operatorname{med}(-(X-\mu)-\operatorname{mean}(-(X-\mu)))\\
&\sim\operatorname{med}((X-\mu)-\operatorname{mean}(X-\mu))\\
&=\operatorname{med}(X-\mu_0),
\end{align}
where the first and last equations follow from the conditional and "$\sim$" denotes being equal in distribution. Here we used the fact that the distribution of $X$ is symmetric about $\mu$, i.e. $X-\mu\sim-(X-\mu)$. Consequently we have that the conitional expectation of $\operatorname{med}(X-\mu_0)$ vanishes:
\begin{equation}
\operatorname{E}(\operatorname{med}(X-\mu_0)\mid\operatorname{mean}(X)=\mu_0)=0.
\end{equation}
Putting it all together we obtain
\begin{align}
\operatorname{E}(\operatorname{med}(X)\mid\operatorname{mean}(X)=\mu_0)&=\operatorname{E}(\operatorname{med}(X-\mu_0)\mid\operatorname{mean}(X)=\mu_0)+\mu_0\\
&=\mu_0.
\end{align}
As mentioned at the beginning note that this holds true for any distribution of the entries of $X$ as long as they are symmetric about the true mean $\mu$.
