Skip to main content
Log in

An algorithm to construct Monte Carlo confidence intervals for an arbitrary function of probability distribution parameters

  • Original Paper
  • Published:
Computational Statistics Aims and scope Submit manuscript

Abstract

We derive a new algorithm for calculating an exact confidence interval for a parameter of location or scale family, based on a two-sided hypothesis test on the parameter of interest, using some pivotal quantities. We use this algorithm to calculate approximate confidence intervals for the parameter or a function of the parameter of one-parameter continuous distributions. After appropriate heuristic modifications of the algorithm we use it to obtain approximate confidence intervals for a parameter or a function of parameters for multi-parameter continuous distributions. The advantage of the algorithm is that it is general and gives a fast approximation of an exact confidence interval. Some asymptotic (analytical) results are shown which validate the use of the method under certain regularity conditions. In addition, numerical results of the method compare well with those obtained by other known methods of the literature on the exponential, the normal, the gamma and the Weibull distribution.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

References

  • Bain L, Engelhardt M (1975) A two-moment chi-square approximation for the statistic log(\(\bar{{x}}/\tilde{x})\). J Am Stat Assoc 70(352):948–950

    MATH  Google Scholar 

  • Bhaumik D, Kapur K, Gibbons R (2009) Testing parameters of a gamma distribution for small samples. Technometrics 51(3):326–334

    Article  MathSciNet  Google Scholar 

  • Casella G, Berger R (2002) Statistical inference. Duxbury press, Belmont

    Google Scholar 

  • Choi SC, Wette R (1969) Maximum likelihood estimation of the parameters of the gamma distribution and their bias. Technometrics 11(4):683–690

    Article  MATH  Google Scholar 

  • Cohen C (1965) Maximum likelihood estimation in the weibull distribution based on complete and on censored samples. Technometrics 7(4):579–588

    Article  MathSciNet  Google Scholar 

  • DiCiccio T (1984) On parameter transformations and interval estimation. Biometrica 71(3):477–485

    Article  MathSciNet  MATH  Google Scholar 

  • DiCiccio T, Efron B (1996) On bootstrap procedures for second-order accurate confidence limits in parametric models. Stat Sinica 5:141–160

    Google Scholar 

  • DiCiccio T, Romano J (1995) Bootstrap confidence intervals. Stat Sci 11(3):189–228

    Google Scholar 

  • Efron B (1987) Better bootstrap confidence intervals. J Am Stat Assoc 82(397):171–185

    Article  MathSciNet  MATH  Google Scholar 

  • Efron B, Hinkley D (1978) Assessing the accuracy of the maximum likelihood estimator: observed versus expected Fisher information. Biometrica 65(3):457–482

    Article  MathSciNet  MATH  Google Scholar 

  • Efron B, Tibshirani R (1993) An introduction to the bootstrap. Chapman& Hall, New York

    MATH  Google Scholar 

  • Engelhardt M, Bain L (1978) Construction of optimal inference procedures for the parameters of the gamma distribution. Technometrics 20(4):485–489

    Article  MATH  Google Scholar 

  • Engelhardt M, Bain L (1977) Uniformly most powerful unbiased tests on the scale parameter of a gamma distribution with a nuisance shape parameter. Technometrics 19(1):77–81

    Article  MathSciNet  MATH  Google Scholar 

  • Garthwaite P, Buckland S (1992) Generating Monte Carlo confidence intervals by the Robbins-Monro process. J R Stat Soc Ser C (Appl Stat) 41(1):159–171

    MathSciNet  MATH  Google Scholar 

  • Gelman A, Carlin J, Stern H, Rubin D (2004) Bayesian data analysis, 2nd edn. Chapman& Hall, London

    MATH  Google Scholar 

  • Hall P (1988) Theoretical comparison of bootstrap confidence intervals. Ann Stat 16(3):927–953

    Article  MATH  Google Scholar 

  • Hemelrijk J (1966) Underlining random variables. Statistica Neerlandica 20:1–7. doi:10.1111/j.1467-9574.1966.tb00488.x

    Article  MathSciNet  Google Scholar 

  • Hillier G, Armstrong M (1999) The density of the maximum likelihood estimator. Econometrica 67(6): 1459–1470

    Google Scholar 

  • Hydrognomon (2009–2012) Hydrological time series processing software, http://hydrognomon.org/

  • Kisielinska J (2012) The exact bootstrap method shown on the example of the mean and variance estimation. Comput Stat. doi:10.1007/s00180-012-0350-0

  • Kite GW (1988) Frequency and risk analyses in hydrology. Water Recources Publications

  • Koutsoyiannis D (1997) Statistical hydrology, 4th edn. National Technical University of Athens, Athens

    Google Scholar 

  • Koutsoyiannis D, Kozanis S (2005) A simple Monte Carlo methodology to calculate generalized approximate confidence intervals. Research report. Hydrologic Research Center

  • Koutsoyiannis D, Efstratiadis A, Georgakakos KP (2007) Uncertainty assessment of future hydroclimatic predictions: a comparison of probabilistic and scenario-based approaches. J Hydrometeorol 8(3): 261–281

    Google Scholar 

  • Lawless J (2003) Statistical models and methods for lifetime data. Wiley, London

    MATH  Google Scholar 

  • Papoulis A, Pillai U (2002) Probability, random variables and stochastic processes. McGraw-Hill, New York

  • Ripley B (1987) Stochastic simulation. Wiley, London

    Book  MATH  Google Scholar 

  • Robert C (2007) The Bayesian choice: from decision-theoretic foundations to computational implementation. Springer, New York

    Google Scholar 

  • Román-Montoya Y, Rueda M, Arcos M (2008) Confidence intervals for quantile estimation using Jackknife techniques. Comput Stat 23:573–585

    Article  MATH  Google Scholar 

  • Rozos E, Efstratiadis A, Nalbantis I, Koutsoyiannis D (2004) Calibration of a semi-distributed model for conjuctinve simulation of surface and groundwater flows. Hydrol Sci J 49(5):819–842

    Article  Google Scholar 

  • Shao J (2003) Mathematical statistics, 2nd edn. Springer, New York

    Book  MATH  Google Scholar 

  • Son YS, Oh M (2006) Bayesian estimation of the two-parameter gamma distribution. Commun Stat Simul Comput 35(2):285–293

    Article  MathSciNet  MATH  Google Scholar 

  • Wilks SS (1938) Shortest average confidence intervals from large samples. Ann Math Stat 9(3):166–175

    Article  Google Scholar 

  • Yang Z, Xie M, Wong A (2007) A unified confidence interval for reliability-related quantities of two-parameter Weibull distribution. J Stat Comput Simul 77(5):365–378

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

