Not a hypothesis test — no null hypothesis, no p-value. Just where the two endpoints of a Wilson confidence interval come from.
Use the two sliders below to find them.
Move each slider until its prediction interval turns green.
Each slider has exactly one green position. Work in from the red end. When both are green, a box appears below.
The example above already works — only change these if you want to try numbers of your own.
Error: \( x \) must be a whole number strictly between 0 and \( n \). At \( x = 0 \) or \( x = n \) the sample proportion sits on a boundary, one endpoint collapses onto it, and there is nothing left to line up. Kept the previous value.
Error: \( n \) must be a whole number of at least 2. Kept the previous value.
Error: the confidence level must be between 1 and 99 percent. Kept the previous value.
The ★ is your observed \( \widehat{p} \). Each curve is the distribution of the sample proportion under one candidate \( p \) (its dashed tick on the axis marks the candidate); the shaded part and the bar along the axis are that candidate's prediction interval. A prediction interval can extend past 0 or 1 — that is the normal approximation showing its limits, and it does not affect the endpoints you are looking for.