# Where does the expectation value of $x$ formula come from?

I want to understand precisely where the formula for the expectation value of $$x$$ comes from (in QM): $$\langle x\rangle=\int _{-\infty}^{\infty}\psi ^*x\psi dx$$

I know that an expectation value (in statistics) is just the sum of the products of the possible values $$f(x)$$ times their probabilities $$\rho (x)$$: $$\langle f(x)\rangle=\int f(x) \rho (x)dx$$ Since in QM mechanics the probability is given by $$|\psi|^2$$, the expectation value of $$f(x)$$ would be: $$\langle f(x)\rangle=\int f(x) |\psi|^2dx=\int f(x)\psi^*\psi dx$$ But this differs from the form above. If $$f(x)$$ was Hermitian I could use the property of Hermitian operators to "move it" into the position that it should be, but since it is not necessarily Hermitian, I don't know how to explain this difference, or how to solve it. I have consulted Griffith's QM and also online, but I cannot find an answer.

What am I missing here?

• I'm a bit confused about what your question is actually about. Where do you want to "move" $f(x)$ to? – noah Jan 18 at 17:04
• $x$ in all RHSs is just an integration variable – fqq Jan 18 at 17:12
• I want the f(x) to be between the "psi"s. Because while I could move the x, if the operator were, for example, the momentum operator, then I don't think that I could just move it, since it would be acting on the product of the "psi"s – Nick Heumann Jan 18 at 17:19
• @NickHeumann maybe instead your question should be why $\langle \hat{A}\rangle = \int dx \; \psi^* \hat{A} \psi$ in general then? – Triatticus Jan 18 at 17:35
• The momentum operator is not $-i\partial_x$ is I think the confusion? That's a position space representation. – jacob1729 Jan 18 at 17:36

In quantum mechanics, the expectation value of an observable $$\hat{O}$$ in a state $$|\Psi\rangle$$ is defined by $$\langle \Psi|\hat{O}|\Psi\rangle \quad .$$

In your case the observable is the position operator with $$\hat{x}\, |x\rangle= x\, |x\rangle$$ and $$\langle x|x'\rangle = \delta(x-x')$$. We can write its expectation value, by making use of the relation $$1 = \int \mathrm{d}x\, |x\rangle\langle x|$$, as (here in 1D)

$$\langle \Psi|\hat{x}|\Psi\rangle = \int\mathrm{d}x \int\mathrm{d}x'\, \langle \Psi|x\rangle\langle x| \hat{x}|x'\rangle\langle x'|\Psi\rangle \quad,$$

which reduces to $$\langle \Psi|\hat{x}|\Psi\rangle = \int \mathrm{d}x\, \Psi^*(x)\, x \, \Psi(x) =\int \mathrm{d}x\, x\, |\Psi(x)|^ 2 \quad ,$$ where we have defined $$\langle x|\Psi\rangle \equiv \Psi(x)$$.

Edit: As OP is asking also for the case of the momentum operator: We can make similar arguments here and find $$\langle \Psi|\hat{p}|\Psi\rangle = \int \mathrm{d}p\,p\, |\Psi(p)|^2\ \quad.$$

Edit 2: The above expectation value can also be carried out in the $$x$$-representation by using the fact that $$\langle x|\hat{p}|\Psi\rangle = -i\hbar\, \partial_x \Psi(x)$$: $$\langle \Psi|\hat{p}|\Psi\rangle= -i\hbar \int \mathrm{d}x\, \Psi^*(x)\, \partial_x \Psi(x) \quad .$$

• You don't need to insert two $x$-unity operators. One should be sufficient. – noah Jan 18 at 17:40
• You're right, thanks. – Jakob Jan 18 at 17:59

Inside the integrals, everything is a scalar, you can rearrange terms as you wish. It's a bit hard to see because you omitted the $$x$$-dependence of $$\psi$$. It really is $$\int \psi^*(x)\,x\,\psi(x) dx$$ where $$\psi(x) = \langle x|\psi\rangle$$, which clearly is a complex scalar variable, so swap stuff around any way you like.

Consider an operator $$f$$ and a state $$$$\psi(x) = \sum _n c_n \psi_n(x)$$$$ with $$\psi_n(x)$$ being eigenfunctions of $$f$$. Then you get $$$$f \psi(x) = \sum _n c_n f_n \psi_n$$$$ According to your (statistical) formula $$$$\langle f \rangle = \sum _n f_n P_n,$$$$ where $$P_n$$ is the probability of finding the system in the state $$\psi_n(x)$$, which is given by $$$$P_n = |c_n|^2.$$$$ As a result you get $$$$\langle f \rangle =\sum _n f_n |c_n|^2 = \int dx \, \psi^*(x)f\psi(x)$$$$