An online calculator that can calculate a sum of binomial coefficients

7.1k Views Asked by At

Is there any online calculator that can calculate

$$\dfrac{\sum_{k=570}^{770} \binom{6,700}{k}\binom{3,300}{1,000-k}}{\binom{10,000}{1,000}} $$

for me? There are a few binomial coefficient calculators but for the sum in the numerator there are not usable.

2

There are 2 best solutions below

0
On BEST ANSWER

Typing in the following input into WolframAlpha:

Sum[Binomial[6700,k]Binomial[3300,1000-k]/Binomial[10000,1000],{k,570,770}]

yields an exact result followed by the approximate decimal value, which to 50 digits is

$$0.99999999999855767906391784086205133574169750988724.$$

The same input in Mathematica will yield the same result as above, although you could equivalently use the input

Subtract @@ (CDF[HypergeometricDistribution[1000, 6700, 10000], #] & /@ {770, 569})

As Jack D'Aurizio also suggested, this is a hypergeometric probability, so approximation by the normal distribution is possible. The way to do this is to recall the mean of a hypergeometric distribution with PDF $$\Pr[X = k] = \frac{\binom{m}{k}\binom{N-m}{n-k}}{\binom{N}{n}}$$ is given by $$\operatorname{E}[X] = \frac{mn}{N} = \mu,$$ and the variance is $$\operatorname{Var}[X] = \frac{mn(N-m)(N-n)}{N^2(N-1)} = \sigma^2.$$ In your case, you have values $m = 6700$, $N = 10000$, $n = 1000$. Thus we can approximate, with continuity correction, $$\begin{align*} \Pr[570 \le X \le 770] &\approx \Pr\left[\frac{570-\mu-0.5}{\sigma} \le \frac{X - \mu}{\sigma} \le \frac{770-\mu+0.5}{\sigma}\right]\\ &\approx \Pr[-7.12408 \le Z \le 7.12408]. \end{align*}$$ To fifty decimal places, this is $$0.99999999999895220978266454480005261506906978189913.$$ This approximation is good to about $10^{-13}$.

0
On

At SageMath I got an answer in seconds:

k=var('k')

x=sum(binomial(6700,k)*binomial(3300,1000-k)/binomial(10000,1000) for k in range(570,771))

print(x)

print(float(x))

198312619281587403878054699588860245870947064516615179245134107894418307833317024147981667917911804292686634436695690968087899071794431386159655768562440891514903492647237178915988030846704259320965369227881153497013977875833804439792585243653929277869164521733828712328647745121006640597024532569329121461619115378106772365419098076565622744142887827720006395463207710820736142617859822885825756358469603340933570833011211425628257516884927448892918065113979035105794926584326023826424817140051122889724991323644773258687560260351217869424750558526735922472633517790793969000987257311871705790944334485708276056119127035078285824538948994232564769128232877713044115661514632602108135302109733334247403333369323516330685637750190450195309680858664105571468412081839550909967315167933033727881603975972211445599555004886853183700672884707314981594325511303310666473801477554964704821222894383248765772383313789542448083064509272993140506209952000167191415129185922538786641222449048944708080/198312619281873434320734236122327802173588345629778758714777922093612728078962809429602500003169301415752491621639188713458505171632685191533659857387619885370959648818500846334411508432367441044940358301380596046352977017880773057604771582062441072089452966359913444434185659532275631004354261453128654307416017800156781866884015412244924466447984624544074695417549834196261979745285842547076320053674169323538762409337013247132726821453667135226869858022257266361394989236527814227175898684740786546170048660748974269168434019046391269412747328918114331246577712116858474876740550746225152819774853351374963322899202174163990643510271492035038561835701738303746259830661939182614096084778519320374490734140041668210285826517663137970047555294369042441636172079843785492279245667522234451616239236677587162868872154029551311264682493513636856793619933752361085899055520662918441917359885406322281218200839310472837807635301310507007803333890625533690491128986782935022059151024851085368143

0.999999999999