I have come across the following statement in my lecture notes:
Given a vector $| \psi \rangle$ in a Hilbert space $\mathcal{H}$, the expectation value of the self-adjoint operator $\hat{A}$ is defined as follows: $$\langle \psi | \hat{A} | \psi \rangle = \int_{-||\hat{A}||}^{||\hat{A}||}{ \lambda \langle \psi | \hat{E}_{\lambda}^{\hat{A}} | \psi \rangle}$$
where $\hat{E}_{\lambda}^{\hat{A}}$ is a member of the spectral family of the self-adjoint operator.
I haven't seen much functional analysis and I'm wondering why the limits of this integration are as given in the statement above. Usually, in quantum mechanics the domain of integration is the entire real line but I don't understand why this is not the case in the formula above.