One Sample Proportion Hypothesis Test

How to use this calculator:

Step 1: Enter Your Sample Data

Input the sample proportion (p̂) – this is the proportion observed in your sample (a decimal between 0 and 1). For example, if 45 out of 100 people prefer a product, enter 0.45.

Step 2: Enter the Hypothesized Population Proportion

Enter the population proportion (p₀) that you're testing against. This is typically based on historical data, a claim, or industry standard.

Step 3: Enter Sample Size

Input your sample size (n) – the total number of observations in your sample.

Step 4: Set Significance Level

Choose your significance level (α), typically 0.05 (5%). This represents the probability of rejecting the null hypothesis when it's actually true.

Step 5: Select Test Type

Choose the appropriate test:

Two-tailed: Tests if the proportion is different (either higher or lower)
Right-tailed: Tests if the proportion is greater
Left-tailed: Tests if the proportion is less

Example

A company claims that 50% of customers are satisfied. You survey 100 customers and find 45 are satisfied.

Inputs: Sample proportion = 0.45, Population proportion = 0.50, Sample size = 100, α = 0.05, Test type = Two-tailed

The calculator will determine if there's significant evidence that the true satisfaction rate differs from 50%.

Important Tips

How to Do This in R

R's built-in prop.test() performs the one-sample proportion test directly from counts:

x <- 45      # number of successes
n <- 100     # sample size
p0 <- 0.5    # hypothesized proportion

prop.test(x, n, p = p0, alternative = "two.sided", correct = FALSE)

Note: by default R applies a continuity correction (correct = TRUE), which gives a slightly more conservative p-value than this calculator's uncorrected z-test. Set correct = FALSE to match the results above.

How to Do This in SPSS

SPSS does not have a dedicated one-sample proportion test menu. The common workaround is Analyze → Nonparametric Tests → Legacy Dialogs → Binomial, entering your binary outcome variable and setting the Test Proportion to your hypothesized p₀. This performs an exact binomial test rather than the normal-approximation z-test used here, so results may differ slightly for small samples.

How to Do This in JASP

Frequencies → Binomial Test. Move your binary variable into the Variables box, and set the Test Value to your hypothesized proportion (p₀). JASP outputs the exact p-value along with a confidence interval for the observed proportion.

Related Statistical Calculators