How do I find an expectation value for an electron's magnetic moment? Given a spin state:
$|s\rangle$ = some linear combination of $|\uparrow\rangle + |\downarrow\rangle$  possibly with an imaginary component. How do you get from the definition of a magnetic momentum operator $\hat{\mu}_e = g\mu_B\hat{\sigma}$ to the expectation value of the electron spin magnetic moment? 
$g$ is the gyrmoagnetic factor and is approximately 2.0023.
$\mu_B =\frac{e\hbar}{2m_o}$ is the Bohr magneton. 
$\hat{\sigma}$ is the Pauli spin matrix.
I feel like this is the operation
$\langle s| \hat{\mu}_e |s\rangle$
If it is, I need an example walk-through with some arbitrary complex $|s\rangle$
 A: Let
$$|s\rangle = \alpha|\uparrow\rangle + \beta|\downarrow\rangle$$
We assume that $s$ is normalized i.e. $\langle s | s\rangle = 1 \implies |\alpha|^2+|\beta|^2 = 1$.
Then the expectation value of $\hat{\mu}_e$ is:
$$\langle\hat{\mu}_e\rangle = \langle s|\hat{\mu}_e|s\rangle$$
$$\implies \langle\hat{\mu}_e\rangle = |\alpha|^2\langle\uparrow| \hat{\mu}_e |\uparrow\rangle + |\beta|^2\langle\downarrow| \hat{\mu}_e |\downarrow\rangle + \alpha^{\ast}\beta\langle\uparrow| \hat{\mu}_e |\downarrow\rangle + \alpha\beta^{\ast}\langle\downarrow| \hat{\mu}_e |\uparrow\rangle$$
Now, $\hat{\mu}_e = g\mu_B\hat{\sigma}$. We use this together with $\langle \uparrow|\hat{\sigma}|\uparrow\rangle = 1$, $\langle \downarrow|\hat{\sigma}|\downarrow\rangle = -1$, and $\langle \uparrow|\hat{\sigma}|\downarrow\rangle = \langle \downarrow|\hat{\sigma}|\uparrow\rangle = 0$, to get:
$$\langle\hat{\mu}_e\rangle = g\mu_B(|\alpha|^2 - |\beta|^2)$$
Note that this expression for the expectation value is consistent with interpreting $|\alpha|^2$ and $|\beta|^2$ as probabilities of finding the spin to be $\uparrow$ and $\downarrow$ respectively, as required.