The authors are grateful to two anonymous reviewers, for their positive comments which were very helpful for substantial improvement of the manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hristos Tyralis.

Appendices

Appendix A: Some theoretical results

First we show that the confidence interval for the parameter \(\mu \) of a normal distribution \(N(\mu ,\sigma ^{2})\) is asymptotically equivalent to a Wald-type interval. For the normal distribution we define \(\varvec{\theta } = \left( {\mu ,\sigma } \right),\, {{\varvec{T}}}({{{{\underline{\varvec{x}}}}}}) = (T_{1} ({{{{\underline{\varvec{x}}}}}}),T_{2} ({{{\underline{\varvec{x}}}}}))\), where \(T_{1} ({{{{\underline{\varvec{x}}}}}}) =\underline{\mu }, \text{ and} \, T_{2} ({{{{\underline{\varvec{x}}}}}}) = \underline{\sigma }\) are the MLE of \(\mu \) and \(\sigma \) respectively.

Then, following the notation of the preceding sections we have \(\beta :=h\left( {\mu ,\sigma } \right) =\mu ,h\left( {{\varvec{T}}} \right) =T_{1} \) and \(P(b({{{{\underline{\varvec{x}}}}}}) <\lambda \left( \varvec{\theta } \right)) =\alpha /{2},P(b({{{{\underline{\varvec{x}}}}}}) >\upsilon \left( \varvec{\theta } \right)) =\alpha /{2}\) which imply that \(\lambda =\mu +\varPhi ^{-{1}}\left( {\alpha /{2}} \right)\sigma /\sqrt{n}\) and \(\upsilon =\mu +\varPhi ^{-{1}}\left( {{1 }-\alpha /{2}} \right)\sigma /\sqrt{n}\). Now from (18) we obtain

