# power calculation in hypothesis testing

Please look at the pic above. I am confused about the sentence highlighted in yellow ( Upon substituting... )

What I can't understand is that we use S when constructing the decision rule (4.5.11) , but why do we have to use σ when we calculate power (4.5.12) ? Why not just use S ?

Thank you !

Based on my reading of this I understand $S$ to be used to denote the calculated variation in observed data, $\sigma$ is used to represent the expected underlying variation of the data. In reality you can only ever know $\sigma$ if you have an artificial situation that you have created yourself (e.g. through simulation).
So one is based on what we expect the true variation to be and the other on what we measure it to be, hence the alternate use of $\sigma$ and $S$
One might raise the objection that our estimate of $\sigma$ will be based on $S$, but this is precisely why post-hoc power analysis is not very informative - it becomes a circular argument. $\sigma$ is best independently estimated a priori.