inegbinomcdf
The inegbinomcdf function calculates the inverse negative binomial cumulative distribution (CDF).
Synopsis
AQL% SELECT inegbinomcdf(success_prob,successes,trial_prob) FROM array
Summary
The inverse negative binomial CDF returns the probability y of a selected number of successes r with probability of success in a single trial p.
Example
Â
Create a 1-dimensional array called system_array:
AQL% CREATE ARRAY system_array <system:double>[x=0:9];
Put numerical values of 1–10 into the array:
AQL% SELECT * FROM store(build(system_array, (x+1/1.0)),system_array);
The output is:[(1),(2),(3),(4),(5),(6),(7),(8),(9),(10)]
Apply the negbinomcdf function to system:
AQL% SELECT negbinomcdf(system,10.0,0.5) INTO prob_array FROM system_array;
The output is:[(0.00585938),(0.0192871),(0.0461426),(0.0897827),(0.150879),(0.227249),(0.314529),(0.407265),(0.5),(0.588099)]
Apply the inegbinomcdf function to the array containing the probabilities:
AQL% SELECT inegbinomcdf(prob,10.0,0.5) FROM prob_array;
The output is:[(1),(2),(3),(4),(5),(6),(7),(8),(9),(10)]
Â
Note that the values from the original array, system_array, return.
Â