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:
ilog – 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:
lx – IntegerInput
On entry: the length of the array
x.
Constraint:
.
- 3:
x[lx] – const doubleInput
On entry: , the values at which the PDF is to be evaluated with , , for .
- 4:
lxmu – IntegerInput
On entry: the length of the array
xmu.
Constraint:
.
- 5:
xmu[lxmu] – const doubleInput
On entry: , the means with , .
- 6:
lxstd – IntegerInput
On entry: the length of the array
xstd.
Constraint:
.
- 7:
xstd[lxstd] – const doubleInput
On entry: , the standard deviations with , .
Constraint:
, for .
- 8:
pdf[] – doubleOutput
-
Note: the dimension,
dim, of the array
pdf
must be at least
.
On exit: or .
- 9:
ivalid[] – 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:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
Not applicable.
Not applicable.
None.
This example prints the value of the Normal distribution PDF at four different points with differing and .