$$\begin{aligned} \frac{d\varvec{\gamma } }{d\varvec{\theta } }=\left[ {{\begin{array}{l} {\frac{d\lambda }{d\varvec{\theta } }} \\ {\frac{d\beta }{d\varvec{\theta } }} \\ {\frac{d\upsilon }{d\varvec{\theta } }} \\ \end{array} }} \right]=\left[ {{\begin{array}{lc} 1&{\varPhi ^{-1}(\alpha /2)/\sqrt{n}} \\ 1&0 \\ 1&{\varPhi ^{-1}(1-\alpha /2)/\sqrt{n}} \\ \end{array} }} \right] \end{aligned}$$
(44)

It is also easy to prove that asymptotically \(\left[{{\begin{array}{l} {\underline{\mu } -\mu } \\ {\underline{\sigma } -\sigma } \\ \end{array} }} \right]\sim N\left( {\left[ {{\begin{array}{l} 0 \\ 0 \\ \end{array} }} \right],\frac{\sigma ^{2}}{n}\left[ {{\begin{array}{ll} 1&0 \\ 0&{1/2} \\ \end{array} }} \right]} \right)\), thus \(\underline{\mu } \sim N\left( {\mu ,\sigma ^{\mathrm{2}}/n} \right)\) and \(\underline{\sigma } \sim N({\sigma , \sigma ^{2}/2n})\). We also have that \(\varPhi ^{-{1}}\left( {{1 }-\alpha /{2}} \right) = -\varPhi ^{-{1}}\left( {\alpha /{2}} \right)\).

From (12), (13) we derive \(l=\underline{\mu } -\frac{\underline{\sigma } \varPhi ^{-1}(1-\alpha /2)}{\sqrt{n}\cdot \frac{d\upsilon }{d\mu }}\) and \(u =\underline{\mu } +\frac{\underline{\sigma } \varPhi ^{-1}(1-\alpha /2)}{\sqrt{n}\cdot \frac{d\lambda }{d\mu }}\). From (22) we have that \(\frac{d\lambda }{d\mu }=\frac{d\upsilon }{d\mu }=1-\frac{(\varPhi ^{-1}(1-\alpha /2))^{2}}{4n}\). A \(1 - {\alpha }\) confidence interval for \(\mu \) is \(\left( {\underline{\mu } -t_{n-1}} (1 -\alpha /2)\frac{\sigma }{\sqrt{n}},\mu +t_{n-1} (1 -\alpha /2)\frac{\sigma }{\sqrt{n}} \right)\) (e.g. Papoulis and Pillai 2002, p. 309). Now we have that \(\mathop {\lim }\limits _{n\rightarrow \infty } \frac{{\varPhi ^{-1}(1-\alpha /2)}/{\left( {\frac{d\upsilon }{d\mu }} \right)}}{{t}_{n-1} (1-\alpha /2)}=1\), which proves that the confidence interval obtained by (14) is asymptotically exact.

We will also show that the confidence interval obtained by our method is asymptotically equivalent to a Wald-type interval for two-parameter regular distributions. According to Casella and Berger (2002, p. 472) \(\sqrt{n}(\underline{\varvec{\theta }} -\varvec{\theta }) \mathop \rightarrow \limits ^\mathrm{d} N(\mathbf{0},{{\varvec{I}}}^{-{1}})\), where \(\underline{{\varvec{\theta }}}\) is the MLE of \({\varvec{\theta }}\), and I is the Fisher Information Matrix with elements \({{\varvec{I}}}_{jk} = \text{ E}\left( {-\frac{\partial ^{2}\ln f(x|\varvec{\theta } )}{\partial \theta _j \theta _k }} \right)\). This means that \(\sqrt{n}(\theta _1 -\theta _1 ) \mathop \rightarrow \limits ^\mathrm{d} N(0,{{\varvec{I}}}_{11}^{-{1}} )\) and\(\sqrt{n}(\theta _2 -\theta _2 ) \mathop \rightarrow \limits ^\mathrm{d} N(0,{{\varvec{I}}}_{22}^{-{1}} )\). We conclude that \(\sqrt{n}(\beta -\beta )\mathop \rightarrow \limits ^\mathrm{d} {N}(0,\sigma _\beta ^2 )\), where \(\sigma _\beta ^2 \) depends only on \(\theta _{1}\) and \(\theta _{2}\). Suppose that we seek a \(1 - {\alpha }\) confidence interval for \(\beta \). Then it is easy to show that asymptotically \(\lambda \left( \beta \right) =\beta -\varPhi ^{-{1}}\left( {{1 }-\alpha /{2}} \right)\sigma _\beta /\sqrt{n},\upsilon \left( \beta \right) =\beta +\varPhi ^{-{1}}\left( {{1 }-\alpha /{2}} \right)\sigma _\beta /\sqrt{n}\). Now we have \( \text{ Var} (\underline{\theta } _{1} ) =I_{11}^{-1} /n,{ \text{ Var}}(\underline{\theta } _\mathrm{2} ) =I_{22}^{-1} /n\) and

