I am working on a homework problem from Griffiths QM (Problem 2.11, 3rd Edition). Specifically, I'm working on finding $\left<x^2\right>$ for the ground state and the first excited state of the harmonic oscillator centered at the origin. The (time-independent) wave functions for those two states are given by $$\psi_0(x) = \left(\frac{m\omega}{\pi\hbar}\right)^{1/4}e^{-\frac{m\omega}{2\hbar}x^2}$$ and $$\psi_1(x) = \left(\frac{m\omega}{\pi\hbar}\right)^{1/4}\sqrt{\frac{2m\omega}{\hbar}}xe^{-\frac{m\omega}{2\hbar}x^2},$$ respectively. Griffiths suggests changing variables with $\xi \equiv \sqrt{\frac{m\omega}{\hbar}}x$ and $\alpha \equiv \left(\frac{m\omega}{\pi\hbar}\right)^{1/4}$, which gives $$\psi_0(\xi) = \alpha e^{-\xi^2/2}$$ and $$\psi_1(\xi) = \sqrt{2}\alpha \xi e^{-\xi^2/2}.$$
To find $\left<x^2\right>$, I thought I'd be smart and find it using the definition of $\xi$ like this: Since $x=\sqrt{\frac{\hbar}{m\omega}}\xi$, then $\left<x^2\right> = \left<\left(\sqrt{\frac{\hbar}{m\omega}}\xi\right)^2\right> = \frac{\hbar}{m\omega}\left<\xi^2\right>$. For the ground state, I'm using $$\left<\xi^2\right> = \int_{-\infty}^{+\infty}\psi_0^*(\xi)\xi^2\psi_0(\xi)d\xi$$ giving $$\left<\xi^2\right> = \frac{\alpha^2\sqrt{\pi}}{2}.$$ Finally, I get $$\left<x^2\right> = \frac{\hbar}{m\omega}\frac{\alpha^2\sqrt{\pi}}{2} = \frac{1}{2}\sqrt{\frac{\hbar}{m\omega}},$$ which I know for a fact is not correct, because, for one thing, the units aren't right (the units I'm getting are m, but I should be getting m$^2$). I've narrowed the problem down to a missing factor of $\sqrt{\frac{\hbar}{m\omega}}$ which comes from converting $dx$ to $d\xi$ in the integral, but I'm wondering, what is wrong with the following equation: $$\left<x^2\right> = \frac{\hbar}{m\omega}\left<\xi^2\right>?$$