Apply the Agresti-Coull Interval transformation.
Return the upper confidence bound of a one-tailed confidence interval.
Return the lower confidence bound of a one-tailed confidence interval; enforce 0 as lowest possible bound.
Return both bounds of a two-tailed confidence interval; enforce 0 as lowest possible bound.
CI on the Proportion
The Confidence Interval on the Proportion uses
X
, the number of successes found in a sample, andn
, the size of the sample, to estimate the population parameters. This implementation uses the Agresti-Coull Interval method, which is appropriate for any sample sizen
.mctad.confidenceIntervalOnTheProportion()
returns an Array of lower, upper values for the(1 - α/2)
interval or a Number for the lower or upper(1 - α)
boundary.Assumptions
X
is the number of successes found in a sample,n
is the size of the sample, and 0.0 <α
< 1.0. By default, the confidence interval is two-tailed; this may be changed by specifyingtype
as either 'l' for lower, or 'u' for upper. Any other value fortype
generates a two-tailed confidence interval.Use
mctad.confidenceIntervalOnTheProportion(X, n, α, 'u')
Inline Comments