Or login with:
| doubleCDF_inv( | int | k | |
| int | n | ||
| double | p | ||
| bool | upper = false | ) |
#include <stdio.h> #include <codecogs/stats/dists/discrete/negativebinomial/cdf_inv.h> #include <codecogs/stats/dists/discrete/negativebinomial/cdf.h> using namespace Stats::Dists::Discrete::NegativeBinomial; int main() { printf( " x CDF INV \n" ); for( double x=0; x<1; x+=0.1 ) { double y = CDF( 5, 10, x ); double z = CDF_inv( 5, 10, y ); printf( "%f \t %f \t %f \n", x, y, z ); } return getchar(); }
x CDF INV 0.000000 0.000000 0.000000 0.100000 0.000000 0.100000 0.200000 0.000113 0.200000 0.300000 0.003653 0.300000 0.400000 0.033833 0.400000 0.500000 0.150879 0.500000 0.600000 0.403216 0.600000 0.700000 0.721621 0.700000 0.800000 0.938949 0.800000 0.900000 0.997750 0.900000 1.000000 1.000000 1.000000
a,b domain # trials peak rms 0,100 100000 1.5e-14 8.5e-16
| k | the maximum number of failures, must be >= 0 |
| n | the number of sucesses |
| p | the probability that k or fewer failures precede the nth success in a sequence of Bernoulli trials, must be in range 0..1. |
| upper | Default value = false |
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge