What Z-test is
A z-test is a statistical test used to compare the means of two independent samples. It is used to determine whether or not a population mean is significantly different from a hypothesized value. The z-test can also be used to compare two population means.
Steps for z-test
-
State the null hypothesis and the alternate hypothesis. The null hypothesis is usually that there is no difference between the population means, and the alternate hypothesis is that there is a significant difference.
-
Calculate the test statistic. This is typically a z-score, which is calculated by subtracting the hypothesized mean from the sample mean and dividing by the standard error.
-
Calculate the p-value. This is the probability that the test statistic would occur if the null hypothesis is true.
-
Compare the p-value to the significance level. If the p-value is less than the significance level, then the null hypothesis is rejected and the alternate hypothesis is accepted. If the p-value is greater than the significance level, then the null hypothesis is not rejected.
Examples
- A Z-test can be used to determine if two population proportions are equal.
- A Z-test can be used to compare two population means when the population variances are known.
- A Z-test can be used to compare the means of two independent samples when the population variances are unknown but assumed to be equal.
- A Z-test can be used to determine if a sample mean is significantly different from a hypothesized population mean.
- A Z-test can be used to assess the difference between two proportions.