We introduced the topic of sample size in Unit 5. There we were estimating the required sample size for comparing a sample mean with a known parametric mean using the Ztest.
The formula we use for the paired ttest is identical, albeit we accept it is an approximation because the standard deviation is not known but estimated:
Algebraically speaking:
For a onetailed test:

n 
= 
(z_{α} + z_{β})^{2} σ_{d}^{2} 

δ^{2} 
where
 n is the required number of pairs,
 z_{α} is obtained from your probability calculator or tables given that P(Z < z_{α}) = 1 − α and α is the significance level,
 z_{β} is obtained from your probability calculator or tables, given that P(Z < z_{β}) = 1 − β and
1 − β is the power,
 δ is the difference that one wishes to be able to detect,
 σ_{d} is the known standard deviation of the difference. In practice we only have an estimate of this.
For a twotailed test, we use z_{α/2} in place of z_{α}. This is an approximation since it ignores the possibility of a type III error. However, for large treatment effects, it will not usually introduce any serious error.
