# Visibility sample size calculator

> Runs per engine needed to estimate an AI mention rate to a chosen precision, or to detect a change between two windows, using 95% Wilson intervals.

Interactive version: https://dorecall.com/tools/visibility-sample-size

## Precision

Runs per engine for the 95% Wilson interval around an expected mention rate to be no wider than ± a target, in percentage points.

half-width = z / (1 + z²/n) · √( p(1−p)/n + z²/4n² ), z = 1.96

Example: expected rate 20%, ±5 pp → 245 runs per engine (13 per prompt across 20 prompts).

## Change between two windows

Recall calls a lift or decline only when the two 95% Wilson intervals no longer overlap. The required runs per window are the smallest n at which that happens with the chosen power, computed exactly over every pair of binomial outcomes at the two rates.

For comparison, the two-proportion z-test (α = 0.05, two-sided):

n = [ 1.96·√(2p̄(1−p̄)) + z_power·√(p₁(1−p₁) + p₂(1−p₂)) ]² / (p₁ − p₂)²

Example: 20% → 30% at 80% power → 486 runs per engine in each window by the separation rule; 294 by the z-test, which is less strict.
