Statistical Calculators

One Proportion Z Test and Confidence Interval Calculator

Enter the count of successes and the sample size, or the proportion and the sample size. The calculator returns the Wilson score interval as the interval of record, the Wald interval beside it, and the z test against a stated proportion, with a conclusion in plain words.

One proportion calculator

The design effect stays at 1 for a simple random sample. A survey sample from a complex design enters its design effect, and the standard error widens by the square root of that value.

How this calculator works

Enter either the count of successes or the sample proportion itself, with the sample size. The calculator returns two intervals. The Wilson score interval is the interval of record on this page: it behaves well at small sample sizes and near the boundaries at 0 and 1, where the plain interval breaks down. The Wald interval prints beside it, labeled, because textbooks still teach it and visitors compare against it.

The test is the score z test. Its standard error is built at the proportion under test, not at the sample proportion, because the test starts from the claim that the stated proportion is the true one. The p-value is the chance of a sample proportion at least as far from the stated value, in the direction chosen, if that value were true.

Worked example

A sample of 100 holds 40 successes, a proportion of 0.40, tested against 0.5. The Wilson interval runs from 0.3094 to 0.4980. The Wald interval runs from 0.3040 to 0.4960. The z statistic is -2.00 and the p-value is 0.0455, below 0.05, so the test rejects a proportion of 0.5.

Values computed from the standard normal distribution. The method was checked against reference calculations: the entries in the worked example reproduce to four decimal places, and the full pair record sits in the package verification file.