|
Bsoft 2.1.4
Bernard's software package
|
Functions to generate and fit binomials. More...
Functions | |
| double | Bnpk (int n, double p, int k, double w) |
| Calculates the probability of k occurrences in n cases. More... | |
| double | binomial_fit (vector< double > &distrib, int n, int nfit, vector< double > &coeff) |
| Fits a distribution to one or more binomial distributions. More... | |
Functions to generate and fit binomials.
| double binomial_fit | ( | vector< double > & | distrib, |
| int | n, | ||
| int | nfit, | ||
| vector< double > & | coeff | ||
| ) |
Fits a distribution to one or more binomial distributions.
| &distrib | distribution. |
| n | number of cases (number of values in distribution). |
| nfit | number of binomial curves to fit. |
| &coeff | fitted coefficients (weights and probabilities). |
The binomial curve(s) is(are) fit using the downhill simplex method.
| double Bnpk | ( | int | n, |
| double | p, | ||
| int | k, | ||
| double | w | ||
| ) |
Calculates the probability of k occurrences in n cases.
| n | number of cases. |
| p | probability of one occurrence [0-1]. |
| k | occurrences (<=n). |
| w | weight [0-1]. |