Generates pseudorandom order statistics from a standard normal distribution.
float *imsls_f_random_order_normal (int ifirst, int ilast, int n,..., 0)
The type double function is imsls_d_random_order_normal.
int
ifirst (Input)
First order statistic to
generate.
int
ilast (Input)
Last order statistic to
generate.
ilast must be greater than or equal to ifirst. The full set of order statistics from ifirst to ilast is generated. If only one order statistic is desired, set
ilast = ifirst.
int
n (Input)
Size of the sample from which the
order statistics arise.
An array of length ilast + 1 -
ifirst containing the random order statistics in ascending order.
The first element is the ifirst order statistic in a random sample of size n from the standard normal distribution. To release
this space, use free.
float
*imsls_f_random_order_normal (int
ifirst, int
ilast, int n,
IMSLS_RETURN_USER, float r[],
0)
IMSLS_RETURN_USER,
float r[]
(Output)
User-supplied array of length ilast + 1 -
ifirst containing the random order statistics in ascending
order.
Routine imsls_f_random_order_normal generates the ifirst through the ilast order statistics from a pseudorandom sample of size
N from a normal
(0, 1) distribution. Routine imsls_f_random_order_normal uses the routine imsls_f_random_order_uniform
to generate order statistics from the uniform (0, 1)
distribution and then obtains the normal order statistics using the inverse CDF
transformation.
Each call to imsls_f_random_order_normal yields an independent event so order statistics from different calls may not have the same order relations with each other.
In this example, imsls_f_random_order_normal is used to generate the fifteenth through the nineteenth order statistics from a sample of size twenty.
imsls_random_seed_set(123457);
r = imsls_f_random_order_normal(15, 19, 20, 0);
printf("The 15th through the 19th order statistics from a \n");
printf("random sample of size 20 from a normal distribution\n");
imsls_f_write_matrix("", 5, 1, r, 0);
The 15th through the 19th order statistics from a
random sample of size 20 from a normal distribution
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |