A sample mean is an unbiased estimator of the population mean. In other words, the expected difference between the population mean and the sample mean is zero regardless of the population distribution. In other words $E[\bar x - x_p]=0$, where $\bar x$ and $x_p$ are the sample and population mean, respectively.


Given that the population is normally distributed with variance $\sigma^2$ and knowing the sample size $n$, what is the expected absolute difference between the population mean and the sample mean?

or in mathematical form:

$$E[\space| \bar x - x_p |\space] = \space ?$$

The vertical lines stands for "absolute value"

  • $\begingroup$ I've seen this as a textbook question. Is this for a class? $\endgroup$ – Glen_b -Reinstate Monica Oct 13 '15 at 21:01
  • 1
    $\begingroup$ There's some relevant information and links in the answer to this question $\endgroup$ – Glen_b -Reinstate Monica Oct 13 '15 at 21:08
  • $\begingroup$ @Glen_b No, it is not for a class and doesn't come from a textbook. I am a PhD student in population genetics and am 1) willing to know more about stats and 2) asking this specific question in order to make vague analytical approximation of a evolutionary process of interest. Thanks for the link it will help. I am just confuse about the absence of $n$ in $\sigma \sqrt{\frac{2}{\pi}}$. $\endgroup$ – Remi.b Oct 13 '15 at 21:21
  • 1
    $\begingroup$ Remi That's because the problem at the link is for $E[|X-\mu|]$, while your problem is for $E[|\bar{X}-\mu|]$. $\bar{X}\sim N(\mu,\sigma^2/n)$; so the equivalent expectation for your problem does have an $n$ in it; specifically, the standard deviation for your mean-variable is $\sigma/\sqrt{n}$ so you must use that in place of the standard deviation of the other formula. $\endgroup$ – Glen_b -Reinstate Monica Oct 13 '15 at 21:30
  • 1
    $\begingroup$ A standard half-normal-distribution has mean $\sqrt{\frac2{\pi}}$ which you need to scale by the standard error of of the mean of $\frac{\sigma}{\sqrt{n}}$ $\endgroup$ – Henry Oct 14 '15 at 9:56

This is an addendum to @Aksakal's answer. As he points out, we need to find the value of $E|Y|]$ where $Y \sim \mathcal N(0,\sigma^2/n)$. This can be done very straightforwadly via the law of the unconscious statistician, without needing to think of $\chi$ random variables etc. We have \begin{align} E[|Y|] &= \int_{-\infty}^\infty |y|\cdot\frac{1}{(\sigma/\sqrt{n})\sqrt{2\pi}} \exp\left(-\frac{y^2}{2\sigma^2/n}\right)\,\mathrm dy\\ &= 2\int_{0}^\infty y\cdot\frac{1}{(\sigma/\sqrt{n})\sqrt{2\pi}} \exp\left(-\frac{y^2}{2\sigma^2/n}\right)\,\mathrm dy\\ &= \sqrt{\frac{2}{\pi}}\cdot \frac{\sigma}{\sqrt{n}}\int_{0}^\infty \frac{y}{\sigma^2/n}\cdot \exp\left(-\frac{y^2}{2\sigma^2/n}\right)\,\mathrm dy\\ &= \sqrt{\frac{2}{\pi}}\cdot \frac{\sigma}{\sqrt{n}}~\left[-\exp\left(-\frac{y^2}{2\sigma^2/n}\right)\right|_0^\infty\\ &= \sqrt{\frac{2}{n\pi}}\cdot\sigma \end{align}

| cite | improve this answer | |

The sample mean is going to be normal since the underlying distribution is normal. The distribution of a sample mean is $\mathcal{N}(\mu,\sigma^2/n)$.

It's easy to compute the expectation of the absolute deviation then:

$$\bar x-\mu\sim\mathcal{N}(0,\sigma^2/n)$$

All you need is the expectation of absolute value of a normal. A distribution of the absolute value of a normal distribution is called "folded normal". In our case the underlying normal (of the deviation from population) has mean zero, hence it reduces to a $\chi$ distribution with degrees of freedom 1. You can find the formulas anywhere: $$\sigma\sqrt{\frac{2}{n\pi}}$$

| cite | improve this answer | |
  • $\begingroup$ Thanks for your answer. I think I understood that as you can read in my first two sentences. I understand that the quantity $E[\bar x - x_p]=0$, where $\bar x$ and $x_p$ are the sample and population mean. I am interested in the quantity $E[\space| \bar x - x_p |\space]$, where $\space| A |\space$ denotes the absolute value of $A$. Does it make sense? $\endgroup$ – Remi.b Oct 13 '15 at 18:44
  • $\begingroup$ @Remi.b, sorry, missed the absolute value part first $\endgroup$ – Aksakal Oct 13 '15 at 19:21
  • $\begingroup$ There's certainly a closed form for the expectation of the absolute value of a normal with zero mean. Did I misunderstand what you were saying there? $\endgroup$ – Glen_b -Reinstate Monica Oct 13 '15 at 21:05
  • $\begingroup$ @Glen_b, for a zero mean it does, thanks for correction. $\endgroup$ – Aksakal Oct 13 '15 at 21:16
  • $\begingroup$ We're only dealing with the zero mean case here, though, where the distribution is a (scaled) chi-distribution with 1 df. It would seem odd to generalize the original problem to the general case of folded normals and then say the generalization doesn't have a closed form. $\endgroup$ – Glen_b -Reinstate Monica Oct 13 '15 at 21:19

Consider a normal random variable $Y$ with mean $\mu$ and variance $\tau^2$, and let $Z=\frac{Y-\mu}{\tau}$ (so $Z$ is standard normal).

$$\:\:E(|Z|)=2\int_0^\infty z\cdot \frac{1}{\sqrt{2\pi}} e^{-\frac{z^2}{2}} dz$$

$\quad$ Let $u=\frac{z^2}{2}$, so $du=z \,dz$.

$$\qquad=\frac{2}{\sqrt{2\pi}}\int_0^\infty e^{-u} du$$


Hence $E(|Y-\mu|)=\tau E(|Z|)=\tau\sqrt{\frac{2}{\pi}}$.

Let $X\sim N(\mu,\sigma^2)$. Let $Y=\bar{X}$. Then $\tau=\sigma/\sqrt{n}$.

Hence $E(|\bar{X}-\mu|)=E(|Y-\mu|)=\tau\sqrt{\frac{2}{\pi}}=\sigma\sqrt{\frac{2}{n\pi}}\quad$ ($\approx 0.8 \frac{\sigma}{\sqrt{n}}$)

| cite | improve this answer | |
  • $\begingroup$ Beat me to it by a few minutes! $\endgroup$ – Dilip Sarwate Oct 13 '15 at 21:59
  • $\begingroup$ Oh, sorry @Dilip; I'd have gladly left it for you to do. Actually, while we do essentially the same thing, it's nice that the details are different enough that the OP may benefit from the differences in exposition. $\endgroup$ – Glen_b -Reinstate Monica Oct 13 '15 at 22:01
  • $\begingroup$ Thank you guys, both of your answers were very helpful and it all make sense to me now. $\endgroup$ – Remi.b Oct 13 '15 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.