$z$ test for a single proportion

This page offers all the basic information you need about the $z$ test for a single proportion. It is part of Statkat’s wiki module, containing similarly structured info pages for many different statistical methods. The info pages give information about null and alternative hypotheses, assumptions, test statistics and confidence intervals, how to find p values, SPSS how-to’s and more.

To compare the $z$ test for a single proportion with other statistical methods, go to Statkat's or practice with the $z$ test for a single proportion at Statkat's

Contents

When to use?

Deciding which statistical method to use to analyze your data can be a challenging task. Whether a statistical method is appropriate for your data is partly determined by the measurement level of your variables. The $z$ test for a single proportion requires one variable of the following type:

Variable type required for the $z$ test for a single proportion :
One categorical with 2 independent groups

Note that theoretically, it is always possible to 'downgrade' the measurement level of a variable. For instance, a test that can be performed on a variable of ordinal measurement level can also be performed on a variable of interval measurement level, in which case the interval variable is downgraded to an ordinal variable. However, downgrading the measurement level of variables is generally a bad idea since it means you are throwing away important information in your data (an exception is the downgrade from ratio to interval level, which is generally irrelevant in data analysis).

If you are not sure which method you should use, you might like the assistance of our method selection tool or our method selection table.

Null hypothesis

The $z$ test for a single proportion tests the following null hypothesis (H0):

H0: $\pi = \pi_0$

Here $\pi$ is the population proportion of 'successes', and $\pi_0$ is the population proportion of successes according to the null hypothesis.
Alternative hypothesis

The $z$ test for a single proportion tests the above null hypothesis against the following alternative hypothesis (H1 or Ha):

H1 two sided: $\pi \neq \pi_0$
H1 right sided: $\pi > \pi_0$
H1 left sided: $\pi < \pi_0$
Assumptions

Statistical tests always make assumptions about the sampling procedure that was used to obtain the sample data. So called parametric tests also make assumptions about how data are distributed in the population. Non-parametric tests are more 'robust' and make no or less strict assumptions about population distributions, but are generally less powerful. Violation of assumptions may render the outcome of statistical tests useless, although violation of some assumptions (e.g. independence assumptions) are generally more problematic than violation of other assumptions (e.g. normality assumptions in combination with large samples).

The $z$ test for a single proportion makes the following assumptions:

If the sample size is too small for $z$ to be approximately normally distributed, the binomial test for a single proportion should be used.
Test statistic

The $z$ test for a single proportion is based on the following test statistic:

$z = \dfrac{p - \pi_0}{\sqrt{\dfrac{\pi_0(1 - \pi_0)}{N}}}$
Here $p$ is the sample proportion of successes: $\dfrac{X}{N}$, $N$ is the sample size, and $\pi_0$ is the population proportion of successes according to the null hypothesis.
Sampling distribution

Sampling distribution of $z$ if H0 were true:

Approximately the standard normal distribution
Significant?

This is how you find out if your test result is significant:

Two sided: Right sided: Left sided:
Approximate $C\%$ confidence interval for $\pi$

Regular (large sample): With plus four method:
Equivalent to

The $z$ test for a single proportion is equivalent to:

Example context

The $z$ test for a single proportion could for instance be used to answer the question:

Is the proportion of smokers amongst office workers different from $\pi_0 = 0.2$? Use the normal approximation for the sampling distribution of the test statistic.
SPSS

How to perform the $z$ test for a single proportion in SPSS:

Analyze > Nonparametric Tests > Legacy Dialogs > Binomial... If computation time allows, SPSS will give you the exact $p$ value based on the binomial distribution, rather than the approximate $p$ value based on the normal distribution
Jamovi

How to perform the $z$ test for a single proportion in jamovi:

Frequencies > 2 Outcomes - Binomial test Jamovi will give you the exact $p$ value based on the binomial distribution, rather than the approximate $p$ value based on the normal distribution