Z-Test
A z-test is a statistical test used to determine if there is a significant difference between sample and population means or between the means of two samples. It is particularly useful when dealing with large sample sizes. The purpose of a one sample z-test is to compare the sample mean to the known population mean when the population standard deviation is known.
First, we want to state both the null hypotheses and the alternative hypotheses. Remember that the null hypothesis is the hypothesis that there is no effect or no difference. For example, if you're testing a new drug, the null hypothesis might be that the drug has no effect on recovery rates. The alternative hypothesis is the hypothesis that there is an effect or a difference. For the drug example, the alternative hypothesis would be that the drug does have an effect on recovery rates.
To assess whether the average height of the sample differs significantly from the known population mean, we conducted a z-test assuming the population variance is accurately known. If it not, we can use the sample variance to perform a z-test and determine if the sample mean significantly differed from the hypothesized population mean.
Once we've set the hypotheses, we need to choose a level of significance. This is your cutoff for deciding if the result is statistically significant.
Next, we can use the following formula to calculate the z-score.
Z=σx−μ
Remember that x= the standard value, μ= the mean of the sample, and σ= the standard deviation of the sample.
After we've found the z-score, we need to determine the critical value. This depends on the level of significance and whether the test is one-tailed or two-tailed. Compare the calculated z-score to this critical value.
Lastly, you can decide to either reject the null hypothesis (H0) or fail to reject the null hypothesis.
Looking Further
While a z-test is used to compare sample means to population means, the chi-square test is employed to assess the relationship between categorical variables, addressing different aspects of statistical analysis.