The content explains the concept of the Cumulative Distribution Function (CDF) and the Complementary Cumulative Distribution Function (CCDF). The CDF calculates the probability that a random variable takes a value less than or equal to a given value, while the CCDF calculates the probability that a random variable takes a value greater than a given value. The formulas for the CDF and CCDF are provided.
------

SET SCHEMA DM_PAL;

DROP TABLE PAL_DISTRPROB_DATA_TBL;
CREATE COLUMN TABLE PAL_DISTRPROB_DATA_TBL ("DATACOL" DOUBLE);
INSERT INTO PAL_DISTRPROB_DATA_TBL VALUES (37.4);
INSERT INTO PAL_DISTRPROB_DATA_TBL VALUES (277.9);
INSERT INTO PAL_DISTRPROB_DATA_TBL VALUES (463.2);

DROP TABLE PAL_DISTRPROB_DISTRPARAM_TBL;
CREATE COLUMN TABLE PAL_DISTRPROB_DISTRPARAM_TBL ("NAME" VARCHAR(50),"VALUE" VARCHAR(50));;
INSERT INTO PAL_DISTRPROB_DISTRPARAM_TBL VALUES ('DistributionName', 'Weibull');
INSERT INTO PAL_DISTRPROB_DISTRPARAM_TBL VALUES ('Shape', '2.11995');
INSERT INTO PAL_DISTRPROB_DISTRPARAM_TBL VALUES ('Scale', '277.698');

DROP TABLE #PAL_PARAMETER_TBL;
CREATE LOCAL TEMPORARY COLUMN TABLE 
	#PAL_PARAMETER_TBL 
	("PARAM_NAME" VARCHAR(256), "INT_VALUE" INTEGER, "DOUBLE_VALUE" DOUBLE, "STRING_VALUE" VARCHAR(1000));
INSERT INTO #PAL_PARAMETER_TBL VALUES ('LOWER_UPPER',0,NULL,NULL);

CALL _SYS_AFL.PAL_DISTRIBUTION_FUNCTION(PAL_DISTRPROB_DATA_TBL, PAL_DISTRPROB_DISTRPARAM_TBL, #PAL_PARAMETER_TBL, ?);

