Summations over variables in multivariate hypergeometric distribution |
I ran all Frank's examples through Deck-u-lator as test cases and compared the calculated results to formula results. Here is one of the test case formulas in Python.
sum(sum(sum(choose(4,m)*choose(4,p)*choose(4,t)*choose(48,10-m-p-t) / choose(60,10) for t in span(1,max(4,10-m-p)) for p in span(1,4)) for m in span(1,4))
Since I found the formulas so helpful, I thought I would start generating them in Deck-u-lator and maybe others will also find them helpful.
$$ \sum_{ C_0=1 }^{4} \sum_{ C_1=1 }^{4} \sum_{ C_2=1 }^{\min(4,10-C_0-C_1)}\frac{{\binom{4}{C_0} \binom{4}{C_1} \binom{4}{C_2} \binom{48}{10-C_0-C_1-C_2}}}{{\binom{60}{10}}} = 12.6\% $$
No comments:
Post a Comment