Confidence interval formulas and methods
| Parameter | Method | Two-sided interval |
|---|---|---|
| Mean, unknown σ | One-sample Student t | x̄ ± t1−α/2,n−1 × s/√n. Formula reference: NIST/SEMATECH, confidence limits for a mean (source-f48533e2ea28c5134b0f2396c59d8aa8). Hypothetical worked example, separate from calculator output: n = 25, sample mean = 50 mm, sample SD = 10 mm, confidence = 95%. Population σ is unknown, so use Student t with 24 degrees of freedom. SE = 10/√25 = 2 mm; t critical value ≈ 2.063899. The interval is 50 ± 2.063899 × 2 = [45.872203, 54.127797] mm, rounded to [45.87, 54.13] mm. This estimates the population mean, not the range of individual measurements. |
| Mean, known σ | Normal z | x̄ ± z1−α/2 × σ/√n. Use σ only when the population standard deviation is known independently; it is not the sample SD. Formula reference: NIST/SEMATECH, what confidence intervals are (source-13abf4b1fcfea2b4d1c424a6045ef415). |
| One proportion | Wilson score | Let p̂ = x/n and z = z₁₋α/₂. The uncorrected Wilson interval is [c − h, c + h], where c = (p̂ + z²/(2n))/(1 + z²/n) and h = z × √(p̂(1 − p̂)/n + z²/(4n²))/(1 + z²/n). Its limits stay in [0, 1]. The alternative Wald interval is p̂ ± z × √(p̂(1 − p̂)/n); its limits are not clipped. For comparative evidence on score methods and coverage problems with simple proportion intervals, see Newcombe (1998), source-53e0d549d8fa20265e527aba391e1796. Hypothetical worked example, separate from calculator output: x = 40 successes in n = 100 trials, confidence = 95%. Choose Wilson; p̂ = 0.40 and z ≈ 1.959964. Substitution gives [0.309401, 0.497997], rounded to [30.94%, 49.80%]. This estimates the population success probability. |
| Difference in means | Welch t | (x̄₁ − x̄₂) ± t1−α/2,ν × √(s₁²/n₁ + s₂²/n₂), where ν = (s₁²/n₁ + s₂²/n₂)² / ((s₁²/n₁)²/(n₁ − 1) + (s₂²/n₂)²/(n₂ − 1)). Retain the fractional degrees of freedom when finding the critical value. The estimate is group 1 minus group 2, in the common measurement units: positive means group 1 has the larger sample mean; negative means group 2 does. Hypothetical worked example, separate from calculator output: group 1 has n₁ = 25, mean = 50 mm, sample SD = 10 mm; group 2 has n₂ = 36, mean = 45 mm, sample SD = 12 mm. For independent groups at 95% confidence, choose Welch t without assuming equal variances. The estimate is 5 mm; SE = √(100/25 + 144/36) = √8 ≈ 2.828427 mm; ν ≈ 56.949153; t critical value ≈ 2.002504. The interval is [−0.663937, 10.663937] mm, rounded to [−0.66, 10.66] mm. It includes zero and differences in either direction; it does not prove the population means are equal. |
| Difference in proportions | Newcombe method 10 | Let d = p̂₁ − p̂₂ and let [L₁, U₁] and [L₂, U₂] be the uncorrected Wilson intervals for the two groups at the selected confidence level. Newcombe method 10 gives lower limit d − √((p̂₁ − L₁)² + (U₂ − p̂₂)²) and upper limit d + √((U₁ − p̂₁)² + (p̂₂ − L₂)²). The existing methodological reference is Newcombe (1998), source-f5a2ccde294123e2ff9d363c5bbf72f1; full-text formula verification remains a separate source-review task. The estimate is group 1 minus group 2: positive means the observed proportion is higher in group 1; negative means it is higher in group 2. Multiply a proportion difference by 100 to express percentage points, not relative percentage change. Hypothetical worked example, separate from calculator output: group 1 has 60 successes in 100 trials and group 2 has 40 successes in 100 trials. For independent groups at 95% confidence, choose Newcombe method 10. The Wilson intervals are approximately [0.502003, 0.690599] and [0.309401, 0.497997]. Combining their unrounded limits gives [0.061411, 0.328126], rounded to [6.14, 32.81] percentage points. The estimated difference is 20 percentage points; the interval is entirely positive. The relative increase from 40% to 60% is 50%, a different quantity that this interval does not estimate. |
α is 1 minus the confidence level expressed as a fraction: at 95% confidence, α = 0.05. Here n is sample size, x̄ is sample mean, s is sample standard deviation, σ is known population standard deviation, x is the success count, and p̂ = x/n is the observed proportion. Subscripts 1 and 2 identify the groups. SE denotes standard error. The critical values z₁₋α/₂ and t₁₋α/₂,ν are the 1 − α/2 quantiles of the standard normal and Student t distributions; ν denotes degrees of freedom. Wilson uses center c and half-width h; L and U denote interval limits. Welch degrees of freedom use the Welch–Satterthwaite approximation. Wilson and Newcombe limits can be asymmetric, so the calculator reports separate distances from the estimate to each limit. The hypothetical examples were calculated independently of the managed calculator using the displayed formulas; intermediate values are shown approximately, and final limits are rounded only after calculation.