$$\begin{aligned}&\frac{d\varvec{\gamma } }{d\varvec{\theta } }=\left[ {{\begin{array}{l} {\frac{d\lambda }{d\varvec{\theta } }} \\ {\frac{d\beta }{d\varvec{\theta } }} \\ {\frac{d\upsilon }{d\varvec{\theta } }} \\ \end{array} }} \right]=\left[ {{\begin{array}{cc} {\frac{\partial \beta }{\partial \theta _1 }\!-\!\varPhi ^{\!-\!1}(1\!-\!\alpha /2)\frac{\partial \sigma \beta }{\partial \theta _1 }/\sqrt{n}}&{\frac{\partial \beta }{\partial \theta _2 }\!-\!\varPhi ^{\!-\!1}(1\!-\!\alpha /2)\frac{\partial \sigma \beta }{\partial \theta _2 }/\sqrt{n}} \\ {\frac{\partial \beta }{\partial \theta _1 }}&{\frac{\partial \beta }{\partial \theta _2 }} \\ {\frac{\partial \beta }{\partial \theta _1 }\!+\!\varPhi ^{\!-\!1}(1\!-\!\alpha /2)\frac{\partial \sigma \beta }{\partial \theta _1 }/\sqrt{n}}&{\frac{\partial \beta }{\partial \theta _2 }+\varPhi ^{\!-\!1}(1-\alpha /2)\frac{\partial \sigma \beta }{\partial \theta _2 }/\sqrt{n}} \\ \end{array} }} \right] \end{aligned}$$
(45)
$$\begin{aligned} \nonumber \\&\frac{q_{31} \!+\!q_{32} }{q_{21} \!+\!q_{22} }\nonumber \\&\qquad \quad =\frac{[\varPhi ^{\!-\!1}(1\!-\!\alpha /2)]^{2}\left[ {\left( {\frac{\partial _{\sigma \beta } }{\partial \theta _1 }} \right)^{2}{{\varvec{I}}}_{11}^{\!-\!1} \!+\!\left( {\frac{\partial _{\sigma \beta } }{\partial \theta _2 }} \right)^{2}{{\varvec{I}}}_{22}^{\!-\!1} } \right]\!-\!\varPhi ^{\!-\!1}(1\!-\!\alpha /2)\sqrt{n}\left[ {\frac{\partial _{\sigma \beta } \partial \beta }{\partial \theta _1 \partial \theta _1 }{{\varvec{I}}}_{11}^{\!-\!1} \!+\!\left( {\frac{\partial _{\sigma \beta } \partial \beta }{\partial \theta _2 \partial \theta _2 }} \right)^{2}{{\varvec{I}}}_{22}^{\!-\!1} } \right]}{\sqrt{n}\left[ {\varPhi ^{\!-\!1}(1\!-\!\alpha /2)\left( {\frac{\partial _{\sigma \beta } \partial \beta }{\partial \theta _1 \partial \theta _1 }\!+\!\frac{\partial _{\sigma \beta } \partial \beta }{\partial \theta _2 \partial \theta _2 }} \right)\!-\!2\sqrt{n}\left( {\left( {\frac{\partial \beta }{\partial \theta _1 }} \right)^{2}{{\varvec{I}}}_{11}^{\!-\!1} \!+\!\left( {\frac{\partial \beta }{\partial \theta _2 }} \right)^{2}{{\varvec{I}}}_{22}^{\!-\!1} } \right)} \right]}\nonumber \\&\qquad -\frac{2n\left( {\left( {\frac{\partial \beta }{\partial \theta _1 }} \right)^{2}{{\varvec{I}}}_{11}^{-1} +\left( {\frac{\partial \beta }{\partial \theta _2 }} \right)^{2}{{\varvec{I}}}_{22}^{-1} } \right)}{\sqrt{n}\left[ {\varPhi ^{-1}(1-\alpha /2)\left( {\frac{\partial _{\sigma \beta } \partial \beta }{\partial \theta _1 \partial \theta _1 }+\frac{\partial _{\sigma \beta } \partial \beta }{\partial \theta _2 \partial \theta _2 }} \right)-2\sqrt{n}\left( {\left( {\frac{\partial \beta }{\partial \theta _1 }} \right)^{2}{{\varvec{I}}}_{11}^{-1} +\left( {\frac{\partial \beta }{\partial \theta _2 }} \right)^{2}{{\varvec{I}}}_{22}^{-1} } \right)} \right]} \end{aligned}$$
(46)

It is obvious that \(\mathop {\lim }\limits _{n\rightarrow \infty } \frac{d\upsilon }{d\beta }=\mathop {\lim }\limits _{n\rightarrow \infty } \frac{q_{31} +q_{32} }{q_{21} +q_{22} }=1\). In a similar way we can find that \(\mathop {\lim }\limits _{n\rightarrow \infty } \frac{d\lambda }{d\beta }=\mathop {\lim }\limits _{n\rightarrow \infty } \frac{q_{12} +q_{13} }{q_{22} +q_{23} }=1\). Now substituting to (12), (13) we obtain \(l=\underline{\beta } -\varPhi ^{-{1}}\left( {{1 }-\alpha /{2}} \right)\sigma _\beta /\sqrt{n},\, u=\underline{\beta } +\varPhi ^{-{1}}\left( {{1 }-\alpha /{2}} \right)\sigma _\beta /\sqrt{n}\,\) which is an asymptotically equivalent to a Wald-type interval according to Casella and Berger (2002, p. 497).

Repeating the same procedure for three-parameter distributions, we obtain the same results.

Appendix B: Application of the algorithm on a historical river flows dataset

In this Appendix we apply the algorithm on a historical river flow data set using the hydrological statistical software Hydrognomon (2009–2012), suitable for the processing and the analysis of hydrological time series, which has already incorporated the proposed method. The case study is performed on an important basin in Greece, which is currently part of the water supply system of Athens and has a history, as regards hydraulic infrastructure and management, that goes back to at least 3,500 years ago. Modelling attempts with good performance have already been done on the hydrosystem (Rozos et al. 2004). A long-term dataset of the catchment runoff, extending from 1906 to 2008, is available. The example presented in Fig. 12 is for the January monthly flow record at the Boeoticos Kephisos river outlet at the Karditsa station measured in \(\text{ hm}^{3}\). The gamma distribution is often used to model monthly river flows. Confidence limits of quantiles of distributions are of interest to hydrologists. Here we derived confidence intervals for the scale and the shape parameters of the gamma distribution. Comparison of the results of the different methods used show that the MCCI and “Ripley scale” limits are close to the Bayesian ones. In addition, Fig. 13 gives confidence limits of the distribution percentiles using the same dataset, this time constructed using Hydrognomon (2009–2012).

Fig. 12
figure 12

Confidence intervals for the scale (upper) and shape (lower) parameter of a gamma distribution, used to model the Boeoticos Kephisos river January monthly flows with \(n = 102\), \(\hat{{k}}= {3.842}\) and \(\hat{{\theta }} = {15.218}\). Here the number of samples \(m = 120,000\) for MCCI and \(m = 60,000\) for the “Ripley location” and “Ripley scale” cases, \(\updelta k = 0.3\) and \(\updelta \theta = 0.3\)

Fig. 13
figure 13

A graph (normal probability plot) produced by the Hydrognomon software referring to the monthly flow of Boeoticos Kephisos river for the month of January (1993–2006). The sample (dots plotted using Weibul plotting positions) was modelled by a gamma distribution (central line) with \(\hat{{k}}= {3.842}\) and \(\hat{{\theta }} = {15.218}\). Dotted lines represent 95 % prediction intervals for these parameter values (denoted as \(\lambda \) and \(\upsilon \) in the text) and dashed lines represent 95 % confidence intervals (MCCI denoted as \(l\) and \(u\) in the text) for the distribution percentiles

Rights and permissions

Reprints and permissions

About this article

Cite this article

Tyralis, H., Koutsoyiannis, D. & Kozanis, S. An algorithm to construct Monte Carlo confidence intervals for an arbitrary function of probability distribution parameters. Comput Stat 28, 1501–1527 (2013). https://doi.org/10.1007/s00180-012-0364-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00180-012-0364-7

Keywords

Navigation