# Expectation value (quantum mechanics)

In quantum mechanics, the expectation value is the probabilistic expected value of the result (measurement) of an experiment. It can be thought of as an average of all the possible outcomes of a measurement as weighted by their likelihood, and as such it is not the most probable value of a measurement; indeed the expectation value may have zero probability of occurring (e.g. measurements which can only yield integer values may have a non-integer mean). It is a fundamental concept in all areas of quantum physics.

## Operational definition

Consider an operator $A$. The expectation value is then $\langle A\rangle =\langle \psi |A|\psi \rangle$ in Dirac notation with $|\psi \rangle$ a normalized state vector.

## Formalism in quantum mechanics

In quantum theory, an experimental setup is described by the observable $A$ to be measured, and the state $\sigma$ of the system. The expectation value of $A$ in the state $\sigma$ is denoted as $\langle A\rangle _{\sigma }$.
Mathematically, $A$ is a self-adjoint operator on a separable complex Hilbert space. In the most commonly used case in quantum mechanics, $\sigma$ is a pure state, described by a normalized vector $\psi$ in the Hilbert space. The expectation value of $A$ in the state $\psi$ is defined as
If dynamics is considered, either the vector $\psi$ or the operator $A$ is taken to be time-dependent, depending on whether the Schrödinger picture or Heisenberg picture is used. The evolution of the expectation value does not depend on this choice, however.
If $A$ has a complete set of eigenvectors $\phi _{j}$, with eigenvalues $a_{j}$ so that $A=\sum _{j}a_{j}|\phi _{j}\rangle \langle \phi _{j}|,$ then (1) can be expressed as
This expression is similar to the arithmetic mean, and illustrates the physical meaning of the mathematical formalism: The eigenvalues $a_{j}$ are the possible outcomes of the experiment, and their corresponding coefficient $|\langle \psi |\phi _{j}\rangle |^{2}$ is the probability that this outcome will occur; it is often called the transition probability.
A particularly simple case arises when $A$ is a projection, and thus has only the eigenvalues 0 and 1. This physically corresponds to a "yes-no" type of experiment. In this case, the expectation value is the probability that the experiment results in "1", and it can be computed as
In quantum theory, it is also possible for an operator to have a non-discrete spectrum, such as the position operator $X$ in quantum mechanics. This operator has a completely continuous spectrum, with eigenvalues and eigenvectors depending on a continuous parameter, $x$. Specifically, the operator $X$ acts on a spatial vector $|x\rangle$ as $X|x\rangle =x|x\rangle$. In this case, the vector $\psi$ can be written as a complex-valued function $\psi (x)$ on the spectrum of $X$ (usually the real line). This is formally achieved by projecting the state vector $|\psi \rangle$ onto the eigenvalues of the operator, as in the discrete case ψ(x)≡⟨x|ψ⟩{\textstyle \psi (x)\equiv \langle x|\psi \rangle }. It happens that the eigenvectors of the position operator form a complete basis for the vector space of states, and therefore obey a completeness relation in quantum mechanics: $\int |x\rangle \langle x|\,dx\equiv \mathbb {I}$
The above may be used to derive the common, integral expression for the expected value (4), by inserting identities into the vector expression of expected value, then expanding in the position basis:
    ${\begin{aligned}\langle X\rangle _{\psi }&=\langle \psi |X|\psi \rangle =\langle \psi |\mathbb {I} X\mathbb {I} |\psi \rangle \\&=\iint \langle \psi |x\rangle \langle x|X|x'\rangle \langle x'|\psi \rangle dx\ dx'\\&=\iint \langle x|\psi \rangle ^{*}x'\langle x|x'\rangle \langle x'|\psi \rangle dx\ dx'\\&=\iint \langle x|\psi \rangle ^{*}x'\delta (x-x')\langle x'|\psi \rangle dx\ dx'\\&=\int \psi (x)^{*}x\psi (x)dx=\int x\psi (x)^{*}\psi (x)dx=\int x|\psi (x)|^{2}dx\end{aligned}}$
Where the orthonormality relation of the position basis vectors $\langle x|x'\rangle =\delta (x-x')$, reduces the double integral to a single integral. The last line uses the modulus of a complex valued function to replace $\psi ^{*}\psi$ with $|\psi |^{2}$, which is a common substitution in quantum-mechanical integrals.
The expectation value may then be stated, where x is unbounded, as the formula
A similar formula holds for the momentum operator, in systems where it has continuous spectrum.
All the above formulas are valid for pure states $\sigma$ only. Prominently in thermodynamics and quantum optics, also mixed states are of importance; these are described by a positive trace-class operator ρ=∑$_i$p$_i$|ψ$_i$⟩⟨ψ$_i$|{\textstyle \rho =\sum _{i}p_{i}|\psi _{i}\rangle \langle \psi _{i}|}, the statistical operator or density matrix. The expectation value then can be obtained as

## General formulation

In general, quantum states $\sigma$ are described by positive normalized linear functionals on the set of observables, mathematically often taken to be a C*-algebra. The expectation value of an observable $A$ is then given by
If the algebra of observables acts irreducibly on a Hilbert space, and if $\sigma$ is a normal functional, that is, it is continuous in the ultraweak topology, then it can be written as $\sigma (\cdot )=\operatorname {Tr} (\rho \;\cdot )$ with a positive trace-class operator $\rho$ of trace 1. This gives formula (5) above. In the case of a pure state, $\rho =|\psi \rangle \langle \psi |$ is a projection onto a unit vector $\psi$. Then $\sigma =\langle \psi |\cdot \;\psi \rangle$, which gives formula (1) above.
$A$ is assumed to be a self-adjoint operator. In the general case, its spectrum will neither be entirely discrete nor entirely continuous. Still, one can write $A$ in a spectral decomposition, $A=\int a\,dP(a)$ with a projection-valued measure $P$. For the expectation value of $A$ in a pure state $\sigma =\langle \psi |\cdot \,\psi \rangle$, this means $\langle A\rangle _{\sigma }=\int a\;d\langle \psi |P(a)\psi \rangle ,$ which may be seen as a common generalization of formulas (2) and (4) above.
In non-relativistic theories of finitely many particles (quantum mechanics, in the strict sense), the states considered are generally normal. However, in other areas of quantum theory, also non-normal states are in use: They appear, for example. in the form of KMS states in quantum statistical mechanics of infinitely extended media, and as charged states in quantum field theory. In these cases, the expectation value is determined only by the more general formula (6).

## Example in configuration space

As an example, consider a quantum mechanical particle in one spatial dimension, in the configuration space representation. Here the Hilbert space is ${\mathcal {H}}=L^{2}(\mathbb {R} )$, the space of square-integrable functions on the real line. Vectors $\psi \in {\mathcal {H}}$ are represented by functions $\psi (x)$, called wave functions. The scalar product is given by ⟨ψ$_1$|ψ$_2$⟩=∫ψ$_1$$^∗$(x)ψ$_2$(x)dx{\textstyle \langle \psi _{1}|\psi _{2}\rangle =\int \psi _{1}^{\ast }(x)\psi _{2}(x)\, dx}. The wave functions have a direct interpretation as a probability distribution:
    $\rho (x)dx=\psi ^{*}(x)\psi (x)dx$
gives the probability of finding the particle in an infinitesimal interval of length $dx$ about some point $x$.
As an observable, consider the position operator $Q$, which acts on wavefunctions $\psi$ by $(Q\psi )(x)=x\psi (x).$
The expectation value, or mean value of measurements, of $Q$ performed on a very large number of identical independent systems will be given by $\langle Q\rangle _{\psi }=\langle \psi |Q|\psi \rangle =\int _{-\infty }^{\infty }\psi ^{\ast }(x)\,x\,\psi (x)\,dx=\int _{-\infty }^{\infty }x\,\rho (x)\,dx.$
The expectation value only exists if the integral converges, which is not the case for all vectors $\psi$. This is because the position operator is unbounded, and $\psi$ has to be chosen from its domain of definition.
In general, the expectation of any observable can be calculated by replacing $Q$ with the appropriate operator. For example, to calculate the average momentum, one uses the momentum operator in configuration space, p=−iℏ d/dx {\textstyle \mathbf {p} =-i\hbar \, {\frac {d}{dx}}}. Explicitly, its expectation value is
    $\langle \mathbf {p} \rangle _{\psi }=-i\hbar \int _{-\infty }^{\infty }\psi ^{\ast }(x)\,{\frac {d\psi (x)}{dx}}\,dx.$
Not all operators in general provide a measurable value. An operator that has a pure real expectation value is called an observable and its value can be directly measured in experiment.