Skip to content

z-test

(NL: z-toets)

The z-test is a statistical hypothesis test to verify a statement about the population mean, more specifically whether the population mean \(\mu\) is equal to a certain value, denoted as \(\mu_0\).

The z-test can be used under the condition that:

Initially, we assume that this statement is true, i.e. that \(\mu = \mu_0\). This is the null hypothesis. Then the central limit theorem applies and the sample mean follows a normal distribution with expectation \(\mu_0\) and standard deviation \(\sigma/\sqrt{n}\).

The test statistic is then the sample mean. This will deviate from the expectation \(\mu_0\), but the question is whether this difference is significant.

There are three variants of this test:

  • Right-tailed:
    • \(H_0\): \(\mu = \mu_0\), \(H_1\): \(\mu > \mu_0\)
    • P-value: \(p = P(Z > z)\) with \(z\) the z-score \(z = \frac{\overline{x} - \mu_0}{\sigma/\sqrt{n}}\)
    • Critical value: \(g = \overline{x} + z_{\alpha} \frac{\sigma}{\sqrt{n}}\) with \(z_{\alpha}\) such that \(P(Z > z_{\alpha}) = \alpha\)
    • reject the null hypothesis if \(\overline{x} > g\)
  • Left-tailed:
    • \(H_0\): \(\mu = \mu_0\), \(H_1\): \(\mu < \mu_0\)
    • p-value: \(p = P(Z < z)\)
    • critical value: \(g = \overline{x} - z_{\alpha} \frac{\sigma}{\sqrt{n}}\)
    • reject the null hypothesis if \(\overline{x} < g\)
  • Two-tailed:
    • \(H_0\): \(\mu = \mu_0\), \(H_1\): \(\mu \neq \mu_0\)
    • p-value: \(p = 2P(Z > z)\)
    • critical values:
      • \(g_1 = \overline{x} - z_{\alpha/2} \frac{\sigma}{\sqrt{n}}\)
      • \(g_2 = \overline{x} + z_{\alpha/2} \frac{\sigma}{\sqrt{n}}\)
    • reject the null hypothesis if \(\overline{x} < g_1\) or \(\overline{x} > g_2\)

In practice, the \(z\)-test is only seldom used because the population standard deviation is often unknown. In that case, the t-test is used.