I'm trying to solve the probability that a cumulative discrete distribution (specifically, the negative hypergeometric distribution) equals 0.5 for a particular parameter $\in \mathbb{N}$. Since it's discrete, there is no exact solution, but I was wondering if Mathematica had a way to find the nearest solution. At this point I'm reduced to plugging in and guessing, and NSolve
is not working (probably because its not just checking the naturals).
So I need a approximate solution $\in \mathbb{N}$ that may not be very close.
Edit:
Here's the code:
Solve[.5 ==
Sum[
(Binomial[k + 1 - 1, k]*Binomial[540000 - 1 - k, 539000 - k])
/
(Binomial[540000, 539000]
),
{k, 1, n}
],
n, Integers]
The (approximate) solution is 375.
FindMinimum
of the distribution minus 0.5 could work. $\endgroup$InverseCDF[]
orQuantile[]
are usable if your distribution is expressible in terms of built-ins. $\endgroup$