Algorithm Providing Ordered Integer Sequences for Sampling with Replacement Confidence Intervals
Abstract
1. Introduction
2. Constructing a CI
- CIs provided in Table 1 are not optimal; 2, 3, 5, 6, and 8 instead of 1, 2, 4, 5, and 7 provide better estimates;
- If it is optimal to provide an at least coverage, then should be [0, 3] instead of [0, 2] with a coverage of 98.72% instead of 92.98%; should be [0, 5] or [1, 6] instead of [1, 5] with coverage of 95.27% and 96.12% instead of 92.44%;
- If it is optimal to provide an at most coverage, then should be [0, 3] instead of [0, 4] with a coverage of 87.91% instead of 97.72%; should be [0, 6] instead of [1, 7] with a coverage of 94.52% or [1, 6] with a coverage of 93.92% instead of 97.72%;
- As can be observed, imposing a single rule (such as “at least” or “at most”) is not enough; see alternatives for : [0, 5] has a coverage of 95.27% and [1, 6] has a coverage of 96.12% or alternatives for : [0, 6] has a coverage of 94.52% and [1, 6] has a coverage of 93.92%;
- Being closest to the imposed coverage but at least equal (or at most equal) to it seems a reasonable criterion but does not work all the time; thus, for it to be the closest to the imposed coverage but at most equal, should be [1, 5] with a coverage of 92.44% and should be [0, 6] with a coverage of 94.52%. However, since the left boundary of is 1, another common sense rule says that the left boundary of should be at least 1.
3. Balanced CI with Ordered Integer Sequences
Algorithm 1: BalancedCI |
4. Discussion
4.1. Question 1
4.2. Question 2
4.3. Question 3
- Q3.1: Was the detection of the bacterial load with non-invasive fluorescence imaging statistically significant in the group, or can it be asserted as being observed by chance?Answer: The observed proportion was 8 out of 20. The sequence of integers for and is 0 0 0 1 1 2 3 4 4 5 6 7 8 9 10 11 13 14 16 18 20. The CI for is [4, 12]. The answer is Yes (detection of the bacterial load with non-invasive fluorescence imaging was statistically significant in the group), with a true risk (of being in error in the coverage) of 3.6%.
- Q3.2: Was the development of a bacterial infection a real risk for the patients following the procedure, or can it be asserted as being observed by chance?Answer: The observed proportion was 4 out of 20. Using the same sequence of integers, the CI for is [1, 7], and the answer is Yes (developing a bacterial infection was a real risk for the patients following the procedure), with a true risk of 4.3%.
- Q3.3: Was Pseudomonas a real threat for the patients following the procedure, or can it be asserted as being observed by chance?Answer: The observed proportion was 3 out of 20. Using the same sequence of integers, the CI for is [1, 6], and the answer is Yes (Pseudomonas was a real threat for the patients following the procedure), with a true risk of 6.1%.
- Q3.4: Was the development of a bacterial infection a real risk for the patients possessing bacterial load detected by non-invasive fluorescence imaging, or can it be asserted as being observed by chance?Answer: The observed proportion was 4 out of 8. The sequence of integers for and is 0 0 0 1 2 3 4 6 8. The CI for is [2, 6], and the answer is Yes (developing a bacterial infection was a real risk for the patients possessing bacterial load detected by non-invasive fluorescence imaging), with a true risk (of being in error in the coverage) of 7.0%.
- Q3.5: Was infection with Pseudomonas a real risk for the patients possessing bacterial load detected by non-invasive fluorescence imaging, or can it be asserted as being observed by chance?Answer: The observed proportion was 4 out of 8. The sequence of integers for and is 0 0 0 1 2 3 4 6 8. The CI for is [1, 5]. The answer is Yes (infection with Pseudomonas was a real risk for the patients possessing bacterial load detected by non-invasive fluorescence imaging), with a true risk (of being in error in the coverage) of 5.9%.
4.4. Question 4
5. Conclusions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
- For a variable x from a sample of size m, the interval is .
- For a proportion , the interval is .
- : ceil function (smallest integer greater than);
- : floor function (greatest integer smaller than);
- : closed interval;
- : significance level;
- CI: confidence interval;
- p: non-coverage probability;
- , .
Appendix A.1. Ordered Integer Sequence for α = 0.05 and m = 30
Appendix A.2. Ordered Integer Sequence for α = 0.05 and m = 45
Appendix A.3. Ordered Integer Sequence for α = 0.05 and m = 100
Appendix A.4. Ordered Integer Sequence for α = 0.05 and m = 900
References
- Bernoulli, J. Ars Conjectandi; Inpenfis Thurnsiorum Fratum: Basel, Switzerland, 1713; Available online: http://sheynin.de/download/bernoulli.pdf (accessed on 10 March 2025).
- Andrews, G.E. The Geometric Series in Calculus. Am. Math. Mon. 1998, 105, 36–40. [Google Scholar] [CrossRef]
- Clopper, C.J.; Pearson, E.S. The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika 1934, 26, 404–413. [Google Scholar] [CrossRef]
- Blyth, C.R.; Still, H.A. Binomial confidence intervals. J. Am. Stat. Assoc. 1983, 78, 108–116. [Google Scholar] [CrossRef]
- Wald, A. Contributions to the theory of statistical estimation and testing hypotheses. Ann. Math. Stat. 1939, 10, 299–326. [Google Scholar] [CrossRef]
- Korn, E.L.; Graubard, B.I. Confidence intervals for proportions with small expected number of positive counts estimated from survey data. Surv. Methodol. 1998, 24, 193–201. [Google Scholar]
- Bolboacă, S.D.; Jäntschi, L. Optimized confidence intervals for binomial distributed samples. Int. J. Pure Appl. Math. 2008, 47, 1–8. [Google Scholar]
- Mishra, R.; Singh, R.; Raghav, Y.S. On combining ratio and product type estimators for estimation of finite population mean in adaptive cluster sampling design. Braz. J. Biom. 2024, 42, 412–420. [Google Scholar] [CrossRef]
- Ahmadini, A.A.H.; Singh, R.; Raghav, Y.S.; Kumari, A. Estimation of population mean using ranked set sampling in the presence of measurement errors. Kuwait J. Sci. 2024, 51, 100236. [Google Scholar] [CrossRef]
- Raghav, Y.S.; Ahmadini, A.A.H.; Mahnashi, A.M.; Rather, K.U.I. Enhancing estimation efficiency with proposed estimator: A comparative analysis of Poisson regression-based mean estimators. Kuwait J. Sci. 2025, 52, 100282. [Google Scholar] [CrossRef]
- Jäntschi, L. Binomial distributed data confidence interval calculation: Formulas, algorithms and examples. Symmetry 2022, 14, 1104. [Google Scholar] [CrossRef]
- Viana, E.H. 562 Bacterial Fluorescence Signals Are Associated with Dermal Regeneration Template Infections in Burn Patients. J. Burn Care Res. 2025, 46, S149. [Google Scholar] [CrossRef]
- Agresti, A.; Coull, B.A. Approximate is better than "exact" for interval estimation of binomial proportions. Am. Stat. 1998, 52, 119–126. [Google Scholar] [CrossRef] [PubMed]
- Wilson, E.B. Probable inference, the law of succession, and statistical inference. J. Am. Stat. Assoc. 1927, 22, 209–212. [Google Scholar] [CrossRef]
- Brown, L.D.; Cai, T.T.; DasGupta, A. Interval Estimation for a Binomial Proportion. Stat. Sci. 2001, 16, 101–133. [Google Scholar] [CrossRef]
- Casella, G. Refining binomial confidence intervals. Can. J. Stat. 1986, 14, 113–129. [Google Scholar] [CrossRef]
- Jeffreys, H. An invariant form for the prior probability in estimation problems. Proc. R. Soc. Lond. Ser. A Math. Phys. Sci. 1946, 186, 453–461. [Google Scholar] [CrossRef]
x | Ordered Integer Sequences | Coverage | ||
---|---|---|---|---|
1 | [0, 2] | , | 92.98% | |
2 | [0, 4] | , | 96.72% | |
3 | [1, 5] | , | 92.44% | |
4 | [1, 7] | , | 98.17% | |
5 | [2, 8] | , | 97.85% | |
6 | [3, 9] | , | 98.17% | |
7 | [5, 9] | , | 92.44% | |
8 | [6, 10] | , | 96.72% | |
9 | [8, 10] | , | 92.98% |
Stat. | ||||
---|---|---|---|---|
5.1000 | 5.0045 | 4.9566 | 4.9961 | |
0.8793 | 0.6591 | 0.4939 | 0.1561 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Jäntschi, L. Algorithm Providing Ordered Integer Sequences for Sampling with Replacement Confidence Intervals. Algorithms 2025, 18, 459. https://doi.org/10.3390/a18080459
Jäntschi L. Algorithm Providing Ordered Integer Sequences for Sampling with Replacement Confidence Intervals. Algorithms. 2025; 18(8):459. https://doi.org/10.3390/a18080459
Chicago/Turabian StyleJäntschi, Lorentz. 2025. "Algorithm Providing Ordered Integer Sequences for Sampling with Replacement Confidence Intervals" Algorithms 18, no. 8: 459. https://doi.org/10.3390/a18080459
APA StyleJäntschi, L. (2025). Algorithm Providing Ordered Integer Sequences for Sampling with Replacement Confidence Intervals. Algorithms, 18(8), 459. https://doi.org/10.3390/a18080459