nag_normal_pdf_vector (g01kqc) returns a number of values of the probability density function (PDF), or its logarithm, for the Normal (Gaussian) distributions.
The Normal distribution with mean
, variance
; has probability density function (PDF)
The input arrays to this function are designed to allow maximum flexibility in the supply of vector arguments by re-using elements of any arrays that are shorter than the total number of evaluations required. See
Section 2.6 in the g01 Chapter Introduction for further information.
None.
- 1:
– Nag_BooleanInput
-
On entry: the value of
ilog determines whether the logarithmic value is returned in PDF.
- , the probability density function is returned.
- , the logarithm of the probability density function is returned.
- 2:
– IntegerInput
-
On entry: the length of the array
x.
Constraint:
.
- 3:
– const doubleInput
-
On entry: , the values at which the PDF is to be evaluated with , , for .
- 4:
– IntegerInput
-
On entry: the length of the array
xmu.
Constraint:
.
- 5:
– const doubleInput
-
On entry: , the means with , .
- 6:
– IntegerInput
-
On entry: the length of the array
xstd.
Constraint:
.
- 7:
– const doubleInput
-
On entry: , the standard deviations with , .
Constraint:
, for .
- 8:
– doubleOutput
-
Note: the dimension,
dim, of the array
pdf
must be at least
.
On exit: or .
- 9:
– IntegerOutput
-
Note: the dimension,
dim, of the array
ivalid
must be at least
.
On exit:
indicates any errors with the input arguments, with
- No error.
- .
- 10:
– NagError *Input/Output
-
The NAG error argument (see
Section 2.7 in How to Use the NAG Library and its Documentation).
Not applicable.
nag_normal_pdf_vector (g01kqc) is not threaded in any implementation.
None.
This example prints the value of the Normal distribution PDF at four different points with differing and .