Analyze · Categorical

Proportion Test (z-test)

Tests proportions with a z-test.

In the menus Analyze › Categorical › Proportion Test (z-test)

Also searched as proportion test one proportion 1 proportion single proportion two proportions 2 proportions compare two proportions z test for proportions

When to use it

You have a yes/no (binary) outcome and want to compare its success rate between two groups, or against a target proportion.

When not to: Either group has fewer than about 10 successes or failures (use Fisher's exact test for two groups, or an exact binomial test for one proportion, instead of the normal approximation this z-test relies on), or the two proportions being compared come from paired/matched data on the same subjects rather than independent groups (use McNemar's test in that case).

Step by step

  1. Open it from the menu

    Click Analyze in the menu bar; under Categorical choose Proportion Test (z-test).

  2. Fill in the form

    Choose the columns: Yes/no column (optional with typed counts), The two groups (optional). The form lists only columns whose type fits each field. Then fill in Value to count (optional).

  3. Check the options

    The options start at their defaults: Kind of test, What you expect, How strict to be, Proportion to compare with, Successes in group 1 (typed counts), Total in group 1 (typed counts), Successes in group 2 (typed counts), Total in group 2 (typed counts), Successes, one group (typed counts), Total, one group (typed counts). Change one only when your question needs it.

  4. Run the analysis

    Press Run analysis. The Result Card opens on its Results tab.

What to choose in the form

Fields of the Proportion Test (z-test) form
Yes/no column (optional with typed counts) Binary VarOne categorical or binary or ordered categorical column. A column with two values. Name the value to count in Value to count below.
The two groups (optional) Group VarOne categorical column. A column with two kinds, to compare their proportions. Leave empty to test one proportion.
Value to count (optional) Counted LevelA value you type or choose on the form. The value whose share is compared, such as Fail for a defect rate. Blank: a yes-like value (1, yes, pass), else the larger.
Kind of test Test typeTwo groups compares the proportions of two groups; One proportion against a value compares one proportion with a value you type. Not sure? Keep Two groups when you chose a groups column; otherwise choose One proportion against a value.
What you expect Alternativetwo-sided: either direction. less: group 1 (first alphabetically; the card names it) lower, or the share below the typed value. greater: higher. Decide beforehand. Not sure? Keep two-sided. It is the usual choice because it does not assume a direction.
How strict to be AlphaThe cut-off for the p-value. Below it, the card reports evidence of a difference; a smaller cut-off is stricter. Not sure? Keep 0.05. It is the usual convention in most fields.
Proportion to compare with p₀ (one-proportion)For one proportion only: the share your question is about, as a decimal, such as 0.5 for half. Keep 0.5 only if half is the value your question is about; otherwise type yours.
Successes in group 1 (typed counts) Successes (group 1)Only when you type counts instead of choosing a data column. Leave it at 0 when you use a column. Not sure? Keep 0 and choose a data column above; these boxes are for typed counts only.
Total in group 1 (typed counts) Total (group 1)Only when you type counts instead of choosing a data column. Leave it at 0 when you use a column. Not sure? Keep 0 and choose a data column above; these boxes are for typed counts only.
Successes in group 2 (typed counts) Successes (group 2)Only when you type counts instead of choosing a data column. Leave it at 0 when you use a column. Not sure? Keep 0 and choose a data column above; these boxes are for typed counts only.
Total in group 2 (typed counts) Total (group 2)Only when you type counts instead of choosing a data column. Leave it at 0 when you use a column. Not sure? Keep 0 and choose a data column above; these boxes are for typed counts only.
Successes, one group (typed counts) Successes (one-sample)Only when you type counts instead of choosing a data column. Leave it at 0 when you use a column. Not sure? Keep 0 and choose a data column above; these boxes are for typed counts only.
Total, one group (typed counts) Total (one-sample)Only when you type counts instead of choosing a data column. Leave it at 0 when you use a column. Not sure? Keep 0 and choose a data column above; these boxes are for typed counts only.

How to read the card

The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.

What it assumes

Independence of observations

If it does not hold: The two-proportion z-test assumes each group's observations are independent (both within and between groups); violating this invalidates the test regardless of the normal-approximation check.

How to check: Not checkable from the data alone: it is a property of how the data were collected.

A worked example

Comparing conversion rates between two ad variants: variant A converts 340 of 5,000 viewers, variant B converts 410 of 5,000 viewers.

Result: z = -2.66, p = .008; risk difference = -1.4 percentage points, 95% CI [-2.4, -0.4]; risk ratio = 0.83; odds ratio = 0.82; Cohen's h = -0.053 (negligible by Cohen's benchmarks).

The difference is statistically significant partly because the sample is very large, and Cohen's h labels it negligible; yet variant B converts about 21% more viewers than A (6.8% versus 8.2%), which could be commercially decisive. The lesson runs both ways: significance does not establish importance, and Cohen's generic benchmarks do not either; judge the 1.4-point difference (CI 0.4 to 2.4 points) against what a point of conversion is worth to the business.

From the Statistics Library.

The code tabs

Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.

Understand the statistics

Ask Oobi

Type one of these into Ask Oobi beside your data:

  • Is the conversion rate of group A different from group B? / Is our defect rate different from the 5% target?
  • Explain the proportion test (z-test) in plain words.
  • What does odds ratio mean?

Last reviewed November 16, 2026.

Report an unclear step