Suppose I have a state $|\psi\rangle$ and I want to estimate the probability of obtaining a computational basis state $|x\rangle$. Then by Born rule:
$$ p(x) = |\langle x|\psi\rangle|^2 = Tr[|x\rangle \langle x|\psi\rangle \langle \psi|]. $$
However, I could alternatively achieve the same by defining an observable $O = |x\rangle\langle x|$. This satisfies the definition of observable - $O$ is Hermitian; and the only projector $|x\rangle\langle x|$ is Hermitian and $(|x\rangle\langle x|)^2 = |x\rangle\langle x|$. So now I can calculate expectation value of the observable:
$$ \langle O \rangle = Tr[O|\psi \rangle \langle \psi|] = Tr[|x\rangle \langle x|\psi\rangle \langle \psi|] = p(x). $$
Is this reasoning correct?