NormalDistribution Class Reference

Base class of probability density functions. More...

#include <NormalDistribution.h>

Inheritance diagram for NormalDistribution:
Probability

Public Member Functions

double density (double x)
 Get the value of the probability density at x.
 
double cumulative_distribution (double x)
 Get the value of the distribution function at x.
 
double cumulative_mean (double x)
 Get the first moment of the distribution averaged from 0 to x.
 
double cumulative_moment2 (double x)
 Get the second moment of the distribution averaged from 0 to x.
 
double cumulative_mean_raw (double x)
 Get the raw first moment of the distribution averaged from 0 to x. More...
 
double cumulative_moment3_raw (double x)
 Get the raw third moment of the distribution averaged from 0 to x.
 
- Public Member Functions inherited from Probability
virtual double mean (double x1, double x2)
 Get the first moment of the distribution averaged from x1 to x2.
 
virtual double moment2 (double x1, double x2)
 Get the second moment of the distribution averaged from x1 to x2.
 

Detailed Description

Base class of probability density functions.

Member Function Documentation

◆ cumulative_mean_raw()

double NormalDistribution::cumulative_mean_raw ( double  x)

Get the raw first moment of the distribution averaged from 0 to x.

"Raw" cumulative moments defined as

$ C_m(x) = \int_0^x z^m P(z) dz $

can be computed for the normal distribution to be:

$ C_m(x) = \sqrt{2^{m-2}/\pi} * \gamma(1+(m-1)/2, x^2/2) $

where $\gamma(a,x)$ is the (lower) incomplete gamma function. For odd m, this becomes really easy since a is then an integer. This is used in the following functions.

I called these raw rather than unnormalized since they are computed using a normalized PDF (sigma=1.0), but are not divided by the corresponding cumulative distribution.


The documentation for this class was generated from the following files:

Generated using doxygen 1.8.17