binoinv
Inverse of the Binomial cumulative distribution function (iCDF).
For each element of p, compute the quantile (the inverse of the CDF) of the binomial distribution with parameters n and ps, where n is the number of trials and ps is the probability of success. The size of x is the common size of p, n, and ps. A scalar input functions as a constant matrix of the same size as the other inputs.
Further information about the binomial distribution can be found at https://en.wikipedia.org/wiki/Binomial_distribution
See also: binocdf, binopdf, binornd, binofit, binolike, binostat, binotest
Source Code: binoinv
## Plot various iCDFs from the binomial distribution p = 0.001:0.001:0.999; x1 = binoinv (p, 20, 0.5); x2 = binoinv (p, 20, 0.7); x3 = binoinv (p, 40, 0.5); plot (p, x1, "-b", p, x2, "-g", p, x3, "-r") grid on legend ({"n = 20, ps = 0.5", "n = 20, ps = 0.7", ... "n = 40, ps = 0.5"}, "location", "southeast") title ("Binomial iCDF") xlabel ("probability") ylabel ("values in x (number of successes)") |