STATS_KS_TEST

STATS_KS_TEST is a Kolmogorov-Smirnov function that compares two samples to test whether they are from the same population or from populations that have the same distribution. It does not assume that the population from which the samples were taken is normally distributed.

This function takes three arguments: two expressions and a return value of type VARCHAR2. expr1 classifies the data into groups. expr2 contains the values for each of the groups. The function returns one value determined by the third argument. If you omit the third argument, then the default is SIG. The meaning of the return values is shown in Table 7-6.

Table 7-6 STATS_KS_TEST Return Values

Return Value

Meaning

STATISTIC

Observed value of D

SIG

Significance of D

STATS_KS_TEST Example

Using the Kolmogorov Smirnov test, the following example determines whether the distribution of sales between men and women is due to chance: