# Why are there two formulas for the z-test?

There are two formulas commonly used in the z-test: one involving the standard error (se) and the other involving the standard deviation (std) of the population. The formulas are as follows:

z = (x - μ) / se
z = (x - μ) / std


In these formulas, x represents the observed mean, μ is the hypothesized mean, se is the standard error of the mean, and std is the standard deviation of the population.

Does the choice between the formulas depend on the the problem? what is the usage of each one?

I think, we usually use the first formula in the z-test when we know the standard deviation of the population. However, in situations where the population standard deviation is unknown ,and SE cannot be calculated, we resort to the second formula. In this case, we use the sample standard deviation as an estimate of the population standard deviation. This approach, often referred to as the bootstrap method, allows us to perform the z-test using the standard deviation of the sampling distribution instead of the population standard deviation. Is this statement correct?

• The second formula only makes sense when you have a samle of size 1. In that case, se=std :-)
– Ute
Commented Jun 17, 2023 at 18:02
• Are you sure that the std in the second formula is population standard deviation? If we understand it more broadly, the two formulas can be viewed as identically, since standard error is exactly the standard distribution of the test statistic. Commented Jun 18, 2023 at 14:28