I am trying to learn sample confidence interval for $\mu$ , in this topic , there is a subtopic which is finding the sample size. I know that if $\sigma$ is given (standard deviation of population) , then $$n= \bigg(\frac{z_{\alpha/2}\sigma}{error}\bigg)^2$$
However , we do not always have $\sigma$ , in this case my book suggest two option such that :
By taking a preliminary sample and using $s$ (standard deviation of the sample) to estimate $\sigma$.
By using $\sigma \sim \frac{\text{Range of population}}{4}$
When i read these options , the latter made sense ,but i could not comprehend how to use the former. What i mean is that how can i use standard deviation of the sample to estimate standard deviation of population ? If it possible can you explain it with a example ? Thanks in advance..