spins_unit_operators_and_measurements.ppt Pages 29-33, 38
$$\frac{+ \hbar}{2}\langle \psi \vert +\rangle\langle+ \vert\psi \rangle \; \; + \; \; \frac{- \hbar}{2}\langle\psi \vert- \rangle\langle -\vert\psi \rangle \; \; . $$
We can reverse FOIL the expression above (again, referencing the completeness relation proof helps for students to see the operation) and pull out the $\vert\psi \rangle$ terms to acquire
$$\langle\psi \vert \left(\frac{+ \hbar}{2}\vert +\rangle\langle+ \vert \; \; + \; \; \frac{- \hbar}{2}\vert- \rangle\langle -\vert\right)\vert\psi \rangle \; \; . $$
Now, the terms in the parentheses can be re-written with the according spin operators using the eigenvalue equation. This changes the expression to
$$\langle\psi \vert\left(\hat{S_{z}}\vert +\rangle\langle+ \vert \; \; + \; \; \hat{S_{z}}\vert- \rangle\langle -\vert\right)\vert\psi \rangle \; \; . $$
The $\hat{S_{z}}$ can be factored out of the expression in the parentheses, and all that will be left in the parentheses is the completeness relation. Thus, our expectation value can be written as
$$\left\langle\hat{S_{z}}\right\rangle \; = \; \langle\psi \vert\hat{S_{z}}\vert\psi \rangle \; \; . $$
$$Uncertainty \: = \: \sqrt{\sum_{i}\left(a_{i}-\left\langle \hat{A}\right\rangle \right)^{2}P(a_{i})} \; \; . $$
Notice the term inside the square root looks just like an expectation value: an expression times a probability. Thus, we can re-write the uncertainty to take the form
$$Uncertainty \: = \: \sqrt{\left\langle \left(a_{i}-\left\langle \hat{A}\right\rangle \right)^{2}\right\rangle} \; \; . $$
Now, the squared expression inside the expectation value can be expanded and the sums resulting from the expectation value can be carried through to yield
$$Uncertainty \: = \: \sqrt{\left\langle a_{i}\right\rangle ^{2}-2\left\langle a_{i}\right\rangle\left\langle\hat{A}\right\rangle-\left\langle\hat{A}\right\rangle^{2}} \; \; . $$
Finally, the expectation value of the data points is the average of the operator, which makes $\left\langle a_{i}\right\rangle =\left\langle \hat{A}\right\rangle $. When we make this substitution, the uncertainty simplifies to take the most common form
$$Uncertainty \: = \: \sqrt{\left\langle\hat{A}^{2}\right\rangle-\left\langle\hat{A}\right\rangle ^{2}} \; \; . $$