In hypothesis testing, the test statistic helps us determine whether to reject the null hypothesis or not. The test statistic is often a standardized value that is calculated from sample data during a hypothesis test.
Suppose we are testing the null hypothesis $H_0: \mu = 100$ against the alternative hypothesis $H_1: \mu \neq 100$. In this context, the test statistic is calculated using the formula:
$$ z = \frac{\bar{x} - \mu_0}{\frac{\sigma}{\sqrt{n}}} $$
Where: