Sub topic 5
How certain is a completion rate? Confidence intervals for small samples
This chapter assumes you can compute a completion rate (successes divided by attempts) and know what a percentage is. It also assumes you can read short Python. You don't need to know statistics. The chapter explains what a confidence interval is as it goes.
Why one number is not enough
Suppose 8 of 10 participants completed a task. The observed completion rate is 80%. If you report only "80%", readers will assume the true rate for all your users is close to 80%. With ten people, that assumption is weak.
Your participants are a sample. The people who will use the product are the population. A different set of ten participants could easily give 6 of 10 or 10 of 10. The completion rate you observe is an estimate of the population's true rate, and the estimate wobbles from sample to sample.
A confidence interval puts a range around the estimate. A 95% confidence interval comes from a method that, over many studies, produces ranges that contain the true value about 95% of the time. The interval is not a guarantee about one study. It is an honest statement of how much the sample size limits what you know.
What the interval tells you
An interval has three parts:
- A point estimate, the observed rate (80%).
- A lower bound, the lowest true rate that is still plausible given your data.
- An upper bound, the highest plausible true rate.
Narrow intervals mean you know the rate precisely. Wide intervals mean you don't. Width depends mostly on sample size and, to a lesser degree, on how close the rate is to 50%.
Why the textbook formula fails on small samples
The standard formula is the Wald interval. It uses the observed rate p and sample size n:
- Standard error: sqrt(p × (1 − p) / n)
- Interval: p ± 1.96 × standard error
For 8 of 10, p = 0.8 and the standard error is sqrt(0.16 / 10) = 0.126. The margin is 1.96 × 0.126 = 0.248, so the interval runs from 55% to 105%. A completion rate cannot exceed 100%, so the formula is already giving nonsense.
It gets worse at the extremes. If all 10 participants succeed, p = 1, the standard error is 0, and the Wald interval is "100% to 100%". That claims perfect certainty from ten people.
The Wald method assumes the estimate follows a bell-shaped curve. That assumption is poor when n is small or when p is near 0 or 1. Usability studies often have both problems.
The adjusted Wald interval
The adjusted Wald interval (also called Agresti-Coull) fixes the problem with a simple change. Before computing, it adds some imaginary data: about two successes and two failures, which comes from z²/2 added to each side with z = 1.96. This pulls the estimate slightly toward 50% and widens the interval where it needs to be wider.
- Compute n_adj = n + z², where z = 1.96 and z² ≈ 3.84.
- Compute padj = (successes + z² / 2) / nadj.
- Compute the margin: z × sqrt(padj × (1 − padj) / n_adj).
- The interval is p_adj ± margin, clipped to the range 0 to 1.
Here it is in Python:
import math
def adjusted_wald(successes, n, z=1.96):
"""Approximate 95% confidence interval for a completion rate (adjusted Wald / Agresti-Coull)."""
n_adj = n + z ** 2
p_adj = (successes + z ** 2 / 2) / n_adj
margin = z * math.sqrt(p_adj * (1 - p_adj) / n_adj)
return max(0.0, p_adj - margin), min(1.0, p_adj + margin)
low, high = adjusted_wald(successes=8, n=10)
print(f"observed 80%, 95% CI about {low:.0%} to {high:.0%}")The output is observed 80%, 95% CI about 48% to 95%.
Read that result carefully. With 8 of 10 successes, the true completion rate could plausibly be as low as about 48%, which is a coin flip, or as high as about 95%. The interval is 47 percentage points wide. That is what ten participants can tell you.
The center of the adjusted interval (about 72%) is not the same as the observed rate (80%). This is expected. Report the observed rate as your headline figure and the interval as its uncertainty. Do not replace the observed rate with the adjusted center.
What happens when everyone succeeds
Try 10 of 10 with the same function. The adjusted Wald interval runs from about 68% up to 100% (the upper end is clipped at 1.0). Ten out of ten does not show that the task is "100% usable". It shows only that the true rate is probably above roughly two thirds. This is a useful result, because it stops you from overclaiming.
The same logic applies to 0 of 10. The interval's upper bound is well above zero, so a task nobody completed in a small test could still be completable by some users.
How sample size changes the interval
The table below holds the observed rate at 80% and varies the sample size. The intervals are adjusted Wald, rounded to whole percentages.
| Successes / n | Observed rate | 95% interval | Width (points) |
|---|---|---|---|
| 8 / 10 | 80% | 48% to 95% | 47 |
| 16 / 20 | 80% | 58% to 93% | 35 |
| 40 / 50 | 80% | 67% to 89% | 22 |
| 80 / 100 | 80% | 71% to 87% | 16 |
Precision improves with the square root of the sample size. Going from 10 to 20 participants helps a lot. Going from 50 to 100 helps much less. Doubling the sample does not halve the width. To halve it, you need about four times as many participants.
Choosing a method
The adjusted Wald interval is a good default for completion rates, and it is easy to compute by hand or in a spreadsheet. You will meet other methods:
- Wilson score interval. It behaves much like adjusted Wald, with a slightly different formula. Many practitioners use it for small samples.
- Clopper-Pearson (exact) interval. It guarantees at least 95% coverage but is often wider than needed, so it is conservative.
- Plain Wald. Avoid it for small samples or rates near 0% or 100%.
Pick one method and say which one you used. Switching methods between reports makes results hard to compare.
Comparing against a target
Intervals are most useful when you hold them against a goal. Say your team set a target of 80% completion for a checkout task, and you observe 8 of 10.
- The observed rate equals the target, but the interval (48% to 95%) includes values far below it. You cannot claim the target is met.
- If you observed 10 of 10, the interval (about 68% to 100%) still includes values below 80%. You still cannot be sure.
- You can claim the target is met only when the lower bound is at or above it.
Likewise, you can say a task fails a target only when the upper bound is below it. Anything in between is "not enough evidence yet". That is a legitimate finding, and it tells the team whether to run more sessions.
Comparing two designs
If design A gets 8 of 10 and design B gets 6 of 10, it is tempting to say A is better. Compute both intervals. A is about 48% to 95%. B is about 31% to 83%. The two ranges overlap heavily, so ten participants per design cannot separate them. Formal comparison needs a different test, which this chapter does not cover. For now, remember that overlapping wide intervals mean "no clear difference", not "no difference".
Common errors
- Reporting only the observed rate. Always show the interval next to it.
- Using plain Wald on small samples. It produces bounds above 100% or zero-width intervals.
- Treating the interval as the range of individual outcomes. It describes the population rate, not what any single user will do.
- Pooling attempts from the same person. If each participant attempts a task several times, the attempts are not independent. Count one outcome per participant per task.
- Counting partial success as success without saying so. Define success before the study (see the chapter on task design) and compute the interval from that definition.
- Over-reading small gaps. A difference of one or two participants moves the rate by 10 to 20 points at n = 10.
A reusable reporting helper
This script formats a task's result in the style recommended in this chapter. It defines everything it needs.
import math
def adjusted_wald(successes, n, z=1.96):
n_adj = n + z ** 2
p_adj = (successes + z ** 2 / 2) / n_adj
margin = z * math.sqrt(p_adj * (1 - p_adj) / n_adj)
return max(0.0, p_adj - margin), min(1.0, p_adj + margin)
def report(task, successes, n, target=None):
low, high = adjusted_wald(successes, n)
line = f"{task}: {successes}/{n} = {successes / n:.0%} (95% CI {low:.0%} to {high:.0%})"
if target is not None:
if low >= target:
line += f" - meets {target:.0%} target"
elif high < target:
line += f" - below {target:.0%} target"
else:
line += f" - inconclusive against {target:.0%} target"
return line
print(report("Find order status", 8, 10, target=0.80))
print(report("Change password", 40, 50, target=0.60))
print(report("Export invoice", 2, 12, target=0.50))The first line is inconclusive. The second meets its 60% target because its lower bound is 67%. The third is below target because its upper bound, about 47%, is under 50%.
Exercise
A team tests a signup flow with 20 participants. Sixteen complete it. The team's target is a 75% completion rate. Using the table in this chapter, can the team say the target is met, below target, or inconclusive? Explain, and say roughly how many more participants you might need to settle it.
Show answer
The observed rate is 80%, and the 95% interval is about 58% to 93%. The target of 75% falls inside that range, so the result is inconclusive. The lower bound is below the target, so you cannot claim it is met, and the upper bound is above it, so you cannot claim it is missed. A narrower interval needs more participants. At n = 50 with the same 80% rate, the interval is about 67% to 89%, which still includes 75%. The lower bound only clears 75% if the rate stays high and the sample grows well beyond 100. Because the observed rate is close to the target, no practical sample size will settle it quickly. The better option is to decide whether a rate somewhere between 58% and 93% is acceptable, or to improve the flow and retest.
Exercise
Why does the plain Wald interval give "100% to 100%" for 10 of 10 successes, and what does the adjusted Wald interval give instead?
Show answer
Plain Wald multiplies by p × (1 − p). When p = 1 that product is zero, so the margin is zero and the interval collapses to a single point. This wrongly claims perfect certainty. Adjusted Wald adds about two imaginary successes and two failures first, so p_adj is about 86% rather than 100%, and the margin is not zero. The interval is about 68% to 100%, with the upper end clipped at 100%.