Confidence Interval Calculator

Calculate confidence intervals for population mean and proportion. Uses Z-distribution for large samples (n≥30) and T-distribution for small samples (n<30).
Critical Values Table

Z Critical Values (n ≥ 30)

90% Confidence: Z = 1.645
95% Confidence: Z = 1.96
99% Confidence: Z = 2.576

T Critical Values (small sample) (Degrees of Freedom (df))

Degrees of Freedom (df) t(90%) t(95%) t(99%)
What is Confidence Interval?
A confidence interval represents the probability that a population parameter (mean, proportion, etc.) falls within a specific range.

Confidence Level
• 95% confidence: Out of 100 samples, 95 will contain the true parameter
• Higher confidence level = wider interval

Margin of Error
• E = Critical Value × (SD / √n)
• Larger sample size = smaller margin of error

Distribution Selection
• n ≥ 30: Z-distribution (normal approximation)
• n < 30: T-distribution (more conservative, heavier tails)

Complete Confidence Interval Guide: Core Concepts of Statistical Estimation (2025)

Definition and Basic Concepts of Confidence Intervals

A Confidence Interval (CI) represents an interval expected to contain a population parameter (mean, proportion, standard deviation, etc.) based on sample data. For example, if 500 college students have a mean height of 170cm with SD of 10cm, and the 95% CI is [168.1cm, 171.9cm], we interpret: "The mean height of all college students is between 168.1cm and 171.9cm with 95% confidence." Confidence levels are typically 90%, 95%, 99%, where 95% means "if we repeat sampling 100 times, about 95 intervals will contain the true parameter."

Z-Distribution vs T-Distribution: When to Use Which?

Use Z-distribution (standard normal) when sample size is sufficiently large (generally n ≥ 30) because the Central Limit Theorem ensures the sampling distribution approximates normal. Z critical values are fixed: 90% confidence = 1.645, 95% = 1.96, 99% = 2.576. Use T-distribution for small samples (n < 30), which has heavier tails and provides more conservative estimates. T-distribution depends on degrees of freedom (df = n - 1).

Calculating Confidence Interval for Means with Examples

Calculate confidence interval for population mean using: CI = x̄ ± (critical value × s / √n). Example: 25 students have mean math score of 75 with SD of 12. For 95% CI, since n=25 < 30, use T-distribution. Degrees of freedom df = 25 - 1 = 24, t(95%, df=24) = 2.064. Standard error SE = 12 / √25 = 2.4, margin of error E = 2.064 × 2.4 = 4.95. Therefore 95% CI = [75 - 4.95, 75 + 4.95] = [70.05, 79.95].

Confidence Interval for Proportions (Binomial Distribution)

Calculate confidence interval for population proportion using: CI = p̂ ± Z × √[p̂(1-p̂) / n]. Example: Out of 800 voters, 480 support candidate A. Sample proportion p̂ = 480/800 = 0.6 (60%). For 95% CI, Z(95%) = 1.96, SE = √[0.6 × 0.4 / 800] = 0.0173, E = 1.96 × 0.0173 = 0.034 (3.4%). 95% CI = [0.566, 0.634] or [56.6%, 63.4%].

Determining Sample Size: Achieving Desired Margin of Error

Calculate required sample size for desired margin of error E and confidence level: n = (Z × σ / E)². Example: For 95% confidence with margin of error ±2 points and population SD of 15 points, Z(95%) = 1.96, n = (1.96 × 15 / 2)² = (14.7)² = 216.09 → minimum 217 samples required. To halve the margin of error, sample size must increase 4-fold.

Common Misconceptions and Correct Interpretation of CIs

Interpreting a 95% CI [168cm, 172cm] as "95% probability the true mean is in this interval" is incorrect in frequentist statistics. The parameter is fixed (though unknown), so probability is either 0% or 100%. Correct interpretation: "If we repeat this sampling procedure 100 times, about 95 of the constructed intervals will contain the true mean." CI refers to the long-run frequency of capturing the parameter across repeated sampling.