The expectation value of the observable O for the state `|psi>` is found by evaluating `<psi|O|psi>` .``

We are given the definition of the state `|psi> = A(2|1> + 3|2> + |5>)`

and told that `|n>` denotes the normalized eigenstate of operator O having eigenvalue `n` .

This means that `<n|O|n> = n` and specifically that

`<1|O|1> = 1`

`<2|O|2> = 2` and

`<5|O|5> = 5`

We will need `<psi|` which is straightforward as the coefficients on all of the eigenstates are real:

`<psi| = A*(2<1| + 3<2| + <5|)` where the term the equation editor has rendered as `A*`

is meant to be A*.

Substituting the definitions for `<psi|` and `|psi>` into the formula for the expectation value of observable O, we get

`<psi|O|psi> =` A*A `(4<1|O|1> + 9<2|O|2> + <5|O|5>)`

`= A*A(4*1 +9*2 + 5)`

= 27 A*A