File Exchange

image thumbnail

Accurate Confidence Intervals

version 1.0 (132 KB) by

Computes especially accurate confidence intervals for proportions, rates, and their differences.



View License

Estimates of proportion and rate-based performance measures may involve discrete distributions, small sample sizes, and extreme outcomes. Common methods for uncertainty characterization have limited accuracy in these circumstances. Accurate confidence interval estimators for proportions, rates, and their differences are included here, along with significance of difference estimators. The resulting confidence intervals have been validated and compared to common methods (see README). The programs search for confidence intervals using an integration of the Bayesian posterior with diffuse priors to measure the confidence level. The confidence interval estimators can find one or two-sided intervals. For two-sided intervals, either minimal-length, balanced-tail probabilities, or balanced-width can be selected.
>> prop_ci(90,100,0.05)
ans = 0.9000 0.8313 0.9485

>> rate_ci(10,50,0.05,4,1)
r_hat, Lower CI Bound, Upper CI Bound, x, A, Desired alpha, Length, Lower Tail, Upper Tail, Actual alpha, Delta alpha, Run Time
ans = 0.2000 0.1098 0.3678 10.0000 50.0000 0.0500 0.2579 0.0250 0.0250 0.0500 -0.0000 0.8600

Comments and Ratings (3)



License application.

Minor correct to ensuring integer inputs in prop_diff_ci.m

Minor changes to more gracefully handle NaN inputs.

Minor corrections to prop_ci.m and README.txt

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video