diff options
author | Matti Picus <matti.picus@gmail.com> | 2018-08-21 19:14:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 19:14:58 +0300 |
commit | 18f2385b29bdd62701a1a82d7bf33fd87430a05e (patch) | |
tree | ea9b9a3f9bc7e940a8873bbd12678a0b6fd1e117 | |
parent | 0b5dfb0fb2a678652b45849ccf96982f89f010a8 (diff) | |
parent | 7750bea0a615a893b9ea3eeea5414e1ddcc41316 (diff) | |
download | numpy-18f2385b29bdd62701a1a82d7bf33fd87430a05e.tar.gz |
Merge pull request #11755 from gyk/patch-1
MAINT: Fix typos in random.hypergeometric's notes
-rw-r--r-- | numpy/random/mtrand/mtrand.pyx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index 04d6c6615..5097ad88f 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -4198,12 +4198,12 @@ cdef class RandomState: ----- The probability density for the Hypergeometric distribution is - .. math:: P(x) = \\frac{\\binom{m}{n}\\binom{N-m}{n-x}}{\\binom{N}{n}}, + .. math:: P(x) = \\frac{\\binom{g}{x}\\binom{b}{n-x}}{\\binom{g+b}{n}}, - where :math:`0 \\le x \\le m` and :math:`n+m-N \\le x \\le n` + where :math:`0 \\le x \\le n` and :math:`n-b \\le x \\le g` - for P(x) the probability of x successes, n = ngood, m = nbad, and - N = number of samples. + for P(x) the probability of x successes, g = ngood, b = nbad, and + n = number of samples. Consider an urn with black and white marbles in it, ngood of them black and nbad are white. If you draw nsample balls without |