Accurate Confidence Intervals

Computes especially accurate confidence intervals for proportions, rates, and their differences.
4.6K Downloads
Updated 31 Mar 2016

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.
Examples:
>> 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

Cite As

Tim Ross (2024). Accurate Confidence Intervals (https://www.mathworks.com/matlabcentral/fileexchange/3031-accurate-confidence-intervals), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Added stubs for vestigial functions (left over from development) to prevent compiler warnings.
License application.