Example Data Table
| Scenario |
x1 |
n1 |
p0 |
x2 |
n2 |
Alpha |
Alternative |
| Website conversion above target |
56 |
100 |
0.50 |
Not used |
Not used |
0.05 |
Greater than |
| Two product defect rates |
18 |
250 |
Not used |
31 |
260 |
0.05 |
Not equal |
| Survey support below claim |
142 |
400 |
0.40 |
Not used |
Not used |
0.01 |
Less than |
Formula Used
One Sample Proportion Test
Sample proportion: p̂ = x / n
Standard error under null: SE0 = sqrt(p0(1 - p0) / n)
Z statistic: z = (p̂ - p0) / SE0
Two Sample Proportion Test
Sample proportions: p̂1 = x1 / n1 and p̂2 = x2 / n2
Pooled proportion: p̂p = (x1 + x2) / (n1 + n2)
Standard error under null: SE0 = sqrt(p̂p(1 - p̂p)(1/n1 + 1/n2))
Z statistic: z = (p̂1 - p̂2) / SE0
P Value Rules
For a greater than test, p = 1 - Φ(z).
For a less than test, p = Φ(z).
For a not equal test, p = 2 × min(Φ(z), 1 - Φ(z)).
Confidence Interval
One sample interval: p̂ ± z*sqrt(p̂(1 - p̂) / n)
Two sample interval: (p̂1 - p̂2) ± z*sqrt(p̂1(1 - p̂1)/n1 + p̂2(1 - p̂2)/n2)
How to Use This Calculator
- Select one sample or two sample proportion testing.
- Choose the alternative hypothesis that matches your claim.
- Enter successes and trials for the required sample fields.
- Enter the null proportion for a one sample test.
- Set alpha, confidence level, and decimal places.
- Apply continuity correction when you want a conservative result.
- Press Calculate to view the result above the form.
- Use CSV or PDF buttons to save the report.
Understanding Proportion Hypothesis Testing
A proportion hypothesis test checks a claim about a percentage, rate, share, or probability. It is useful when the outcome has two categories, such as pass or fail, yes or no, and defect or acceptable. This calculator supports one sample and two sample tests. It gives the sample proportions, standard error, z statistic, p value, confidence interval, and decision.
Why This Test Matters
Many decisions depend on proportions. A school may test whether the pass rate is above a target. A factory may compare defect rates between two lines. A survey team may decide whether support changed after a campaign. The test converts the observed difference into a z score. Then it measures how unusual that score would be if the null claim were true.
Choosing the Correct Option
Use one sample testing when one group is compared with a claimed proportion. Enter successes, trials, and the null proportion. Use two sample testing when two independent groups are compared. Enter successes and trials for both groups. Select the alternative carefully. Use not equal for any difference. Use greater when the first proportion should be higher. Use less when it should be lower.
Reading the Output
The p value is the main decision value. When it is less than or equal to alpha, reject the null hypothesis. When it is greater than alpha, do not reject the null hypothesis. This does not prove the null is true. It only means the sample did not give strong enough evidence against it.
Practical Notes
Large samples make the z approximation more reliable. Check that expected successes and failures are not too small. The optional continuity correction can make the test more conservative for borderline cases. Confidence intervals add practical meaning because they show a likely range for the true proportion or difference. Always combine the statistical result with study design, sampling quality, and subject knowledge. A small p value can still come from biased data. A large p value can occur when the sample is too small. Use this tool as a clear statistical guide, not as a replacement for careful research planning. Record assumptions, alpha, and sample details. Save downloads for later team review and audit trails clearly.
FAQs
What is a proportion hypothesis test?
It is a z test for claims about rates or percentages. It checks whether sample evidence is strong enough to reject a null proportion or a null difference between two proportions.
When should I use a one sample test?
Use it when one group is compared with a known or claimed value. For example, test whether a pass rate is higher than 70%.
When should I use a two sample test?
Use it when comparing two independent groups. For example, compare conversion rates from two landing pages or defect rates from two machines.
What does alpha mean?
Alpha is the chosen significance level. It is the cutoff for rejecting the null hypothesis. Common values are 0.05, 0.01, and 0.10.
What does the p value show?
The p value shows how unusual the observed result is under the null hypothesis. Smaller values give stronger evidence against the null claim.
Should I use continuity correction?
Continuity correction can make the z test more conservative. It is often used when counts are smaller or when a borderline result needs caution.
What assumptions should I check?
Samples should be independent and reasonably random. Expected successes and failures should not be too small. Larger counts improve the normal approximation.
Can I download the results?
Yes. Use the CSV button for spreadsheet work. Use the PDF button for a simple printable report with the key result values.