Confidence Interval¶

confint
(test::HypothesisTest, alpha=0.05; tail=:both)¶ Compute a confidence interval C with coverage 1
alpha
.If
tail
is:both
(default), then a twosided confidence interval is returned. Iftail
is:left
or:right
, then a onesided confidence interval is returnedNote
Most of the implemented confidence intervals are strongly consistent, that is, the confidence interval with coverage 1
alpha
does not contain the test statistic under \(h_0\) if and only if the corresponding test rejects the null hypothesis \(h_0: \theta=\theta_0\):\[\begin{split}C (x, 1 − \alpha) = \{\theta : p_\theta (x) > \alpha\},\end{split}\]where \(p_\theta\) is the pvalue of the corresponding test.
Confidence Interval for Binomial Proportions¶

confint
(test::BinomialTest, alpha=0.05; tail=:both, method=:clopper_pearson) Compute a confidence interval with coverage 1
alpha
for a binomial proportion using one of the following methods. Possible values formethod
are: ClopperPearson interval
:clopper_pearson
(default): This interval is based on the binomial distribution. The empirical coverage is never less than the nominal coverage of 1alpha
; it is usually too conservative.  Wald interval
:wald
(normal approximation interval): This interval relies on the standard approximation of the actual binomial distribution by a normal distribution. Coverage can be erratically poor for success probabilities close to zero or one.  Wilson score interval
:wilson
: This interval relies on a normal approximation. In contrast to:wald
the standard deviation is not approximated by an empirical estimate resulting in good empirical coverages even for small numbers of draws and extreme success probabilities.  Jeffreys interval
:jeffrey
: Bayesian confidence interval obtained by using a noninformative Jeffreys prior. The interval is very similar to the Wilson interval.  Agresti Coull interval
:agresti_coull
: Simplified version of the Wilson interval; they are centered around the same value. The Agresti Coull interval has higher or equal coverage.
References:
 Brown, L.D., Cai, T.T., and DasGupta, A. Interval estimation for a binomial proportion. Statistical Science, 16(2):101–117, 2001.
 ClopperPearson interval
Confidence Interval for Multinomial Proportions¶

confint
(test::PowerDivergenceTest, alpha=0.05; tail=:both, method=:sison_glaz) Compute a confidence interval with coverage 1
alpha
for multinomial proportions using one of the following methods. Possible values formethod
are: Sison, Glaz intervals
:sison_glaz
(default):  Bootstrap intervals
:bootstrap
:  Quesenberry, Hurst intervals
:quesenberry_hurst
:  Gold intervals
:gold
(Asymptotic simultaneous intervals):
References:
 Agresti, Alan. Categorical Data Analysis, 3rd Edition. Wiley, 2013.
 Sison, C.P and Glaz, J. Simultaneous confidence intervals and sample size determination for multinomial proportions. Journal of the American Statistical Association, 90:366369, 1995.
 Quesensberry, C.P. and Hurst, D.C. Large Sample Simultaneous Confidence Intervals for Multinational Proportions. Technometrics, 6:191195, 1964.
 Gold, R. Z. Tests Auxiliary to \({\chi^{2}}\) Tests in a Markov Chain. Annals of Mathematical Statistics, 30:5674, 1963.
 Sison, Glaz intervals
Confidence Interval for Fisher exact test¶

confint
(x::FisherExactTest, alpha::Float64=0.05; tail=:both, method=:central) Compute a confidence interval with coverage 1
alpha
by inverting the:central
pvalue.References:
 Gibbons, J.D, Pratt, J.W. Pvalues: Interpretation and Methodology American Statistican, 29(1):2025, 1975.
 Fay, M.P. Supplementary material to Confidence intervals that match Fisher’s exact or Blaker’s exact tests. Biostatistics, 0(0):113, 2009.