sub prob_hyper { my ($N1,$N2,$n)=@_; my $span = $N1<$n? $N1 : $n; map {binomial($N1,$_) * binomial($N2,$n-$_) / binomial($N1+$N2,$n)} 0..$span; }