Skip to content

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\)

Confidence interval for the mean (t-interval)

Quantum XL reports a Student t confidence interval for the mean, using \(n - 1\) degrees of freedom (requires \(n \ge 2\)):

\[ \bar{x} \pm t_{\,df,\,1-\alpha/2}\,\frac{s}{\sqrt{n}}, \qquad df = n - 1 \]

where \(t_{\,df,\,1-\alpha/2}\) is the \((1 - \alpha/2)\) quantile of the Student t distribution.

Full details: Student t Distribution. Used by: the mean CI result.

Confidence interval for the standard deviation (chi-square)

Quantum XL reports a chi-square confidence interval for the standard deviation. The larger chi-square quantile (upper tail) produces the lower bound, and the smaller quantile produces the upper bound; requires \(n \ge 2\):

\[ \left[\ \sqrt{\frac{(n-1)\,s^2}{\chi^2_{\,n-1,\,1-\alpha/2}}}\ ,\ \ \sqrt{\frac{(n-1)\,s^2}{\chi^2_{\,n-1,\,\alpha/2}}}\ \right] \]

with \(df = n - 1\), where \(\chi^2_{\,df,\,q}\) is the \(q\)-quantile of the chi-square distribution. Constant data (\(s^2 = 0\)) returns a zero-width interval.

Full details: Chi-Square Distribution.

Confidence interval for a binomial proportion (Clopper-Pearson exact)

For a category observed \(x\) times out of \(n\), Quantum XL computes the exact Clopper-Pearson interval from the inverse Beta CDF, where \(x\) is the integer count for the category (frequencies are rounded to whole counts); the interval requires exactly two categories:

\[ \text{lower} = 1 - \mathrm{Beta}^{-1}\!\left(1 - \tfrac{\alpha}{2};\ n - x + 1,\ x\right) \qquad \text{upper} = 1 - \mathrm{Beta}^{-1}\!\left(\tfrac{\alpha}{2};\ n - x,\ x + 1\right) \]

with \(\text{lower} = 0\) when \(x = 0\) and \(\text{upper} = 1\) when \(x = n\), where \(x\) is the number of successes in \(n\) trials and \(\mathrm{Beta}^{-1}(q;\ a,\ b)\) is the \(q\)-quantile of the Beta distribution with shape parameters \(a\) and \(b\).

Full details: Beta Distribution.

Confidence interval for a Poisson rate (chi-square exact)

Let \(T = \sum_i w_i\,x_i\) be the total occurrences and \(m = \sum_i w_i\) the number of observation periods (both as integer counts). The point estimate is \(\hat{\lambda} = T / m\), and Quantum XL computes the exact Garwood interval from the chi-square distribution:

\[ \text{lower} = \frac{\chi^2_{\,2T,\,\alpha/2}}{2m} \quad (0 \text{ when } T = 0) \qquad \text{upper} = \frac{\chi^2_{\,2(T+1),\,1-\alpha/2}}{2m} \]

where \(T\) is the total number of occurrences, \(m\) is the sample size or exposure, and \(\chi^2_{\,df,\,q}\) is the \(q\)-quantile of the chi-square distribution with \(df\) degrees of freedom.

Full details: Chi-Square Distribution.

Shared Math Details used here

This tool uses shared formulas defined once in Shared Math Details. See those pages for the exact definitions.

Shared concept Used here for Reference
Student t distribution the confidence interval for the mean Student t Distribution
Chi-square distribution the confidence intervals for the standard deviation and the Poisson rate Chi-Square Distribution
Beta distribution the Clopper-Pearson interval for a proportion Beta 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.