 Z-Test - Maple Help

Z-Tests

Main Concept

The Z-test is used to compare means of two distributions with known variance. One sample Z-tests are useful when a sample is being compared to a population, such as testing the hypothesis that the distribution of the test statistic follows a normal distribution. Two sample Z-tests are more appropriate for comparing the means of two samples of data.

Requirements for the Z-test:

 • The mean and standard deviation of the population distribution are known
 • The mean of the sample distribution is known
 • The variance of the sample is assumed to be the same as the population
 • The population is assumed to be normally distributed

In cases where the population variance is unknown, or the sample size is less than 30, the Student's t-test  may be more appropriate.

To calculate a Z-test statistic, the following formula can be used:

z = $\frac{x\mathit{-}\mathrm{μ}}{\mathrm{SE}}$,

z = $\frac{x-\mu }{\frac{\sigma }{\sqrt{n}}}$,

where, x is the sample mean, m is the population mean, and SE is the standard error, which can be calculated using the following formula:

SE = $\frac{\mathrm{σ}}{\sqrt{n}}$,

where, s is the population standard deviation and n is the sample size.

For each significance level, α, the Z-test has a critical value. For example, the significance level α = 0.01, has a critical value of 2.326. If the Z-test statistic is greater than this critical value, then this may provide evidence for rejecting the null hypothesis.

Example

A company produces metal discs with a mean weight of 120 g and standard deviation of 30 g. Suppose that a sample of size 50 has the mean weight of 118 g. Assuming a significance level of , is the company correct in accepting the null hypothesis that the sample does not have different weights on average than the population of metal discs?

To start, we can state the null and alternative hypotheses:

Null Hypothesis: H0:

Alternative Hypothesis:  HA: $x\ne \mathrm{μ}$ Computed Solution To determine the z-value, we need to first calculate the standard error. We can do this using the formula from the above section:   $\mathrm{SE}=\frac{30}{\sqrt{50}}$, $\mathrm{SE}=4.242$   We can now plug in our known values and the standard error to calculate the z-value:   $z=\frac{x-\mu }{\mathrm{SE}}$ $z=\frac{118-120}{4.242}$ $z=-0.471$ Now we can look up the probability: $P\left(z<-0.471\right)$ on a probability table.      $P\left(z<-0.471\right)=0.3192$   Since 0.3192 is greater than P = 0.05, we cannot reject the null hypothesis that the sample mean is significantly different than the metal disc population mean.

Enter values for the population mean, population standard deviation, sample size and sample mean in order to compute the z-value. We will assume a significance level of α = 0.05.

If the z-value is less than the left critical value or greater than the right critical value, there is evidence to reject the null hypothesis that sample mean follows the same distribution as the population.

 Population Mean (μ): Standard Deviation (σ): Sample Size (n): Sample Mean (x):   More MathApps