general

Calculate the confidence interval for a sample mean. Given a sample mean, sample size, standard deviation, and confidence level, computes the margin of error, lower and upper bounds, critical z-score, and standard error. Supports finite population correction (FPC) when a population size is provided, which narrows the interval for samples that are a large fraction of the population. Uses the Abramowitz & Stegun rational approximation for the inverse normal CDF to derive the critical z-value. Common in survey analysis, A/B testing, and quality control.

post/api/confidence_interval

Request

  • Base URL: https://calc.engineer
  • URL: https://calc.engineer/api/confidence_interval
  • Auth: none declared

Request body

sample_meannumber required

The observed sample mean (x-bar) around which the confidence interval is centered.

sample_sizenumber required

The number of observations in the sample (n). Must be a positive integer.

standard_deviationnumber required

The standard deviation of the sample or population. Must be a positive number.

confidence_levelnumber

Confidence level as a decimal between 0 and 1 (e.g. 0.95 for 95%). Default is 0.95.

population_sizenumber

Total population size for finite population correction (FPC). Omit for infinite population assumption.

Response

Computed result for confidence_interval

toolstring required
versionstring required
computed_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.