Home / Statistical Tools / Analysis Tools / Confidence Interval / Math Details
Math Details¶
This page gives the exact formulas Quantum XL uses to compute confidence intervals. Each equation lists what it computes and where it appears in the output.
Notation¶
| Term | Description |
|---|---|
| \(x_i, w_i\) | data value and its frequency weight (\(w_i = 1\) when no frequency column is used) |
| \(n\) | effective sample size, \(n = \sum_i w_i\) |
| \(\bar{x}\) | weighted sample mean |
| \(s\) | sample standard deviation, \(s = \sqrt{\dfrac{\sum_i w_i (x_i - \bar{x})^2}{n - 1}}\) |
| \(\alpha\) | significance level; the confidence level is \(1 - \alpha\) |
| \(t_{\nu,\,q},\ \chi^2_{\nu,\,q}\) | the \(q\)-quantile of the Student's \(t\) / chi-square distribution with \(\nu\) degrees of freedom |
Confidence interval for the mean (t-interval)¶
Degrees of freedom \(= n - 1\); requires \(n \ge 2\). Used by: the mean CI result.
Confidence interval for the standard deviation (chi-square)¶
The larger chi-square quantile (upper tail) produces the lower bound, and vice versa. Constant data (\(s = 0\)) returns \([0, 0]\); requires \(n \ge 2\).
Confidence interval for a binomial proportion (Clopper–Pearson exact)¶
For a category observed \(x\) times out of \(n\), the exact interval is computed from the inverse Beta CDF:
| Term | Description |
|---|---|
| \(\operatorname{BetaInv}(q;\,a,\,b)\) | the \(q\)-quantile of the Beta distribution with shape parameters \(a, b\) |
| \(x\) | integer count for the category (frequencies rounded to whole counts) |
Boundary cases: \(p_{\text{lower}} = 0\) when \(x = 0\); \(p_{\text{upper}} = 1\) when \(x = n\). This is the exact (Clopper–Pearson) interval; requires exactly two categories.
Confidence interval for a Poisson rate (chi-square exact)¶
Let \(T = \sum_i w_i\,x_i\) be the total occurrences and \(n = \sum_i w_i\) the number of observation periods (both as integer counts). The point estimate is \(\hat{\lambda} = T / n\), and the exact interval is:
When \(T = 0\), \(\lambda_{\text{lower}} = 0\). This is the exact (Garwood) interval based on the chi-square distribution.
See Also¶
References¶
- Hahn, G. J., & Meeker, W. Q. (1991). Statistical Intervals: A Guide for Practitioners. New York: John Wiley & Sons.
- Clopper, C. J., & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26(4), 404–413.
- Garwood, F. (1936). Fiducial limits for the Poisson distribution. Biometrika, 28(3/4), 437–442.
- Casella, G., & Berger, R. L. (2002). Statistical Inference (2nd ed.). Pacific Grove, CA: Duxbury.
- Snedecor, G. W., & Cochran, W. G. (1989). Statistical Methods (8th ed.). Ames, IA: Iowa State University Press.