Logo ROOT   6.14/05
Reference Guide
QuantFuncMathMore.h
Go to the documentation of this file.
1 // @(#)root/mathmore:$Id$
2 // Authors: L. Moneta, A. Zsenei 08/2005
3 
4 
5 
6  /**********************************************************************
7  * *
8  * Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT *
9  * *
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU General Public License *
12  * as published by the Free Software Foundation; either version 2 *
13  * of the License, or (at your option) any later version. *
14  * *
15  * This library is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18  * General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this library (see file COPYING); if not, write *
22  * to the Free Software Foundation, Inc., 59 Temple Place, Suite *
23  * 330, Boston, MA 02111-1307 USA, or contact the author. *
24  * *
25  **********************************************************************/
26 
27 
28 #ifndef ROOT_Math_QuantFuncMathMore
29 #define ROOT_Math_QuantFuncMathMore
30 
31 
32 namespace ROOT {
33 namespace Math {
34 
35 
36 
37  /** @defgroup QuantFunc Quantile Functions
38  * @ingroup StatFunc
39  *
40  * Inverse functions of the cumulative distribution functions
41  * and the inverse of the complement of the cumulative distribution functions
42  * for various distributions.
43  * The functions with the extension <em>_quantile</em> calculate the
44  * inverse of the <em>_cdf</em> function, the
45  * lower tail integral of the probability density function
46  * \f$D^{-1}(z)\f$ where
47  *
48  * \f[ D(x) = \int_{-\infty}^{x} p(x') dx' \f]
49  *
50  * while those with the <em>_quantile_c</em> extension calculate the
51  * inverse of the <em>_cdf_c</em> functions, the upper tail integral of the probability
52  * density function \f$D^{-1}(z) \f$ where
53  *
54  * \f[ D(x) = \int_{x}^{+\infty} p(x') dx' \f]
55  *
56  * The implementation used is that of
57  * <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html">GSL</A>.
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  /** @name Quantile Functions from MathMore
67  * The implementation used is that of
68  * <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html">GSL</A>.
69  */
70 
71  //@{
72 
73 
74  /**
75 
76  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
77  function of the upper tail of Student's t-distribution
78  (#tdistribution_cdf_c). For detailed description see
79  <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
80  Mathworld</A>. The implementation used is that of
81  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.
82 
83  @ingroup QuantFunc
84 
85  */
86 
87  double tdistribution_quantile_c(double z, double r);
88 
89 
90 
91 
92  /**
93 
94  Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
95  function of the lower tail of Student's t-distribution
96  (#tdistribution_cdf). For detailed description see
97  <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
98  Mathworld</A>. The implementation used is that of
99  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.
100 
101  @ingroup QuantFunc
102 
103  */
104 
105  double tdistribution_quantile(double z, double r);
106 
107 
108 #ifdef HAVE_OLD_STAT_FUNC
109 
110  //@}
111  /** @name Backward compatible functions */
112 
113 
114  }
115  inline double chisquared_quant_inv(double x, double r) {
116  return chisquared_quantile (x, r );
117  }
118 
119 
120  inline double gamma_quant_inv(double x, double alpha, double theta) {
121  return gamma_quantile (x, alpha, theta );
122  }
123 
124  inline double tdistribution_prob_inv(double x, double r) {
125  return tdistribution_quantile_c (x, r );
126  }
127 
128  inline double tdistribution_quant_inv(double x, double r) {
129  return tdistribution_quantile (x, r );
130  }
131 
132 #endif
133 
134 
135 } // namespace Math
136 
137 namespace MathMore {
138 
139 
140 
141  /**
142 
143  Re-implementation in MathMore of the Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
144  function of the lower tail of the \f$\chi^2\f$ distribution
145  with \f$r\f$ degrees of freedom (#chisquared_cdf). For detailed description see
146  <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
147  Mathworld</A>. The implementation used is that of
148  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC303">GSL</A>.
149 
150  @ingroup QuantFunc
151 
152  */
153 
154  double chisquared_quantile(double z, double r);
155 
156 
157 
158 
159  /**
160 
161  Re-implementation in MathMore of the Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
162  function of the lower tail of the gamma distribution
163  (#gamma_cdf). For detailed description see
164  <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
165  Mathworld</A>. The implementation used is that of
166  <A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC300">GSL</A>.
167 
168  @ingroup QuantFunc
169 
170  */
171 
172  double gamma_quantile(double z, double alpha, double theta);
173 
174 
175 
176 } // end namespace MathMore
177 } // namespace ROOT
178 
179 
180 
181 #endif // ROOT_Math_QuantFuncMathMore
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Double_t x[n]
Definition: legend1.C:17
ROOT::R::TRInterface & r
Definition: Object.C:4
double tdistribution_quantile(double z, double r)
Inverse ( ) of the cumulative distribution function of the lower tail of Student&#39;s t-distribution (td...
Namespace for new Math classes and functions.
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
double gamma_quantile(double z, double alpha, double theta)
Inverse ( ) of the cumulative distribution function of the lower tail of the gamma distribution (gamm...
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&#39;s t-distribution (td...