Confidence Interval Formulas
The formula used by the calculator depends on the parameter being estimated, the number of samples, and whether the population standard deviation is known.
For Mean (One-Sample):
Population Standard Deviation ($\sigma$) Unknown:
$$\bar{x} \pm t^* \cdot \frac{s}{\sqrt{n}}$$
- $\bar{x}$: sample mean
- $t^*$: critical t-value (depends on confidence level and degrees of freedom $df=n-1$)
- $s$: sample standard deviation
- $n$: sample size
Population Standard Deviation ($\sigma$) Known:
$$\bar{x} \pm z^* \cdot \frac{\sigma}{\sqrt{n}}$$
- $\bar{x}$: sample mean
- $z^*$: critical z-value (depends on confidence level)
- $\sigma$: known population standard deviation
- $n$: sample size
For Proportion (One-Sample):
$$\hat{p} \pm z^* \cdot \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}$$
- $\hat{p}$: sample proportion
- $z*$: critical z-value (depends on confidence level)
- $n$: sample size
For Two-Sample Mean (Independent Samples):
Population Standard Deviations ($\sigma_1$, $\sigma_2$) Known:
$$(\bar{x}_1 - \bar{x}_2) \pm z^* \cdot \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}$$
Population Standard Deviations Unknown:
Degrees of freedom for the t-distribution in two-sample cases are more complex and may use the Welch-Satterthwaite approximation.
For Paired Samples (Mean of Differences):
$$\bar{d} \pm t^* \cdot \frac{s_d}{\sqrt{n}}$$
- $\bar{d}$: mean of the paired differences
- $s_d$: standard deviation of the paired differences
- $n$: number of pairs
- $t^*$: critical t-value (confidence level, $df = n-1$)
Note: When the population standard deviation ($\sigma$) is known, or when the sample size is very large (typically $n \geq 30$), the t-distribution formula simplifies and the critical value $t^*$ is replaced by $z^*$. This is because the sampling distribution of the sample mean approaches normality as sample size increases (Central Limit Theorem).
For Two-Sample Proportion:
$$(\hat{p}_1 - \hat{p}_2) \pm z^* \cdot \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}$$