• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

binomial

  1. 6

    a bit of C++ code

    // probability of exactly r successes in n trials, // if p is the probability of success in one trial. // 0 <= p <= 1, 0 <= r <= n double binom(int n, int r, double p) { const int x = std::min(r, n-r); double d = 1; int i = 0, j = 2*x+n; while (i < j) { const int k = d<1 ? i++...

Back
Top Bottom