Solution (source code)

= Solution

For a normalized <wavefunction>, the <expectation value> of a function of <position> is
$$
\mathbb E_\psi(g(x))=\int_{-\infty}^{\infty}g(x)|\psi(x)|^2\,dx,
$$
provided the integral exists. For an unnormalized state, divide this expression by $\int|\psi|^2dx$. Put $b=m\omega/\hbar>0$. The <ground state> has <probability density> $\sqrt{b/\pi}\,e^{-bx^2}$, which is <even>. Thus
$$
\mathbb E_{\psi_0}(|x|)=2\sqrt{\frac b\pi}\int_0^\infty xe^{-bx^2}\,dx=2\sqrt{\frac b\pi}\left[-\frac{e^{-bx^2}}{2b}\right]_0^\infty=\boxed{\sqrt{\frac{\hbar}{\pi m\omega}}}.
$$
The zero mean <position> $\mathbb E_{\psi_0}(x)=0$ expresses symmetry, whereas this positive <expectation value> measures the mean distance from the centre.