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 = ∫ ∫ a d P ( a ) with a projection-valued measure P . For the expectation value of A in a pure state σ σ = ⟨ ⟨ ψ ψ | ⋅ ⋅ ψ ψ ⟩ ⟩ , this means ⟨ ⟨ A ⟩ ⟩ σ σ = ∫ ∫ a d ⟨ ⟨ ψ ψ | P ( a ) ψ ψ ⟩ ⟩ , which may be seen as a common generalization of formulas (2) and (4) above.