The two-proportion test is used to check whether the proportions of two groups differ statistically significantly.
It is used to assess whether an observed difference between two proportions goes beyond random fluctuations. The basis is a hypothesis test for binary events (event / no event).
p ≤ α → accept H₁ (reject H₀)
p > α → retain H₀
Example: Leaky Lids
A manufacturer of tomato sauce wants to check if the proportion of leaky jars differs between two filling lines.
Line A: 30 out of 100 jars are leaky
Line B: 50 out of 100 jars are leaky
Using the two-proportion test, it is checked whether the observed difference is statistically significant.
Interpretation of the results:
The calculated p-value is below the significance level of 0.05, so the null hypothesis is rejected. There is statistical evidence that the probability of leaky jars is not the same on the two lines.
Explanations of the graphic:
The points mark the observed sample proportions of the two filling lines.
The error bars represent the 95% confidence interval of the respective proportions.
If the confidence intervals overlap little to not at all, this indicates a statistically significant difference.
Procedure
Preparation
Select a binary event (e.g., Lid tight: Yes/No).
Define two groups whose proportions are to be compared.
Set the significance level α (usually α = 0.05).
Ensure that observations within and between groups were collected independently.
Usage in AlphadiTab
Select the tool two-proportion test, in the Analyze phase.
Activate the slider on Manual (or select data columns).
Specify the number of events and the number of trials under Sample 1.
Specify the number of events and the number of trials under Sample 2.
Conduct the analysis by Create New.
Interpretation
Check if the p-value is less than or equal to the significance level.
p ≤ α → statistically significant difference in proportions.
p > α → no statistically significant difference in proportions.
The interpretation refers to proportions – not means.
The p-value of Fisher's exact test is valid for all sample sizes.
Settings options
The two-proportion test offers two main settings: the type of data input and the direction of the hypothesis.
Data
Manual input: The comparison is based on the number of events and the number of trials in both samples.
Non-manual input (dataset): The comparison is based on the selected data columns.
Direction: Two-sided
H₀: p₁ − p₂ = Δ₀ | H₁: p₁ − p₂ ≠ Δ₀
Select two-sided if you want to check whether the proportions of the two samples differ without specifying a particular direction. Example: Does the rate of leaking jars differ between filling line A and B?
Direction: Greater
H₀: p₁ − p₂ = Δ₀ | H₁: p₁ − p₂ > Δ₀
Select greater if you want to check whether the proportion of the first sample is greater than that of the second. Example: Is the proportion of timely delivered pallets at the North site higher than at the South site?
Direction: Smaller
H₀: p₁ − p₂ = Δ₀ | H₁: p₁ − p₂ < Δ₀
Select smaller if you want to check whether the proportion of the first sample is smaller than that of the second. Example: Is the proportion of incorrectly labeled jars in shift A lower than in shift B?
Requirements
Two groups
There must be exactly two groups whose proportions are to be compared.
Why is this important? The two-proportion test is a method for comparing two proportions.
Independent samples
The observations of the two groups must not influence each other. Each unit may only be assigned to one group.
Why is this important? The test assumes that the groups were collected independently of each other.
Nominal data with 2 characteristics
The data must be available as event / no event.
Why is this important? The test compares proportions based on nominal data that can take exactly two different values.
When are other tools more suitable?
Mean values of continuous measurement data should be compared
t-Test
Percentage values approximately normally distributed and sample sufficiently large
t-Test
Two dependent samples should be compared
Paired procedures
Example in production
Rejection rate – Filling line A vs. Filling line B
In the production of tomato sauce, two filling lines are used. It is being investigated whether the proportion of leaky jars differs between machine A and machine B. The data is available in summarized form:
Machine A: 14 leaky jars out of 320 tested
Machine B: 29 leaky jars out of 340 tested
Interpretation
The proportion test shows a statistically significant difference in the rejection rate (p < 0.05). Since neither events nor counter-events are less than 5, the normal approximation is permissible; it leads to the same result here as the exact Fisher test.
→ Significant difference in the rejection rate between the machines.
Example in Development
Success rate of new lid geometry
A new lid geometry is being tested in development. It is being investigated whether the proportion of passed leak tests differs between the previous and the new variant.
The test shows no statistically significant difference in the first-time resolution rate between the locations (p > 0.05). The null hypothesis is retained.
→ No difference in the first-time resolution rate between North and South.
Example in Sales
Loss rate by sales approach
In sales, it is examined whether the proportion of lost offers differs between sales approach A and sales approach B.
Interpretation
There are two p-values. The normal approximation indicates a significant difference (p = 0.029), while the exact Fisher test is above the significance level. Since in both samples events and counter-events are at least 5 each, the condition for the normal approximation is met – it is used for assessment, and the null hypothesis is rejected.
→ Normal approximation (p = 0.029) → significant difference in loss rate.
Example in logistics
Punctually provided pallets by location
In logistics, deliveries are prepared at two locations. It is checked whether the North location achieves a higher proportion of punctually provided pallets than the South location. The analysis is carried out as a one-sided test (direction "greater").
The test shows no statistically significant difference in the proportion of punctually provided pallets between the locations (p > 0.05). The null hypothesis is retained.
→ The North location is not significantly better than the South location.
Example in Purchasing
Supplier Comparison for Screw Caps
In purchasing, screw caps are sourced from two suppliers. It is examined whether the proportion of damaged deliveries differs between Supplier A and Supplier B.
Note: For very small numbers of events or non-events, the normal approximation may be inaccurate – in such cases, the exact method (Fisher) is important.
There are two p-values. The normal approximation would suggest rejection, but its assumption is not met here (in sample 1, the counter-events are less than 5). Therefore, the decision is based on the exact Fisher test – this shows no significant difference, the null hypothesis is retained.
→ Normal approximation assumption violated → Fisher is crucial → no significant difference.
Example in Planning
Forecast Hit Rate by Planning Horizon
The planning examines whether the proportion of sufficiently accurate sales forecasts differs between short-term and long-term planning horizons.
Both the exact Fisher test and the normal approximation are at or below the significance level of 5 %. Both tests indicate a significant difference; the null hypothesis is rejected.
→ Significant difference in forecast hit rate between the horizons.
Terms
p₁, p₂: Observed sample proportions of the two groups.
α = Significance level: Preset error probability (usually 0.05).
H₀ (Null hypothesis): The proportions of the two groups are equal.
H₁ (Alternative hypothesis): The proportions of the two groups differ.
p-value: Result of the hypothesis test.
Fisher's exact test: Exact method, valid for all sample sizes, even with small event numbers.
Normal approximation: Approximation method, suitable when event and counter-event numbers are each ≥ 5.
Confidence interval: Range of values that contains the true proportion with the chosen confidence level.
A short winter break
✳✦✳
Information for our customers
Merry Christmas
and a great start to 2027
Dear customers,
the year is coming to a close, and we, too, are using the peaceful Christmas season for a short break.
Our company holidaysDecember 21, 2026 – January 1, 2027From January 4, 2027, we will be back at your service as usual.
We wish you a happy and peaceful Christmas, restful holidays and a great start to the new year.