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_Boolean
Input
-
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:
– Integer
Input
-
On entry: the length of the array
x.
Constraint:
.
-
3:
– const double
Input
-
On entry: , the values at which the PDF is to be evaluated with , , for .
-
4:
– Integer
Input
-
On entry: the length of the array
xmu.
Constraint:
.
-
5:
– const double
Input
-
On entry: , the means with , .
-
6:
– Integer
Input
-
On entry: the length of the array
xstd.
Constraint:
.
-
7:
– const double
Input
-
On entry: , the standard deviations with , .
Constraint:
, for .
-
8:
– double
Output
-
Note: the dimension,
dim, of the array
pdf
must be at least
.
On exit: or .
-
9:
– Integer
Output
-
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 7 in the Introduction to the NAG Library CL Interface).
Not applicable.
None.
This example prints the value of the Normal distribution PDF at four different points with differing and .