g01alf
g01alf
© Numerical Algorithms Group, 2002.
Purpose
G01ALF Computes a five-point summary (median, hinges and extremes)
Synopsis
[res,ifail] = g01alf(x<,ifail>)
Description
G01ALF calculates the minimum, lower hinge, median, upper hinge
and the maximum of a sample of n observations.
The data consist of a single sample of n observations denoted by
x and let z , for i=1,2,...,n represent the sample observations
i i
sorted into ascending order.
n (n+1)
Let m= - if n is even and ----- if n is odd,
2 2
m (m+1)
and k= - if m is even and ----- if m is odd.
2 2
Then we have;
Minimum = z ,
1
Maximum = z ,
n
Median = z if n is odd,
m
z +z
m m+1
= ------- if n is even,
2
Lower hinge = z if m is odd,
k
z +z
k k+1
= ------- if m is even,
2
Upper hinge = z if m is odd,
n-k+1
z +z
n-k n-k+1
= ----------- if m is even.
2
Parameters
g01alf
Required Input Arguments:
x (:) real
Optional Input Arguments: <Default>
ifail integer -1
Output Arguments:
res (5) real
ifail integer