The input data consist of a univariate frequency distribution, denoted by
, for
, and the boundary values of the classes
, for
. Thus the frequency associated with the interval
is
, and
g01adf assumes that all the values in this interval are concentrated at the point
The following quantities are calculated:
-
(a)total frequency,
-
(b)mean,
-
(c)standard deviation,
-
(d)coefficient of skewness,
-
(e)coefficient of kurtosis,
The routine has been developed primarily for groupings of a continuous variable. If, however, the routine is to be used on the frequency distribution of a discrete variable, taking the values
, then the boundary values for the classes may be defined as follows:
-
(i)for ,
-
(ii)for ,
None.
-
1:
– Integer
Input
-
On entry: , the number of class boundaries, which is one more than the number of classes of the frequency distribution.
Constraint:
.
-
2:
– Real (Kind=nag_wp) array
Input
-
On entry: the elements of
x must contain the boundary values of the classes in ascending order, so that class
is bounded by the values in
and
, for
.
Constraint:
, for .
-
3:
– Integer array
Input
-
On entry: the
th element of
ifreq must contain the frequency associated with the
th class, for
.
is not used by the routine.
Constraints:
- , for ;
- .
-
4:
– Real (Kind=nag_wp)
Output
-
On exit: the mean value, .
-
5:
– Real (Kind=nag_wp)
Output
-
On exit: the standard deviation, .
-
6:
– Real (Kind=nag_wp)
Output
-
On exit: the coefficient of skewness, .
-
7:
– Real (Kind=nag_wp)
Output
-
On exit: the coefficient of kurtosis, .
-
8:
– Integer
Output
-
On exit: the total frequency, .
-
9:
– Integer
Input/Output
-
On entry:
ifail must be set to
,
. If you are unfamiliar with this argument you should refer to
Section 4 in the Introduction to the NAG Library FL Interface for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this argument, the recommended value is
.
When the value is used it is essential to test the value of ifail on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
The method used is believed to be stable.
In the example program, NPROB determines the number of sets of data to be analysed. For each analysis, the boundary values of the classes and the frequencies are read. After g01adf has been successfully called, the input data and calculated quantities are printed. In the example, there is one set of data, with classes.