Oracle® Database PL/SQL Packages and Types Reference 11g Release 2 (11.2) Part Number E25788-04 |
|
|
PDF · Mobi · ePub |
The DBMS_STAT_FUNCS
package provides statistical functions.
This chapter contains the following topic:
Table 140-1 DBMS_STAT_FUNCS Package Subprograms
Subprogram | Description |
---|---|
Tests how well a sample of values fits an exponential distribution |
|
Tests how well a sample of values fits a normal distribution |
|
Tests how well a sample of values fits a Poisson distribution |
|
Summarizes a numerical column of a table |
|
Tests how well a sample of values fits a uniform distribution |
|
Tests how well a sample of values fits a Weibull distribution |
This procedure tests how well a sample of values fits an exponential distribution.
DBMS_STAT_FUNCS.EXPONENTIAL_DIST_FIT ( ownername IN VARCHAR2, tablename IN VARCHAR2, columnname IN VARCHAR2, test_type IN VARCHAR2 DEFAULT 'KOLMOGOROV_SMIRNOV', lambda IN NUMBER, mu IN NUMBER, sig OUT NUMBER);
Table 140-2 EXPONENTIAL_DIST_FIT Procedure Parameters
Parameter | Description |
---|---|
|
The schema where the table resides. |
|
The table where the column resides. |
|
The column of the table against which to run the test. |
|
The type of test to use: ' |
|
The scale parameter. |
|
The location parameter. |
|
The goodness of fit value, based on test type. A small value indicates a significant difference between the sample and the exponential distribution. A number close to 1 indicates a close match. |
This procedure tests how well a sample of values fits a normal distribution.
DBMS_STAT_FUNCS.NORMAL_DIST_FIT ( ownername IN VARCHAR2, tablename IN VARCHAR2, columnname IN VARCHAR2, test_type IN VARCHAR2 DEFAULT 'SHAPIRO_WILKS', mean IN NUMBER, stdev IN NUMBER, sig OUT NUMBER);
Table 140-3 NORMAL_DIST_FIT Procedure Parameters
Parameter | Description |
---|---|
|
The schema where the table resides. |
|
The table where the column resides. |
|
The column of the table against which to run the test. |
|
The type of test to use: ' |
|
The mean of the distribution against which to compare. |
|
The standard deviation of the distribution against which to compare. |
|
The goodness of fit value, based on test type. A small value indicates a significant difference between the sample and the normal distribution. A number close to 1 indicates a close match. |
This procedure tests how well a sample of values fits a Poisson distribution.
DBMS_STAT_FUNCS.POISSON_DIST_FIT ( ownername IN VARCHAR2, tablename IN VARCHAR2, columnname IN VARCHAR2, test_type IN VARCHAR2 DEFAULT 'KOLMOGOROV_SMIRNOV', lambda IN NUMBER, sig OUT NUMBER);
Table 140-4 POISSON_DIST_FIT Procedure Parameters
Parameter | Description |
---|---|
|
The schema where the table resides. |
|
The table where the column resides. |
|
The column of the table against which to run the test. |
|
The type of test to use: ' |
|
The lambda parameter is the shape parameter. |
|
The goodness of fit value, based on test type. A small value indicates a significant difference between the sample and the Poisson distribution. A number close to 1 indicates a close match. |
This procedure summarizes the numerical column specified in the columnname
of tablename
. The summary is returned as a Summary Type. Note that most of the output of SUMMARY
can be obtained with currently available SQL.
DBMS_STAT_FUNCS.SUMMARY ( ownername IN VARCHAR2, tablename IN VARCHAR2, columnname IN VARCHAR2, sigma_value IN NUMBER DEFAULT 3, s OUT SummaryType);
Table 140-5 SUMMARY Procedure Parameters
Parameter | Description |
---|---|
|
The schema where the table resides. |
|
The table where the column resides. |
|
The column of the table to be summarized. |
|
The number of sigmas for the set of extreme values, defaults to 3. |
|
The Record containing summary information about given column. |
TYPE n_arr IS VARRAY(5) of NUMBER; TYPE num_table IS TABLE of NUMBER; TYPE summaryType IS RECORD ( count NUMBER, min NUMBER, max NUMBER, range NUMBER, mean NUMBER, cmode num_table, variance NUMBER, stddev NUMBER, quantile_5 NUMBER, quantile_25 NUMBER, median NUMBER, quantile_75 NUMBER, quantile_95 NUMBER, plus_x_sigma NUMBER, minus_x_sigma NUMBER, extreme_values num_table, top_5_values n_arr, bottom_5_values n_arr);
This procedure tests well a sample of values fits a uniform distribution.
DBMS_STAT_FUNCS.UNIFORM_DIST_FIT ( ownername IN VARCHAR2, tablename IN VARCHAR2, columnname IN VARCHAR2, var_type IN VARCHAR2 DEFAULT 'CONTINUOUS', test_type IN VARCHAR2 DEFAULT 'KOLMOGOROV_SMIRNOV', paramA IN NUMBER, paramB IN NUMBER, sig OUT NUMBER);
Table 140-6 UNIFORM_DIST_FIT Procedure Parameters
Parameter | Description |
---|---|
|
The schema where the table resides. |
|
The table where the column resides. |
|
The column of the table against which to run the test. |
|
The type of distribution: ' |
|
The type of test to use: ' |
|
Parameter A estimated from the sample (the location parameter). |
|
Parameter B estimated from the sample (the scale parameter). |
|
The goodness of fit value, based on test type. A small value indicates a significant difference between the sample and the uniform distribution. A number close to 1 indicates a close match. |
This procedure tests how well a sample of values fits a Weibull distribution.
DBMS_STAT_FUNCS.WEIBULL_DIST_FIT ( ownername IN VARCHAR2, tablename IN VARCHAR2, columnname IN VARCHAR2, test_type IN VARCHAR2 DEFAULT 'KOLMOGOROV_SMIRNOV', alpha IN NUMBER, mu IN NUMBER, beta IN NUMBER, sig OUT NUMBER);
Table 140-7 WEIBULL_DIST_FIT Procedure Parameters
Parameter | Description |
---|---|
|
The schema where the table resides. |
|
The table where the column resides. |
|
The column of the table against which to run the test. |
|
The type of test to use: ' |
|
The scale parameter. |
|
The location parameter. |
|
The slope/shape parameter. |
|
The goodness of fit value, based on test type. A small value indicates a significant difference between the sample and the Weibull distribution. A number close to 1 indicates a close match. |