Logo ROOT  
Reference Guide
ProbFuncMathCore.h
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Authors: L. Moneta, A. Zsenei 06/2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 , LCG ROOT MathLib Team *
7 * *
8 * *
9 **********************************************************************/
10
11#ifndef ROOT_Math_ProbFuncMathCore
12#define ROOT_Math_ProbFuncMathCore
13
14
15namespace ROOT {
16namespace Math {
17
18
19 /** @defgroup ProbFunc Cumulative Distribution Functions (CDF)
20
21 @ingroup StatFunc
22
23 * Cumulative distribution functions of various distributions.
24 * The functions with the extension <em>_cdf</em> calculate the
25 * lower tail integral of the probability density function
26 *
27 * \f[ D(x) = \int_{-\infty}^{x} p(x') dx' \f]
28 *
29 * while those with the <em>_cdf_c</em> extension calculate the complement of
30 * cumulative distribution function, called in statistics the survival
31 * function.
32 * It corresponds to the upper tail integral of the
33 * probability density function
34 *
35 * \f[ D(x) = \int_{x}^{+\infty} p(x') dx' \f]
36 *
37 *
38 * <strong>NOTE:</strong> In the old releases (< 5.14) the <em>_cdf</em> functions were called
39 * <em>_quant</em> and the <em>_cdf_c</em> functions were called
40 * <em>_prob</em>.
41 * These names are currently kept for backward compatibility, but
42 * their usage is deprecated.
43 *
44 * These functions are defined in the header file <em>Math/ProbFunc.h</em> or in the global one
45 * including all statistical functions <em>Math/DistFunc.h</em>
46 *
47 */
48
49
50
51 /**
52
53 Complement of the cumulative distribution function of the beta distribution.
54 Upper tail of the integral of the #beta_pdf
55
56 @ingroup ProbFunc
57
58 */
59
60 double beta_cdf_c(double x, double a, double b);
61
62
63
64 /**
65
66 Cumulative distribution function of the beta distribution
67 Upper tail of the integral of the #beta_pdf
68
69 @ingroup ProbFunc
70
71 */
72
73 double beta_cdf(double x, double a, double b);
74
75
76
77
78 /**
79
80 Complement of the cumulative distribution function (upper tail) of the Breit_Wigner
81 distribution and it is similar (just a different parameter definition) to the
82 Cauchy distribution (see #cauchy_cdf_c )
83
84 \f[ D(x) = \int_{x}^{+\infty} \frac{1}{\pi} \frac{\frac{1}{2} \Gamma}{x'^2 + (\frac{1}{2} \Gamma)^2} dx' \f]
85
86
87 @ingroup ProbFunc
88
89 */
90 double breitwigner_cdf_c(double x, double gamma, double x0 = 0);
91
92
93 /**
94
95 Cumulative distribution function (lower tail) of the Breit_Wigner
96 distribution and it is similar (just a different parameter definition) to the
97 Cauchy distribution (see #cauchy_cdf )
98
99 \f[ D(x) = \int_{-\infty}^{x} \frac{1}{\pi} \frac{b}{x'^2 + (\frac{1}{2} \Gamma)^2} dx' \f]
100
101
102 @ingroup ProbFunc
103
104 */
105 double breitwigner_cdf(double x, double gamma, double x0 = 0);
106
107
108
109 /**
110
111 Complement of the cumulative distribution function (upper tail) of the
112 Cauchy distribution which is also Lorentzian distribution.
113 It is similar (just a different parameter definition) to the
114 Breit_Wigner distribution (see #breitwigner_cdf_c )
115
116 \f[ D(x) = \int_{x}^{+\infty} \frac{1}{\pi} \frac{ b }{ (x'-m)^2 + b^2} dx' \f]
117
118 For detailed description see
119 <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
120 Mathworld</A>.
121
122 @ingroup ProbFunc
123
124 */
125 double cauchy_cdf_c(double x, double b, double x0 = 0);
126
127
128
129
130 /**
131
132 Cumulative distribution function (lower tail) of the
133 Cauchy distribution which is also Lorentzian distribution.
134 It is similar (just a different parameter definition) to the
135 Breit_Wigner distribution (see #breitwigner_cdf )
136
137 \f[ D(x) = \int_{-\infty}^{x} \frac{1}{\pi} \frac{ b }{ (x'-m)^2 + b^2} dx' \f]
138
139 For detailed description see
140 <A HREF="http://mathworld.wolfram.com/CauchyDistribution.html">
141 Mathworld</A>.
142
143
144 @ingroup ProbFunc
145
146 */
147 double cauchy_cdf(double x, double b, double x0 = 0);
148
149
150
151
152 /**
153
154 Complement of the cumulative distribution function of the \f$\chi^2\f$ distribution
155 with \f$r\f$ degrees of freedom (upper tail).
156
157 \f[ D_{r}(x) = \int_{x}^{+\infty} \frac{1}{\Gamma(r/2) 2^{r/2}} x'^{r/2-1} e^{-x'/2} dx' \f]
158
159 For detailed description see
160 <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
161 Mathworld</A>. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma_c,
162 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
163
164 @ingroup ProbFunc
165
166 */
167
168 double chisquared_cdf_c(double x, double r, double x0 = 0);
169
170
171
172 /**
173
174 Cumulative distribution function of the \f$\chi^2\f$ distribution
175 with \f$r\f$ degrees of freedom (lower tail).
176
177 \f[ D_{r}(x) = \int_{-\infty}^{x} \frac{1}{\Gamma(r/2) 2^{r/2}} x'^{r/2-1} e^{-x'/2} dx' \f]
178
179 For detailed description see
180 <A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
181 Mathworld</A>. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma_c,
182 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
183
184 @ingroup ProbFunc
185
186 */
187
188 double chisquared_cdf(double x, double r, double x0 = 0);
189
190
191 /**
192
193 Cumulative distribution for the Crystal Ball distribution function
194
195 See the definition of the Crystal Ball function at
196 <A HREF="http://en.wikipedia.org/wiki/Crystal_Ball_function">
197 Wikipedia</A>.
198
199 The distribution is defined only for n > 1 when the integral converges
200
201 @ingroup ProbFunc
202
203 */
204 double crystalball_cdf(double x, double alpha, double n, double sigma, double x0 = 0);
205
206 /**
207
208 Complement of the Cumulative distribution for the Crystal Ball distribution
209
210 See the definition of the Crystal Ball function at
211 <A HREF="http://en.wikipedia.org/wiki/Crystal_Ball_function">
212 Wikipedia</A>.
213
214 The distribution is defined only for n > 1 when the integral converges
215
216 @ingroup ProbFunc
217
218 */
219 double crystalball_cdf_c(double x, double alpha, double n, double sigma, double x0 = 0);
220
221 /**
222 Integral of the not-normalized Crystal Ball function
223
224 See the definition of the Crystal Ball function at
225 <A HREF="http://en.wikipedia.org/wiki/Crystal_Ball_function">
226 Wikipedia</A>.
227
228 see ROOT::Math::crystalball_function for the function evaluation.
229
230 @ingroup ProbFunc
231
232 */
233 double crystalball_integral(double x, double alpha, double n, double sigma, double x0 = 0);
234
235 /**
236
237 Complement of the cumulative distribution function of the exponential distribution
238 (upper tail).
239
240 \f[ D(x) = \int_{x}^{+\infty} \lambda e^{-\lambda x'} dx' \f]
241
242 For detailed description see
243 <A HREF="http://mathworld.wolfram.com/ExponentialDistribution.html">
244 Mathworld</A>.
245
246 @ingroup ProbFunc
247
248 */
249
250 double exponential_cdf_c(double x, double lambda, double x0 = 0);
251
252
253
254 /**
255
256 Cumulative distribution function of the exponential distribution
257 (lower tail).
258
259 \f[ D(x) = \int_{-\infty}^{x} \lambda e^{-\lambda x'} dx' \f]
260
261 For detailed description see
262 <A HREF="http://mathworld.wolfram.com/ExponentialDistribution.html">
263 Mathworld</A>.
264
265 @ingroup ProbFunc
266
267 */
268
269
270 double exponential_cdf(double x, double lambda, double x0 = 0);
271
272
273
274 /**
275
276 Complement of the cumulative distribution function of the F-distribution
277 (upper tail).
278
279 \f[ D_{n,m}(x) = \int_{x}^{+\infty} \frac{\Gamma(\frac{n+m}{2})}{\Gamma(\frac{n}{2}) \Gamma(\frac{m}{2})} n^{n/2} m^{m/2} x'^{n/2 -1} (m+nx')^{-(n+m)/2} dx' \f]
280
281 For detailed description see
282 <A HREF="http://mathworld.wolfram.com/F-Distribution.html">
283 Mathworld</A>. It is implemented using the incomplete beta function, ROOT::Math::inc_beta,
284 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
285
286 @ingroup ProbFunc
287
288 */
289
290 double fdistribution_cdf_c(double x, double n, double m, double x0 = 0);
291
292
293
294
295 /**
296
297 Cumulative distribution function of the F-distribution
298 (lower tail).
299
300 \f[ D_{n,m}(x) = \int_{-\infty}^{x} \frac{\Gamma(\frac{n+m}{2})}{\Gamma(\frac{n}{2}) \Gamma(\frac{m}{2})} n^{n/2} m^{m/2} x'^{n/2 -1} (m+nx')^{-(n+m)/2} dx' \f]
301
302 For detailed description see
303 <A HREF="http://mathworld.wolfram.com/F-Distribution.html">
304 Mathworld</A>. It is implemented using the incomplete beta function, ROOT::Math::inc_beta,
305 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
306
307 @ingroup ProbFunc
308
309 */
310
311 double fdistribution_cdf(double x, double n, double m, double x0 = 0);
312
313
314
315 /**
316
317 Complement of the cumulative distribution function of the gamma distribution
318 (upper tail).
319
320 \f[ D(x) = \int_{x}^{+\infty} {1 \over \Gamma(\alpha) \theta^{\alpha}} x'^{\alpha-1} e^{-x'/\theta} dx' \f]
321
322 For detailed description see
323 <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
324 Mathworld</A>. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma,
325 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
326
327 @ingroup ProbFunc
328
329 */
330
331 double gamma_cdf_c(double x, double alpha, double theta, double x0 = 0);
332
333
334
335
336 /**
337
338 Cumulative distribution function of the gamma distribution
339 (lower tail).
340
341 \f[ D(x) = \int_{-\infty}^{x} {1 \over \Gamma(\alpha) \theta^{\alpha}} x'^{\alpha-1} e^{-x'/\theta} dx' \f]
342
343 For detailed description see
344 <A HREF="http://mathworld.wolfram.com/GammaDistribution.html">
345 Mathworld</A>. It is implemented using the incomplete gamma function, ROOT::Math::inc_gamma,
346 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
347
348 @ingroup ProbFunc
349
350 */
351
352 double gamma_cdf(double x, double alpha, double theta, double x0 = 0);
353
354
355
356 /**
357
358 Cumulative distribution function of the Landau
359 distribution (lower tail).
360
361 \f[ D(x) = \int_{-\infty}^{x} p(x) dx \f]
362
363 where \f$p(x)\f$ is the Landau probability density function :
364 \f[ p(x) = \frac{1}{\xi} \phi (\lambda) \f]
365 with
366 \f[ \phi(\lambda) = \frac{1}{2 \pi i}\int_{c-i\infty}^{c+i\infty} e^{\lambda s + s \log{s}} ds\f]
367 with \f$\lambda = (x-x_0)/\xi\f$. For a detailed description see
368 K.S. K&ouml;lbig and B. Schorr, A program package for the Landau distribution,
369 <A HREF="http://dx.doi.org/10.1016/0010-4655(84)90085-7">Computer Phys. Comm. 31 (1984) 97-111</A>
370 <A HREF="http://dx.doi.org/10.1016/j.cpc.2008.03.002">[Erratum-ibid. 178 (2008) 972]</A>.
371 The same algorithms as in
372 <A HREF="https://cern-tex.web.cern.ch/cern-tex/shortwrupsdir/g110/top.html">
373 CERNLIB</A> (DISLAN) is used.
374
375 @param x The argument \f$x\f$
376 @param xi The width parameter \f$\xi\f$
377 @param x0 The location parameter \f$x_0\f$
378
379 @ingroup ProbFunc
380
381 */
382
383 double landau_cdf(double x, double xi = 1, double x0 = 0);
384
385 /**
386
387 Complement of the distribution function of the Landau
388 distribution (upper tail).
389
390 \f[ D(x) = \int_{x}^{+\infty} p(x) dx \f]
391
392 where p(x) is the Landau probability density function.
393 It is implemented simply as 1. - #landau_cdf
394
395 @param x The argument \f$x\f$
396 @param xi The width parameter \f$\xi\f$
397 @param x0 The location parameter \f$x_0\f$
398
399 @ingroup ProbFunc
400
401 */
402 inline double landau_cdf_c(double x, double xi = 1, double x0 = 0) {
403 return 1. - landau_cdf(x,xi,x0);
404 }
405
406 /**
407
408 Complement of the cumulative distribution function of the lognormal distribution
409 (upper tail).
410
411 \f[ D(x) = \int_{x}^{+\infty} {1 \over x' \sqrt{2 \pi s^2} } e^{-(\ln{x'} - m)^2/2 s^2} dx' \f]
412
413 For detailed description see
414 <A HREF="http://mathworld.wolfram.com/LogNormalDistribution.html">
415 Mathworld</A>.
416
417 @ingroup ProbFunc
418
419 */
420
421 double lognormal_cdf_c(double x, double m, double s, double x0 = 0);
422
423
424
425
426 /**
427
428 Cumulative distribution function of the lognormal distribution
429 (lower tail).
430
431 \f[ D(x) = \int_{-\infty}^{x} {1 \over x' \sqrt{2 \pi s^2} } e^{-(\ln{x'} - m)^2/2 s^2} dx' \f]
432
433 For detailed description see
434 <A HREF="http://mathworld.wolfram.com/LogNormalDistribution.html">
435 Mathworld</A>.
436
437 @ingroup ProbFunc
438
439 */
440
441 double lognormal_cdf(double x, double m, double s, double x0 = 0);
442
443
444
445
446 /**
447
448 Complement of the cumulative distribution function of the normal (Gaussian)
449 distribution (upper tail).
450
451 \f[ D(x) = \int_{x}^{+\infty} {1 \over \sqrt{2 \pi \sigma^2}} e^{-x'^2 / 2\sigma^2} dx' \f]
452
453 For detailed description see
454 <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
455 Mathworld</A>.
456
457 @ingroup ProbFunc
458
459 */
460
461 double normal_cdf_c(double x, double sigma = 1, double x0 = 0);
462 /// Alternative name for same function
463 inline double gaussian_cdf_c(double x, double sigma = 1, double x0 = 0) {
464 return normal_cdf_c(x,sigma,x0);
465 }
466
467
468
469 /**
470
471 Cumulative distribution function of the normal (Gaussian)
472 distribution (lower tail).
473
474 \f[ D(x) = \int_{-\infty}^{x} {1 \over \sqrt{2 \pi \sigma^2}} e^{-x'^2 / 2\sigma^2} dx' \f]
475
476 For detailed description see
477 <A HREF="http://mathworld.wolfram.com/NormalDistribution.html">
478 Mathworld</A>.
479 @ingroup ProbFunc
480
481 */
482
483 double normal_cdf(double x, double sigma = 1, double x0 = 0);
484 /// Alternative name for same function
485 inline double gaussian_cdf(double x, double sigma = 1, double x0 = 0) {
486 return normal_cdf(x,sigma,x0);
487 }
488
489
490
491 /**
492
493 Complement of the cumulative distribution function of Student's
494 t-distribution (upper tail).
495
496 \f[ D_{r}(x) = \int_{x}^{+\infty} \frac{\Gamma(\frac{r+1}{2})}{\sqrt{r \pi}\Gamma(\frac{r}{2})} \left( 1+\frac{x'^2}{r}\right)^{-(r+1)/2} dx' \f]
497
498 For detailed description see
499 <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
500 Mathworld</A>. It is implemented using the incomplete beta function, ROOT::Math::inc_beta,
501 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
502
503 @ingroup ProbFunc
504
505 */
506
507 double tdistribution_cdf_c(double x, double r, double x0 = 0);
508
509
510
511
512 /**
513
514 Cumulative distribution function of Student's
515 t-distribution (lower tail).
516
517 \f[ D_{r}(x) = \int_{-\infty}^{x} \frac{\Gamma(\frac{r+1}{2})}{\sqrt{r \pi}\Gamma(\frac{r}{2})} \left( 1+\frac{x'^2}{r}\right)^{-(r+1)/2} dx' \f]
518
519 For detailed description see
520 <A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
521 Mathworld</A>. It is implemented using the incomplete beta function, ROOT::Math::inc_beta,
522 from <A HREF="http://www.netlib.org/cephes">Cephes</A>
523
524 @ingroup ProbFunc
525
526 */
527
528 double tdistribution_cdf(double x, double r, double x0 = 0);
529
530
531 /**
532
533 Complement of the cumulative distribution function of the uniform (flat)
534 distribution (upper tail).
535
536 \f[ D(x) = \int_{x}^{+\infty} {1 \over (b-a)} dx' \f]
537
538 For detailed description see
539 <A HREF="http://mathworld.wolfram.com/UniformDistribution.html">
540 Mathworld</A>.
541
542 @ingroup ProbFunc
543
544 */
545
546 double uniform_cdf_c(double x, double a, double b, double x0 = 0);
547
548
549
550
551 /**
552
553 Cumulative distribution function of the uniform (flat)
554 distribution (lower tail).
555
556 \f[ D(x) = \int_{-\infty}^{x} {1 \over (b-a)} dx' \f]
557
558 For detailed description see
559 <A HREF="http://mathworld.wolfram.com/UniformDistribution.html">
560 Mathworld</A>.
561
562 @ingroup ProbFunc
563
564 */
565
566 double uniform_cdf(double x, double a, double b, double x0 = 0);
567
568
569
570
571 /**
572
573 Complement of the cumulative distribution function of the Poisson distribution.
574 Upper tail of the integral of the #poisson_pdf
575
576 @ingroup ProbFunc
577
578 */
579
580 double poisson_cdf_c(unsigned int n, double mu);
581
582 /**
583
584 Cumulative distribution function of the Poisson distribution
585 Lower tail of the integral of the #poisson_pdf
586
587 @ingroup ProbFunc
588
589 */
590
591 double poisson_cdf(unsigned int n, double mu);
592
593 /**
594
595 Complement of the cumulative distribution function of the Binomial distribution.
596 Upper tail of the integral of the #binomial_pdf
597
598 @ingroup ProbFunc
599
600 */
601
602 double binomial_cdf_c(unsigned int k, double p, unsigned int n);
603
604 /**
605
606 Cumulative distribution function of the Binomial distribution
607 Lower tail of the integral of the #binomial_pdf
608
609 @ingroup ProbFunc
610
611 */
612
613 double binomial_cdf(unsigned int k, double p, unsigned int n);
614
615
616 /**
617
618 Complement of the cumulative distribution function of the Negative Binomial distribution.
619 Upper tail of the integral of the #negative_binomial_pdf
620
621 @ingroup ProbFunc
622
623 */
624
625 double negative_binomial_cdf_c(unsigned int k, double p, double n);
626
627 /**
628
629 Cumulative distribution function of the Negative Binomial distribution
630 Lower tail of the integral of the #negative_binomial_pdf
631
632 @ingroup ProbFunc
633
634 */
635
636 double negative_binomial_cdf(unsigned int k, double p, double n);
637
638
639
640#ifdef HAVE_OLD_STAT_FUNC
641
642 /** @name Backward compatible MathCore CDF functions */
643
644
645 inline double breitwigner_prob(double x, double gamma, double x0 = 0) {
646 return breitwigner_cdf_c(x,gamma,x0);
647 }
648 inline double breitwigner_quant(double x, double gamma, double x0 = 0) {
649 return breitwigner_cdf(x,gamma,x0);
650 }
651
652 inline double cauchy_prob(double x, double b, double x0 = 0) {
653 return cauchy_cdf_c(x,b,x0);
654 }
655 inline double cauchy_quant(double x, double b, double x0 = 0) {
656 return cauchy_cdf (x,b,x0);
657 }
658 inline double chisquared_prob(double x, double r, double x0 = 0) {
659 return chisquared_cdf_c(x, r, x0);
660 }
661 inline double chisquared_quant(double x, double r, double x0 = 0) {
662 return chisquared_cdf (x, r, x0);
663 }
664 inline double exponential_prob(double x, double lambda, double x0 = 0) {
665 return exponential_cdf_c(x, lambda, x0 );
666 }
667 inline double exponential_quant(double x, double lambda, double x0 = 0) {
668 return exponential_cdf (x, lambda, x0 );
669 }
670
671 inline double gaussian_prob(double x, double sigma, double x0 = 0) {
672 return gaussian_cdf_c( x, sigma, x0 );
673 }
674 inline double gaussian_quant(double x, double sigma, double x0 = 0) {
675 return gaussian_cdf ( x, sigma, x0 );
676 }
677
678 inline double lognormal_prob(double x, double m, double s, double x0 = 0) {
679 return lognormal_cdf_c( x, m, s, x0 );
680 }
681 inline double lognormal_quant(double x, double m, double s, double x0 = 0) {
682 return lognormal_cdf ( x, m, s, x0 );
683 }
684
685 inline double normal_prob(double x, double sigma, double x0 = 0) {
686 return normal_cdf_c( x, sigma, x0 );
687 }
688 inline double normal_quant(double x, double sigma, double x0 = 0) {
689 return normal_cdf ( x, sigma, x0 );
690 }
691
692 inline double uniform_prob(double x, double a, double b, double x0 = 0) {
693 return uniform_cdf_c( x, a, b, x0 );
694 }
695 inline double uniform_quant(double x, double a, double b, double x0 = 0) {
696 return uniform_cdf ( x, a, b, x0 );
697 }
698 inline double fdistribution_prob(double x, double n, double m, double x0 = 0) {
699 return fdistribution_cdf_c (x, n, m, x0);
700 }
701 inline double fdistribution_quant(double x, double n, double m, double x0 = 0) {
702 return fdistribution_cdf (x, n, m, x0);
703 }
704
705 inline double gamma_prob(double x, double alpha, double theta, double x0 = 0) {
706 return gamma_cdf_c (x, alpha, theta, x0);
707 }
708 inline double gamma_quant(double x, double alpha, double theta, double x0 = 0) {
709 return gamma_cdf (x, alpha, theta, x0);
710 }
711
712 inline double tdistribution_prob(double x, double r, double x0 = 0) {
713 return tdistribution_cdf_c (x, r, x0);
714 }
715
716 inline double tdistribution_quant(double x, double r, double x0 = 0) {
717 return tdistribution_cdf (x, r, x0);
718 }
719
720#endif
721
722 /** @defgroup TruncFunc Statistical functions from truncated distributions
723
724 @ingroup StatFunc
725
726 Statistical functions for the truncated distributions. Examples of such functions are the
727 first or the second momentum of the truncated distribution.
728 In the case of the Landau, first and second momentum functions are provided for the Landau
729 distribution truncated only on the right side.
730 These functions are defined in the header file <em>Math/ProbFunc.h</em> or in the global one
731 including all statistical functions <em>Math/StatFunc.h</em>
732
733 */
734
735 /**
736
737 First moment (mean) of the truncated Landau distribution.
738 \f[ \frac{1}{D (x)} \int_{-\infty}^{x} t\, p(t) d t \f]
739 where \f$p(x)\f$ is the Landau distribution
740 and \f$D(x)\f$ its cumulative distribution function.
741
742 For detailed description see
743 K.S. K&ouml;lbig and B. Schorr, A program package for the Landau distribution,
744 <A HREF="http://dx.doi.org/10.1016/0010-4655(84)90085-7">Computer Phys. Comm. 31 (1984) 97-111</A>
745 <A HREF="http://dx.doi.org/10.1016/j.cpc.2008.03.002">[Erratum-ibid. 178 (2008) 972]</A>.
746 The same algorithms as in
747 <A HREF="https://cern-tex.web.cern.ch/cern-tex/shortwrupsdir/g110/top.html">
748 CERNLIB</A> (XM1LAN) is used
749
750 @param x The argument \f$x\f$
751 @param xi The width parameter \f$\xi\f$
752 @param x0 The location parameter \f$x_0\f$
753
754 @ingroup TruncFunc
755
756 */
757
758 double landau_xm1(double x, double xi = 1, double x0 = 0);
759
760
761
762 /**
763
764 Second moment of the truncated Landau distribution.
765 \f[ \frac{1}{D (x)} \int_{-\infty}^{x} t^2\, p(t) d t \f]
766 where \f$p(x)\f$ is the Landau distribution
767 and \f$D(x)\f$ its cumulative distribution function.
768
769 For detailed description see
770 K.S. K&ouml;lbig and B. Schorr, A program package for the Landau distribution,
771 <A HREF="http://dx.doi.org/10.1016/0010-4655(84)90085-7">Computer Phys. Comm. 31 (1984) 97-111</A>
772 <A HREF="http://dx.doi.org/10.1016/j.cpc.2008.03.002">[Erratum-ibid. 178 (2008) 972]</A>.
773 The same algorithms as in
774 <A HREF="https://cern-tex.web.cern.ch/cern-tex/shortwrupsdir/g110/top.html">
775 CERNLIB</A> (XM1LAN) is used
776
777 @param x The argument \f$x\f$
778 @param xi The width parameter \f$\xi\f$
779 @param x0 The location parameter \f$x_0\f$
780
781 @ingroup TruncFunc
782
783 */
784
785 double landau_xm2(double x, double xi = 1, double x0 = 0);
786
787
788
789} // namespace Math
790} // namespace ROOT
791
792
793#endif // ROOT_Math_ProbFuncMathCore
ROOT::R::TRInterface & r
Definition: Object.C:4
#define b(i)
Definition: RSha256.hxx:100
double poisson_cdf(unsigned int n, double mu)
Cumulative distribution function of the Poisson distribution Lower tail of the integral of the poisso...
double crystalball_integral(double x, double alpha, double n, double sigma, double x0=0)
Integral of the not-normalized Crystal Ball function.
double uniform_cdf(double x, double a, double b, double x0=0)
Cumulative distribution function of the uniform (flat) distribution (lower tail).
double binomial_cdf_c(unsigned int k, double p, unsigned int n)
Complement of the cumulative distribution function of the Binomial distribution.
double lognormal_cdf(double x, double m, double s, double x0=0)
Cumulative distribution function of the lognormal distribution (lower tail).
double cauchy_cdf_c(double x, double b, double x0=0)
Complement of the cumulative distribution function (upper tail) of the Cauchy distribution which is a...
double fdistribution_cdf(double x, double n, double m, double x0=0)
Cumulative distribution function of the F-distribution (lower tail).
double binomial_cdf(unsigned int k, double p, unsigned int n)
Cumulative distribution function of the Binomial distribution Lower tail of the integral of the binom...
double landau_cdf(double x, double xi=1, double x0=0)
Cumulative distribution function of the Landau distribution (lower tail).
double lognormal_cdf_c(double x, double m, double s, double x0=0)
Complement of the cumulative distribution function of the lognormal distribution (upper tail).
double uniform_cdf_c(double x, double a, double b, double x0=0)
Complement of the cumulative distribution function of the uniform (flat) distribution (upper tail).
double fdistribution_cdf_c(double x, double n, double m, double x0=0)
Complement of the cumulative distribution function of the F-distribution (upper tail).
double crystalball_cdf_c(double x, double alpha, double n, double sigma, double x0=0)
Complement of the Cumulative distribution for the Crystal Ball distribution.
double normal_cdf_c(double x, double sigma=1, double x0=0)
Complement of the cumulative distribution function of the normal (Gaussian) distribution (upper tail)...
double landau_cdf_c(double x, double xi=1, double x0=0)
Complement of the distribution function of the Landau distribution (upper tail).
double chisquared_cdf(double x, double r, double x0=0)
Cumulative distribution function of the distribution with degrees of freedom (lower tail).
double negative_binomial_cdf_c(unsigned int k, double p, double n)
Complement of the cumulative distribution function of the Negative Binomial distribution.
double gamma_cdf_c(double x, double alpha, double theta, double x0=0)
Complement of the cumulative distribution function of the gamma distribution (upper tail).
double beta_cdf(double x, double a, double b)
Cumulative distribution function of the beta distribution Upper tail of the integral of the beta_pdf.
double crystalball_cdf(double x, double alpha, double n, double sigma, double x0=0)
Cumulative distribution for the Crystal Ball distribution function.
double negative_binomial_cdf(unsigned int k, double p, double n)
Cumulative distribution function of the Negative Binomial distribution Lower tail of the integral of ...
double breitwigner_cdf_c(double x, double gamma, double x0=0)
Complement of the cumulative distribution function (upper tail) of the Breit_Wigner distribution and ...
double normal_cdf(double x, double sigma=1, double x0=0)
Cumulative distribution function of the normal (Gaussian) distribution (lower tail).
double breitwigner_cdf(double x, double gamma, double x0=0)
Cumulative distribution function (lower tail) of the Breit_Wigner distribution and it is similar (jus...
double exponential_cdf_c(double x, double lambda, double x0=0)
Complement of the cumulative distribution function of the exponential distribution (upper tail).
double tdistribution_cdf(double x, double r, double x0=0)
Cumulative distribution function of Student's t-distribution (lower tail).
double beta_cdf_c(double x, double a, double b)
Complement of the cumulative distribution function of the beta distribution.
double poisson_cdf_c(unsigned int n, double mu)
Complement of the cumulative distribution function of the Poisson distribution.
double chisquared_cdf_c(double x, double r, double x0=0)
Complement of the cumulative distribution function of the distribution with degrees of freedom (upp...
double cauchy_cdf(double x, double b, double x0=0)
Cumulative distribution function (lower tail) of the Cauchy distribution which is also Lorentzian dis...
double tdistribution_cdf_c(double x, double r, double x0=0)
Complement of the cumulative distribution function of Student's t-distribution (upper tail).
double gamma_cdf(double x, double alpha, double theta, double x0=0)
Cumulative distribution function of the gamma distribution (lower tail).
double exponential_cdf(double x, double lambda, double x0=0)
Cumulative distribution function of the exponential distribution (lower tail).
double landau_xm1(double x, double xi=1, double x0=0)
First moment (mean) of the truncated Landau distribution.
double landau_xm2(double x, double xi=1, double x0=0)
Second moment of the truncated Landau distribution.
const Double_t sigma
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16
Namespace for new Math classes and functions.
double gamma(double x)
double gaussian_cdf(double x, double sigma=1, double x0=0)
Alternative name for same function.
double gaussian_cdf_c(double x, double sigma=1, double x0=0)
Alternative name for same function.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
static constexpr double s
auto * m
Definition: textangle.C:8
auto * a
Definition: textangle.C:12