g01al calculates a five-point summary for a single sample.
Syntax
C# |
---|
public static void g01al( int n, double[] x, double[] res, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g01al ( _ n As Integer, _ x As Double(), _ res As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g01al( int n, array<double>^ x, array<double>^ res, [OutAttribute] int% ifail ) |
F# |
---|
static member g01al : n : int * x : float[] * res : float[] * ifail : int byref -> unit |
Parameters
- n
- Type: System..::..Int32On entry: , number of observations in the sample.Constraint: .
- x
- Type: array<System..::..Double>[]()[][]An array of size [n]On entry: the sample observations, .
- res
- Type: array<System..::..Double>[]()[][]An array of size []On exit: res contains the five-point summary.
- The minimum.
- The lower hinge.
- The median.
- The upper hinge.
- The maximum.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
g01al calculates the minimum, lower hinge, median, upper hinge and the maximum of a sample of observations.
The data consist of a single sample of observations denoted by and let , for , represent the sample observations sorted into ascending order.
Let if is even and if is odd,
and if is even and if is odd.
Then we have
Minimum | , | |
Maximum | , | |
Median | if is odd, | |
if is even, | ||
Lower hinge | if is odd, | |
if is even, | ||
Upper hinge | if is odd, | |
if is even. |
References
Erickson B H and Nosanchuk T A (1985) Understanding Data Open University Press, Milton Keynes
Tukey J W (1977) Exploratory Data Analysis Addison–Wesley
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, .
Accuracy
The computations are stable.
Parallelism and Performance
None.
Further Comments
The time taken by g01al is proportional to .
Example
This example calculates a five-point summary for a sample of observations.
Example program (C#): g01ale.cs