Or login with:
| doubleCDF_inv( | int | k | |
| int | n | ||
| double | y | ||
| bool | upper = false | ) |
#include <stdio.h> #include <codecogs/stats/dists/discrete/binomial/cdf_inv.h> #include <codecogs/stats/dists/discrete/binomial/cdf.h> using namespace Stats::Dists::Discrete::Binomial; 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, true ); printf( "%f \t %f \t %f \n", x, y, z ); } return getchar(); }
x CDF INV 0.000000 1.000000 0.000000 0.100000 0.999853 0.100000 0.200000 0.993631 0.200000 0.300000 0.952651 0.300000 0.400000 0.833761 0.400000 0.500000 0.623047 0.500000 0.600000 0.366897 0.600000 0.700000 0.150268 0.700000 0.800000 0.032793 0.800000 0.900000 0.001635 0.900000 1.000000 0.000000 1.000000
Tested at random points (a,b,p). p a,b domain # trials peak rms 0.001 to 1 0,100 100000 2.3e-14 6.4e-16 0.001 to 1 0,10000 100000 6.6e-12 1.2e-13 10^-6 to 0.001 0,100 100000 2.0e-12 1.3e-14 10^-6 to 0.001 0,10000 100000 1.5e-12 3.2e-14
| k | the maximum number of successes, must be >= 0 |
| n | the total number of trials, must be >= k |
| y | the probability of at most k successes in n 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