ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
QuantFuncMathCore.h
Go to the documentation of this file.
1 // @(#)root/mathcore:$Id$
2 // Authors: L. Moneta, A. Zsenei 08/2005
3 
4 
5 // Authors: Andras Zsenei & Lorenzo Moneta 08/2005
6 
7 
8 /**********************************************************************
9  * *
10  * Copyright (c) 2005 , LCG ROOT MathLib Team *
11  * *
12  * *
13  **********************************************************************/
14 
15 
16 #if defined(__CINT__) && !defined(__MAKECINT__)
17 // avoid to include header file when using CINT
18 #ifndef _WIN32
19 #include "../lib/libMathCore.so"
20 #else
21 #include "../bin/libMathCore.dll"
22 #endif
23 
24 #else
25 
26 
27 #ifndef ROOT_Math_QuantFuncMathCore
28 #define ROOT_Math_QuantFuncMathCore
29 
30 
31 namespace ROOT {
32 namespace Math {
33 
34 
35 
36  /** @defgroup QuantFunc Quantile Functions
37  * @ingroup StatFunc
38  *
39  * Inverse functions of the cumulative distribution functions
40  * and the inverse of the complement of the cumulative distribution functions
41  * for various distributions.
42  * The functions with the extension <em>_quantile</em> calculate the
43  * inverse of the <em>_cdf</em> function, the
44  * lower tail integral of the probability density function
45  * \f$D^{-1}(z)\f$ where
46  *
47  * \f[ D(x) = \int_{-\infty}^{x} p(x') dx' \f]
48  *
49  * while those with the <em>_quantile_c</em> extension calculate the
50  * inverse of the <em>_cdf_c</em> functions, the upper tail integral of the probability
51  * density function \f$D^{-1}(z) \f$ where
52  *
53  * \f[ D(x) = \int_{x}^{+\infty} p(x') dx' \f]
54  *
55  * These functions are defined in the header file <em>Math/ProbFunc.h<em> or in the global one
56  * including all statistical dunctions <em>Math/DistFunc.h<em>
57  *
58  *
59  * <strong>NOTE:</strong> In the old releases (< 5.14) the <em>_quantile</em> functions were called
60  * <em>_quant_inv</em> and the <em>_quantile_c</em> functions were called
61  * <em>_prob_inv</em>.
62  * These names are currently kept for backward compatibility, but
63  * their usage is deprecated.
64  *
65  */
66 
67  /** @name Quantile Functions from MathCore
68  * The implementation is provided in MathCore and for the majority of the function comes from
69  * <A HREF="http://www.netlib.org/cephes">Cephes</A>.
70 
71  */
72 
73  //@{
74 
75 
76 
77  /**
78 
79  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
80  function of the upper tail of the beta distribution
81  (#beta_cdf_c).
82  It is implemented using the function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>.
83 
84 
85  @ingroup QuantFunc
86 
87  */
88  double beta_quantile(double x, double a, double b);
89 
90  /**
91 
92  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
93  function of the lower tail of the beta distribution
94  (#beta_cdf).
95  It is implemented using
96  the function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>.
97 
98  @ingroup QuantFunc
99 
100  */
101  double beta_quantile_c(double x, double a, double b);
102 
103 
104 
105  /**
106 
107  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
108  function of the upper tail of the Cauchy distribution (#cauchy_cdf_c)
109  which is also called Lorentzian distribution. For
110  detailed description see
111  <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
112  Mathworld</A>.
113 
114  @ingroup QuantFunc
115 
116  */
117 
118  double cauchy_quantile_c(double z, double b);
119 
120 
121 
122 
123  /**
124 
125  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
126  function of the lower tail of the Cauchy distribution (#cauchy_cdf)
127  which is also called Breit-Wigner or Lorentzian distribution. For
128  detailed description see
129  <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
130  Mathworld</A>. The implementation used is that of
131  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC294">GSL</A>.
132 
133  @ingroup QuantFunc
134 
135  */
136 
137  double cauchy_quantile(double z, double b);
138 
139 
140 
141 
142  /**
143 
144  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
145  function of the upper tail of the Breit-Wigner distribution (#breitwigner_cdf_c)
146  which is similar to the Cauchy distribution. For
147  detailed description see
148  <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
149  Mathworld</A>. It is evaluated using the same implementation of
150  #cauchy_quantile_c.
151 
152  @ingroup QuantFunc
153 
154  */
155 
156  inline double breitwigner_quantile_c(double z, double gamma) {
157  return cauchy_quantile_c(z, gamma/2.0);
158  }
159 
160 
161 
162 
163  /**
164 
165  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
166  function of the lower tail of the Breit_Wigner distribution (#breitwigner_cdf)
167  which is similar to the Cauchy distribution. For
168  detailed description see
169  <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
170  Mathworld</A>. It is evaluated using the same implementation of
171  #cauchy_quantile.
172 
173 
174  @ingroup QuantFunc
175 
176  */
177 
178  inline double breitwigner_quantile(double z, double gamma) {
179  return cauchy_quantile(z, gamma/2.0);
180  }
181 
182 
183 
184 
185 
186 
187  /**
188 
189  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
190  function of the upper tail of the \f$\chi^2\f$ distribution
191  with \f$r\f$ degrees of freedom (#chisquared_cdf_c). For detailed description see
192  <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
193  Mathworld</A>. It is implemented using the inverse of the incomplete complement gamma function, using
194  the function igami from <A HREF="http://www.netlib.org/cephes">Cephes</A>.
195 
196  @ingroup QuantFunc
197 
198  */
199 
200  double chisquared_quantile_c(double z, double r);
201 
202 
203 
204  /**
205 
206  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
207  function of the lower tail of the \f$\chi^2\f$ distribution
208  with \f$r\f$ degrees of freedom (#chisquared_cdf). For detailed description see
209  <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
210  Mathworld</A>.
211  It is implemented using chisquared_quantile_c, therefore is not very precise for small z.
212  It is reccomended to use the MathMore function (ROOT::MathMore::chisquared_quantile )implemented using GSL
213 
214  @ingroup QuantFunc
215 
216  */
217 
218  double chisquared_quantile(double z, double r);
219 
220 
221 
222  /**
223 
224  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
225  function of the upper tail of the exponential distribution
226  (#exponential_cdf_c). For detailed description see
227  <A HREF="http://mathworld.wolfram.com/ExponentialDistribution.html">
228  Mathworld</A>.
229 
230  @ingroup QuantFunc
231 
232  */
233 
234  double exponential_quantile_c(double z, double lambda);
235 
236 
237 
238 
239  /**
240 
241  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
242  function of the lower tail of the exponential distribution
243  (#exponential_cdf). For detailed description see
244  <A HREF="http://mathworld.wolfram.com/ExponentialDistribution.html">
245  Mathworld</A>.
246 
247  @ingroup QuantFunc
248 
249  */
250 
251  double exponential_quantile(double z, double lambda);
252 
253 
254 
255  /**
256 
257  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
258  function of the lower tail of the f distribution
259  (#fdistribution_cdf). For detailed description see
260  <A HREF="http://mathworld.wolfram.com/F-Distribution.html">
261  Mathworld</A>.
262  It is implemented using the inverse of the incomplete beta function,
263  function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>.
264 
265  @ingroup QuantFunc
266 
267  */
268  double fdistribution_quantile(double z, double n, double m);
269 
270  /**
271 
272  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
273  function of the upper tail of the f distribution
274  (#fdistribution_cdf_c). For detailed description see
275  <A HREF="http://mathworld.wolfram.com/F-Distribution.html">
276  Mathworld</A>.
277  It is implemented using the inverse of the incomplete beta function,
278  function incbi from <A HREF="http://www.netlib.org/cephes">Cephes</A>.
279 
280  @ingroup QuantFunc
281  */
282 
283  double fdistribution_quantile_c(double z, double n, double m);
284 
285 
286  /**
287 
288  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
289  function of the upper tail of the gamma distribution
290  (#gamma_cdf_c). For detailed description see
291  <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
292  Mathworld</A>. The implementation used is that of
293  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC300">GSL</A>.
294  It is implemented using the function igami taken
295  from <A HREF="http://www.netlib.org/cephes">Cephes</A>.
296 
297  @ingroup QuantFunc
298 
299  */
300 
301  double gamma_quantile_c(double z, double alpha, double theta);
302 
303 
304 
305 
306  /**
307 
308  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
309  function of the lower tail of the gamma distribution
310  (#gamma_cdf). For detailed description see
311  <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
312  Mathworld</A>.
313  It is implemented using chisquared_quantile_c, therefore is not very precise for small z.
314  For this special cases it is reccomended to use the MathMore function ROOT::MathMore::gamma_quantile
315  implemented using GSL
316 
317 
318  @ingroup QuantFunc
319 
320  */
321 
322  double gamma_quantile(double z, double alpha, double theta);
323 
324 
325 
326  /**
327 
328  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
329  function of the upper tail of the normal (Gaussian) distribution
330  (#gaussian_cdf_c). For detailed description see
331  <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
332  Mathworld</A>. It can also be evaluated using #normal_quantile_c which will
333  call the same implementation.
334 
335  @ingroup QuantFunc
336 
337  */
338 
339  double gaussian_quantile_c(double z, double sigma);
340 
341 
342 
343 
344  /**
345 
346  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
347  function of the lower tail of the normal (Gaussian) distribution
348  (#gaussian_cdf). For detailed description see
349  <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
350  Mathworld</A>. It can also be evaluated using #normal_quantile which will
351  call the same implementation.
352  It is implemented using the function ROOT::Math::Cephes::ndtri taken from
353  <A HREF="http://www.netlib.org/cephes">Cephes</A>.
354 
355  @ingroup QuantFunc
356 
357  */
358 
359  double gaussian_quantile(double z, double sigma);
360 
361 
362 
363 
364  /**
365 
366  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
367  function of the upper tail of the lognormal distribution
368  (#lognormal_cdf_c). For detailed description see
369  <A HREF="http://mathworld.wolfram.com/LogNormalDistribution.html">
370  Mathworld</A>. The implementation used is that of
371  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC302">GSL</A>.
372 
373  @ingroup QuantFunc
374 
375  */
376 
377  double lognormal_quantile_c(double x, double m, double s);
378 
379 
380 
381 
382  /**
383 
384  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
385  function of the lower tail of the lognormal distribution
386  (#lognormal_cdf). For detailed description see
387  <A HREF="http://mathworld.wolfram.com/LogNormalDistribution.html">
388  Mathworld</A>. The implementation used is that of
389  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC302">GSL</A>.
390 
391  @ingroup QuantFunc
392 
393  */
394 
395  double lognormal_quantile(double x, double m, double s);
396 
397 
398 
399 
400  /**
401 
402  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
403  function of the upper tail of the normal (Gaussian) distribution
404  (#normal_cdf_c). For detailed description see
405  <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
406  Mathworld</A>. It can also be evaluated using #gaussian_quantile_c which will
407  call the same implementation.
408  It is implemented using the function ROOT::Math::Cephes::ndtri taken from
409  <A HREF="http://www.netlib.org/cephes">Cephes</A>.
410 
411  @ingroup QuantFunc
412 
413  */
414 
415  double normal_quantile_c(double z, double sigma);
416  /// alternative name for same function
417  inline double gaussian_quantile_c(double z, double sigma) {
418  return normal_quantile_c(z,sigma);
419  }
420 
421 
422 
423 
424  /**
425 
426  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
427  function of the lower tail of the normal (Gaussian) distribution
428  (#normal_cdf). For detailed description see
429  <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
430  Mathworld</A>. It can also be evaluated using #gaussian_quantile which will
431  call the same implementation.
432  It is implemented using the function ROOT::Math::Cephes::ndtri taken from
433  <A HREF="http://www.netlib.org/cephes">Cephes</A>.
434 
435 
436  @ingroup QuantFunc
437 
438  */
439 
440  double normal_quantile(double z, double sigma);
441  /// alternative name for same function
442  inline double gaussian_quantile(double z, double sigma) {
443  return normal_quantile(z,sigma);
444  }
445 
446 
447 
448 #ifdef LATER // t quantiles are still in MathMore
449 
450  /**
451 
452  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
453  function of the upper tail of Student's t-distribution
454  (#tdistribution_cdf_c). For detailed description see
455  <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
456  Mathworld</A>. The implementation used is that of
457  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.
458 
459  @ingroup QuantFunc
460 
461  */
462 
463  double tdistribution_quantile_c(double z, double r);
464 
465 
466 
467 
468  /**
469 
470  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
471  function of the lower tail of Student's t-distribution
472  (#tdistribution_cdf). For detailed description see
473  <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
474  Mathworld</A>. The implementation used is that of
475  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.
476 
477  @ingroup QuantFunc
478 
479  */
480 
481  double tdistribution_quantile(double z, double r);
482 
483 #endif
484 
485 
486  /**
487 
488  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
489  function of the upper tail of the uniform (flat) distribution
490  (#uniform_cdf_c). For detailed description see
491  <A HREF="http://mathworld.wolfram.com/UniformDistribution.html">
492  Mathworld</A>.
493 
494  @ingroup QuantFunc
495 
496  */
497 
498  double uniform_quantile_c(double z, double a, double b);
499 
500 
501 
502 
503  /**
504 
505  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
506  function of the lower tail of the uniform (flat) distribution
507  (#uniform_cdf). For detailed description see
508  <A HREF="http://mathworld.wolfram.com/UniformDistribution.html">
509  Mathworld</A>.
510 
511  @ingroup QuantFunc
512 
513  */
514 
515  double uniform_quantile(double z, double a, double b);
516 
517 
518 
519 
520  /**
521 
522  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
523  function of the lower tail of the Landau distribution
524  (#landau_cdf).
525 
526  For detailed description see
527  K.S. K&ouml;lbig and B. Schorr, A program package for the Landau distribution,
528  <A HREF="http://dx.doi.org/10.1016/0010-4655(84)90085-7">Computer Phys. Comm. 31 (1984) 97-111</A>
529  <A HREF="http://dx.doi.org/10.1016/j.cpc.2008.03.002">[Erratum-ibid. 178 (2008) 972]</A>.
530  The same algorithms as in
531  <A HREF="http://wwwasdoc.web.cern.ch/wwwasdoc/shortwrupsdir/g110/top.html">
532  CERNLIB</A> (RANLAN) is used.
533 
534  @param z The argument \f$z\f$
535  @param xi The width parameter \f$\xi\f$
536 
537  @ingroup QuantFunc
538 
539  */
540 
541  double landau_quantile(double z, double xi = 1);
542 
543 
544  /**
545 
546  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
547  function of the upper tail of the landau distribution
548  (#landau_cdf_c).
549  Implemented using #landau_quantile
550 
551  @param z The argument \f$z\f$
552  @param xi The width parameter \f$\xi\f$
553 
554  @ingroup QuantFunc
555 
556  */
557 
558  double landau_quantile_c(double z, double xi = 1);
559 
560 
561 #ifdef HAVE_OLD_STAT_FUNC
562 
563  //@}
564  /** @name Backward compatible functions */
565 
566 
567  inline double breitwigner_prob_inv(double x, double gamma) {
568  return breitwigner_quantile_c(x,gamma);
569  }
570  inline double breitwigner_quant_inv(double x, double gamma) {
571  return breitwigner_quantile(x,gamma);
572  }
573 
574  inline double cauchy_prob_inv(double x, double b) {
575  return cauchy_quantile_c(x,b);
576  }
577  inline double cauchy_quant_inv(double x, double b) {
578  return cauchy_quantile (x,b);
579  }
580 
581  inline double exponential_prob_inv(double x, double lambda) {
582  return exponential_quantile_c(x, lambda );
583  }
584  inline double exponential_quant_inv(double x, double lambda) {
585  return exponential_quantile (x, lambda );
586  }
587 
588  inline double gaussian_prob_inv(double x, double sigma) {
589  return gaussian_quantile_c( x, sigma );
590  }
591  inline double gaussian_quant_inv(double x, double sigma) {
592  return gaussian_quantile ( x, sigma );
593  }
594 
595  inline double lognormal_prob_inv(double x, double m, double s) {
596  return lognormal_quantile_c( x, m, s );
597  }
598  inline double lognormal_quant_inv(double x, double m, double s) {
599  return lognormal_quantile ( x, m, s );
600  }
601 
602  inline double normal_prob_inv(double x, double sigma) {
603  return normal_quantile_c( x, sigma );
604  }
605  inline double normal_quant_inv(double x, double sigma) {
606  return normal_quantile ( x, sigma );
607  }
608 
609  inline double uniform_prob_inv(double x, double a, double b) {
610  return uniform_quantile_c( x, a, b );
611  }
612  inline double uniform_quant_inv(double x, double a, double b) {
613  return uniform_quantile ( x, a, b );
614  }
615 
616  inline double chisquared_prob_inv(double x, double r) {
617  return chisquared_quantile_c(x, r );
618  }
619 
620  inline double gamma_prob_inv(double x, double alpha, double theta) {
621  return gamma_quantile_c (x, alpha, theta );
622  }
623 
624 
625 #endif
626 
627 
628 } // namespace Math
629 } // namespace ROOT
630 
631 
632 
633 #endif // ROOT_Math_QuantFuncMathCore
634 
635 #endif // if defined (__CINT__) && !defined(__MAKECINT__)
double normal_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
Float_t theta
Definition: shapesAnim.C:5
double normal_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
double cauchy_quantile(double z, double b)
Inverse ( ) of the cumulative distribution function of the lower tail of the Cauchy distribution (cau...
double uniform_quantile(double z, double a, double b)
Inverse ( ) of the cumulative distribution function of the lower tail of the uniform (flat) distribut...
double gamma_quantile_c(double z, double alpha, double theta)
Inverse ( ) of the cumulative distribution function of the upper tail of the gamma distribution (gamm...
TArc * a
Definition: textangle.C:12
double landau_quantile_c(double z, double xi=1)
Inverse ( ) of the cumulative distribution function of the upper tail of the landau distribution (lan...
Double_t x[n]
Definition: legend1.C:17
double breitwigner_quantile_c(double z, double gamma)
Inverse ( ) of the cumulative distribution function of the upper tail of the Breit-Wigner distributio...
double chisquared_quantile_c(double z, double r)
Inverse ( ) of the cumulative distribution function of the upper tail of the distribution with degr...
double exponential_quantile_c(double z, double lambda)
Inverse ( ) of the cumulative distribution function of the upper tail of the exponential distribution...
double breitwigner_quantile(double z, double gamma)
Inverse ( ) of the cumulative distribution function of the lower tail of the Breit_Wigner distributio...
const Double_t sigma
Float_t z[5]
Definition: Ifit.C:16
double cauchy_quantile_c(double z, double b)
Inverse ( ) of the cumulative distribution function of the upper tail of the Cauchy distribution (cau...
double uniform_quantile_c(double z, double a, double b)
Inverse ( ) of the cumulative distribution function of the upper tail of the uniform (flat) distribut...
double gamma(double x)
ROOT::R::TRInterface & r
Definition: Object.C:4
TMarker * m
Definition: textangle.C:8
double beta_quantile_c(double x, double a, double b)
Inverse ( ) of the cumulative distribution function of the lower tail of the beta distribution (beta_...
double tdistribution_quantile(double z, double r)
Inverse ( ) of the cumulative distribution function of the lower tail of Student's t-distribution (td...
double fdistribution_quantile(double z, double n, double m)
Inverse ( ) of the cumulative distribution function of the lower tail of the f distribution (fdistrib...
double fdistribution_quantile_c(double z, double n, double m)
Inverse ( ) of the cumulative distribution function of the upper tail of the f distribution (fdistrib...
double lognormal_quantile_c(double x, double m, double s)
Inverse ( ) of the cumulative distribution function of the upper tail of the lognormal distribution (...
double landau_quantile(double z, double xi=1)
Inverse ( ) of the cumulative distribution function of the lower tail of the Landau distribution (lan...
double gaussian_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
double gaussian_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
double lognormal_quantile(double x, double m, double s)
Inverse ( ) of the cumulative distribution function of the lower tail of the lognormal distribution (...
double gamma_quantile(double z, double alpha, double theta)
Inverse ( ) of the cumulative distribution function of the lower tail of the gamma distribution (gamm...
const Int_t n
Definition: legend1.C:16
double exponential_quantile(double z, double lambda)
Inverse ( ) of the cumulative distribution function of the lower tail of the exponential distribution...
double chisquared_quantile(double z, double r)
Inverse ( ) of the cumulative distribution function of the lower tail of the distribution with degr...
double tdistribution_quantile_c(double z, double r)
Inverse ( ) of the cumulative distribution function of the upper tail of Student's t-distribution (td...
double beta_quantile(double x, double a, double b)
Inverse ( ) of the cumulative distribution function of the upper tail of the beta distribution (beta_...