Consider an experiment where we measure a desired [observed quantity](Observable.md#Physical%20meaning%20of%20_Observables_) and imagine that we can repeat this experiment an indefinite number of times under identical conditions. Quantum theory allows us to predict an average value for this measured quantity for those repeated measurements. In quantum mechanics we refer to this average as the _expectation value._ In the language of statistics, this is the [expected value](expected%20value) of a quantum measurement.
Since measured quantities in quantum mechanics are [real](Observable.md#Physical%20meaning%20of%20_Observables_) along with probabilities, the expectation value must be real as well.
For a given [state vector](expectation%20value.md#The%20Expectation%20value%20for%20a%20given%20state%20vector), $|\psi\rangle,$ the expectation value is

# The Expectation value for a given state vector
Consider a [state vector](State%20vector.md), $|\psi\rangle$ and [observable](Observable.md), $\hat{O},$ the [expectation value](expectation%20value.md) is the sum of probabilities weighted by their corresponding measurable quantities, $a$. Thus it is expressed as,
$\langle\hat{O}\rangle_\psi = \sum_a aP_a$
where $P_a = |\langle a|\psi\rangle|^2$ is the probability of measuring $a$ as defined by the [[Born rule]]. So therefore we may rewrite the expectation value for an observable as,
$\langle\hat{O}\rangle_{\psi} = \sum_a a|\langle a|\psi\rangle|^2 = \sum_a a\langle \psi|a\rangle\langle a|\psi\rangle = \langle \psi|\hat{O}|\psi\rangle$
Thus
$\langle\hat{O}\rangle_{\psi}=\langle \psi|\hat{O}|\psi\rangle$ ^f99e80
where the substitution $\hat{O}=\sum_a a|a\rangle\langle a |$ is from the [construction](Observable#Constructing%20observables) of the observable as a sum.
Alternatively, we may form a [pure state density Matrix](Pure%20state.md#Density%20Matrix) from $|\psi\rangle$ and rewrite the expectation value as [$\langle\hat{O}\rangle_{\psi}=\mathrm{tr}(|\psi\rangle\langle\psi|\hat{O}) = \mathrm{tr}(\hat{\rho}_\psi\hat{O})$](expectation%20value.md#^d860bd)
## Expectation value of a projection operator in a one dimensional subspace
In place of an [observable](Observable.md) $\hat{O}$ we may consider a [projection Operator](Projection%20operators%20in%20quantum%20mechanics.md), $\hat{P}_a,$ which acts as an [observable](Observable.md) in the [subspace](Projection%20operators%20in%20quantum%20mechanics.md#Projection%20onto%20sub-spaces) it projects [the orthonormal basis](State%20vector.md#Decomposing%20state%20vectors%20into%20sets%20of%20orthonormal%20eigenstates) of $|\psi\rangle$ into.
The [The Expectation value](expectation%20value.md#The%20Expectation%20value%20for%20a%20given%20state%20vector) is then $\langle \psi|\hat{P}_a|\psi\rangle.$ In a one dimensional subspace this means. $\langle \psi|\hat{P}_a|\psi\rangle=\langle \psi|a\rangle\langle a|\psi\rangle$ This is equivalent to the probability of measuring a quantity $a$ as defined by the [Born rule.](Born%20rule.md) ^6ab61b
## Expectation value for a [Wavefunction](Wavefunction.md)
# Density matrix expectation value
The [expectation value](expectation%20value.md) where a quantum system is expressed as a [density matrix](density%20matrix.md) is $\langle\hat{O}\rangle_{\psi_i} = \mathrm{tr}(\hat{\rho}\hat{O})$ where the subscript $\psi_i$ denotes the possible presence of more than one [state vector](State%20vector.md) in the case where $\hat{\rho}$ is a density matrix that may denote either a [Pure state](Pure%20state.md) or [mixed state.](mixed%20state.md) This formula is proven [here.](expectation%20value.md#Proof%20of%20the%20expectation%20value%20formula%20for%20density%20matrices) ^d60113
For a given a state vector $|\psi\rangle,$ we may also rewrite [its expectation value](expectation%20value.md#The%20Expectation%20value%20for%20a%20given%20state%20vector) as $\langle\hat{O}\rangle_{\psi}=\mathrm{tr}(|\psi\rangle\langle\psi|\hat{O}) = \mathrm{tr}(\hat{\rho}_\psi\hat{O})$ where here $\hat{\rho}$ exactly describes $|\psi\rangle$ as a pure state density matrix. ^d860bd
%%Where there exists an [ensemble](Ensembles%20of%20quantum%20systems.md) of $N$ non-interacting systems, each with the state $|\psi\rangle,$ (i.e. when we're dealing with a [Pure state](Pure%20state.md)), the [expectation value](expectation%20value.md) may still be expressed as%%
%%%%
%%[However we will tend to want to use density matrices to model ensembles.](density%20matrix.md#^ea24b6)%%
If the [density matrix](density%20matrix.md) models a [mixed state](mixed%20state.md) then we may also refer to the expectation value as the [ensemble average.](Ensemble%20averages.md) ^cc794d
---
# Proofs and Examples
## Proof of the expectation value formula for density matrices



---
# Recommended Reading
#QuantumMechanics/QuantumMeasurement