# The probability of an even number in hypergeometric distribution

Suppose a random variable X follows the hypergeometric distribution with parameters $N$, $K$, $n$, where the pmf is given as

$$Pr(X=k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}.$$

The question is: how closed is the probability that $X$ is even to $\frac12$, i.e. $\vert Pr(X~is~ even) - \frac12 \vert$?

As mentioned in wolfies' answer, it really depends on the parameters $N$, $K$, $n$. My conjecture is as follows:

Let $Pr_r(even)$ be the probability that the RV is even under the parameters $K_r$, $N_r$, $n_r$. If we assume $K_r= c_1 N_r$, $n_r = c_2 N_r$, for some universal constants $c_1$, $c_2$, then $$Pr_r(even) \rightarrow 0.5,~as~N_r\rightarrow \infty.$$ The reason I believe that this is true is that the hypergeometric distribution will converge to binomial distribution as $N \rightarrow \infty$, and in a binomial distribution $Pr(even)=0.5$. If this conjecture is true, the question then becomes: what is the rate of convergence?

To make this clear, the Hypergeometric can have forms where there is a sizeable mass at 0 (which is even). And if you have say 70% of the density mass at $$X = 0$$, then it is clear that $$P(X \text{ is even})$$ is not going to be close to $$\frac12$$. To illustrate, here is a plot of the Hypergeometric pmf when $$N = 200$$, $$n = 10$$, and $$r = 5$$ (whatever notation one uses):
If desired, one can formally derive, in say Mathematica, an expression for the sum of the pmf over even values: Sum[pmf, 0, n, 2] which returns a complicated mess involving HypergeometricPFQ functions ... but it comes back to the point made above: it depends on your parameter values.
• Mathematica yields a "complicated mess" because it doesn't know any better. The pmf for the even terms in any discrete distribution supported on the integers having pmf $p$ is simply $t\to (p(t)+p(-t))/2.$ In this case, $p$ can be expressed as a Riemann hypergeometric function $_2F_1.$ – whuber Jun 1 '19 at 16:34