This is from the p.116 of Nielsen and Chuang's quantum computation and quantum information book.
The (2.229) equations are the ones I can't see how to calculate. In (2.227) and (2.228), the index 1 in Z_1 and X_1 look like these Pauli matrices are going to be applied to the first qubit and the index 2 in Z_2 and X_2 means they are going to be applied to the second qubit. However, how do I compute the average value such as < QS >? The given two-qubit state is an entangled state and (2.227) and (2.228) apply to each qubit separately... Could anyone explain to me how to get the (2.229) result?
