# Using s to estimate $\sigma$ when finding the sample size in confidence interval questions

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..

You want to estimate the average income of residents in a city. Before you start, you need to know how many people to survey, but this estimate requires knowledge of $$\sigma$$ among some other things. You refer to a past study, conducted by someone else, that showed for incomes that $$s =$$ [fill in some estimate here]. You can then use that value of $$s$$ as a fill-in for the value $$\sigma$$, which is not attainable in practice.
For some technical details: $$s$$ can be regarded as an estimator of $$\sigma$$, but it is in fact a biased estimator (that is, its estimate is not $$\sigma$$). However, this bias is small and becomes smaller with larger sample sizes. This detail is not terribly important because of what we're using $$s$$ for; it's just for a fill-in estimate to establish $$n$$, the sample size of a sample we're about to conduct anyway. If we get $$s$$ a bit wrong, it will just mean our sample size is close to, but not exactly equal to, our target. That difference will probably not affect the end result of the study very much. If you're in doubt, the safe thing is to always round $$n$$ up a bit to ensure greater accuracy in the study.
• As far as i understood you say that we can use $s$ in place of $\sigma$.Moreover , $s$ and $\sigma$ will be closer and closer when the size of sample getting large.Whats more ,we can use $s$ inplace of $\sigma$ when the sample size is small , lets say less than $30$ in sake of central limit theorem. Am i right up to here ? In this point , i want to ask an idea for the situations where the sample size is less than $30$ for more trust. Mar 12, 2022 at 19:38
• According to your suggestion , $$n= \bigg(\frac{z_{\alpha/2}\sigma}{error}\bigg)^2=\bigg(\frac{z_{\alpha/2}s}{error}\bigg)^2$$ when sample size is less than $30$. My question is that can we use $$\bigg(\frac{t_{\alpha/2}s}{error}\bigg)^2$$ when the sample size less than $30$ , because when we do not the variance of population and try to find a confidence interval for small samples , we use t-table instead of z-table. Mar 12, 2022 at 19:38
• "Can we use" is an interesting question here... let's compare the two approaches. For a fixed $\alpha$, $t_{\alpha/2}$ is always larger than $z_{\alpha/2}$. This means that your approach will be a bit more conservative and recommend a (slightly) larger sample size. I think I've only ever seen $z_{\alpha/2}$ for such applications, but I don't think $t_{\alpha/2}$ is unreasonable, in the same spirit as when I suggested to "just round up" earlier. Mar 12, 2022 at 21:19