truncated_normal_rule_test


truncated_normal_rule_test, a C code which calls truncated_normal_rule() to compute a quadrature rule for a normal probability density function (PDF), sometimes called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].

Licensing:

The computer code and data files made available on this web page are distributed under the MIT license

Related Data and Programs:

truncated_normal_rule, a C code which computes a quadrature rule for a normal probability density function (PDF), also called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].

Source Code:

"OPTION0" computes a quadrature rule for the normal distribution, n = 5, mu = 1.0, sigma = 2.0;

"OPTION1" computes a quadrature rule for the lower truncated normal distribution, n = 9, mu = 2.0, sigma = 0.5, a = 0.0;

"OPTION2" computes a quadrature rule for the upper truncated normal distribution, n = 9, mu = 2.0, sigma = 0.5, b = 3.0;

"OPTION3" computes a quadrature rule for the doubly truncated normal distribution, n = 5, mu = 100.0, sigma = 25.0, a = 50.0, b = 100.0;


Last revised on 23 August 2019.