Go to the source code of this file.
|
| template<class T > |
| T | Prob (const T &rhs, int n) |
| |
◆ Prob()
template<class T >
| T Prob |
( |
const T & |
rhs, |
|
|
int |
n |
|
) |
| |
Upper Tail Probability of Chi-Squared Distribution. \begin{displaymath} Q(X|N) = \frac{1}{\sqrt{2^N}\Gamma(\frac{1}{2}N)} \int^\infty_X e^{-\frac{1}{2}t} t^{\frac{1}{2}N-1} dt \end{displaymath}
- Author
- T. Glebe
42 static T
s,
t, u,
w, fi;
49 }
else if (rhs < 0.) {
52 }
else if (rhs == 0. || (n / 20) > rhs) {
63 t =
s * .22222222222222221;
64 w = (pow(rhs*
s, 1./3.) - (1 -
t)) / sqrt(
t * 2);
74 if (u < 349.346 && rhs / n <= 100.) {
80 for (i = 1; i <= m-1; ++i) {
88 for (i = 1; i <= m-1; ++i) {
95 h =
w * 1.128379167095513 *
s * e +
erfc(
w);
T erfc(const T &rhs)
Definition: Erf.hh:127
TTree * t
Definition: check_shower.C:4
void w(int rid=2, int nviews=2)
Definition: test.C:27
EdbSegP * s
Definition: tlg2pattern.C:32